Skip to content

Commit 2e44110

Browse files
Added AssemblyFileVersion
Updated version file for 1.12 Removed some whitespace (formatting issues in code only)
1 parent cf5ec52 commit 2e44110

File tree

3 files changed

+16
-66
lines changed

3 files changed

+16
-66
lines changed

ChangeLog.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
ChangeLog
22

3+
3.4.3.5
4+
Added AssemblyFileVersion
5+
Updated version file for 1.12
6+
Removed some whitespace (formatting issues in code only)
7+
38
3.4.3.4
49
Fixed update of Vertical Snap keycode
510
Added AssemblyFileVersion

EditorExtensionsRedux.version

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@
66
"MAJOR": 3,
77
"MINOR": 4,
88
"PATCH": 3,
9-
"BUILD": 4
9+
"BUILD": 5
10+
},
11+
"KSP_VERSION": {
12+
"MAJOR": 1,
13+
"MINOR": 12,
14+
"PATCH": 0
1015
},
1116
"KSP_VERSION_MIN": {
1217
"MAJOR": 1,

EditorExtensionsRedux/AppLauncherButton.cs

Lines changed: 5 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -47,72 +47,12 @@ private void ButtonState (bool state)
4747
/// Copied from ToolbarController
4848
/// </summary>
4949
///
50-
//
51-
// The following function was initially copied from @JPLRepo's AmpYear mod, which is covered by the GPL, as is this mod
52-
//
53-
// This function will attempt to load either a PNG or a JPG from the specified path.
54-
// It first checks to see if the actual file is there, if not, it then looks for either a PNG or a JPG
55-
//
56-
// easier to specify different cases than to change case to lower. This will fail on MacOS and Linux
57-
// if a suffix has mixed case
58-
static string[] imgSuffixes = new string[] { ".png", ".jpg", ".gif", ".PNG", ".JPG", ".GIF" };
59-
public static Boolean LoadImageFromFile(ref Texture2D tex, String fileNamePath)
60-
{
61-
62-
Boolean blnReturn = false;
63-
try
64-
{
65-
string path = fileNamePath;
66-
if (!System.IO.File.Exists(fileNamePath))
67-
{
68-
// Look for the file with an appended suffix.
69-
for (int i = 0; i < imgSuffixes.Length; i++)
70-
71-
if (System.IO.File.Exists(fileNamePath + imgSuffixes[i]))
72-
{
73-
path = fileNamePath + imgSuffixes[i];
74-
break;
75-
}
76-
}
77-
50+
// // The following function was initially copied from @JPLRepo's AmpYear mod, which is covered by the GPL, as is this mod // // This function will attempt to load either a PNG or a JPG from the specified path. // It first checks to see if the actual file is there, if not, it then looks for either a PNG or a JPG // // easier to specify different cases than to change case to lower. This will fail on MacOS and Linux // if a suffix has mixed case
51+
static string[] imgSuffixes = new string[] { ".png", ".jpg", ".gif", ".PNG", ".JPG", ".GIF" }; public static Boolean LoadImageFromFile(ref Texture2D tex, String fileNamePath) { Boolean blnReturn = false; try { string path = fileNamePath; if (!System.IO.File.Exists(fileNamePath)) { // Look for the file with an appended suffix. for (int i = 0; i < imgSuffixes.Length; i++) if (System.IO.File.Exists(fileNamePath + imgSuffixes[i])) { path = fileNamePath + imgSuffixes[i]; break; } }
7852
//File Exists check
79-
if (System.IO.File.Exists(path))
80-
{
81-
try
82-
{
83-
tex.LoadImage(System.IO.File.ReadAllBytes(path));
84-
blnReturn = true;
85-
}
86-
catch (Exception ex)
87-
{
88-
Log.Error("Failed to load the texture:" + path);
89-
Log.Error(ex.Message);
90-
}
91-
}
92-
else
93-
{
94-
Log.Error("Cannot find texture to load:" + fileNamePath);
95-
}
96-
97-
98-
}
99-
catch (Exception ex)
100-
{
101-
Log.Error("Failed to load (are you missing a file):" + fileNamePath);
102-
Log.Error(ex.Message);
103-
}
104-
return blnReturn;
105-
}
106-
107-
Texture2D GetTexture(string path, bool b)
108-
{
109-
110-
Texture2D tex = new Texture2D(16, 16, TextureFormat.ARGB32, false);
111-
112-
if (LoadImageFromFile(ref tex, KSPUtil.ApplicationRootPath + "GameData/" + path))
113-
return tex;
114-
return tex;
115-
}
53+
if (System.IO.File.Exists(path)) { try { tex.LoadImage(System.IO.File.ReadAllBytes(path)); blnReturn = true; } catch (Exception ex) { Log.Error("Failed to load the texture:" + path); Log.Error(ex.Message); } } else { Log.Error("Cannot find texture to load:" + fileNamePath); } } catch (Exception ex) { Log.Error("Failed to load (are you missing a file):" + fileNamePath); Log.Error(ex.Message); } return blnReturn; }
54+
Texture2D GetTexture(string path, bool b) { Texture2D tex = new Texture2D(16, 16, TextureFormat.ARGB32, false);
55+
if (LoadImageFromFile(ref tex, KSPUtil.ApplicationRootPath + "GameData/" + path)) return tex; return tex; }
11656
/// <summary>
11757
/// End of copy
11858
/// </summary>

0 commit comments

Comments
 (0)