Skip to content

Commit 8d0b7c0

Browse files
committed
2.0.7 : fix changing some default UI font size
1 parent f4b2eb2 commit 8d0b7c0

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
1818
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
1919

20-
[assembly: AssemblyVersion("2.0.6")]
20+
[assembly: AssemblyVersion("2.0.7")]
2121

2222
// The following attributes are used to specify the signing key for the assembly,
2323
// if desired. See the Mono documentation for more information about signing.

moduleManager.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -480,21 +480,26 @@ public void Update()
480480

481481
static string status = "Processing Module Manager patch\nPlease Wait...";
482482
static string errors = "";
483+
484+
GUISkin mmSkin;
483485

484486
public void OnGUI()
485487
{
486488
if (HighLogic.LoadedScene != GameScenes.LOADING)
487-
return;
488-
489-
var centeredStyle = GUI.skin.GetStyle("Label");
489+
return;
490+
491+
if (mmSkin == null)
492+
mmSkin = (GUISkin)GameObject.Instantiate(GUI.skin);
493+
494+
var centeredStyle = mmSkin.GetStyle("Label");
490495
centeredStyle.alignment = TextAnchor.UpperCenter;
491496
centeredStyle.fontSize = 16;
492497
Vector2 sizeOfLabel = centeredStyle.CalcSize(new GUIContent(status));
493498
GUI.Label(new Rect(Screen.width / 2 - (sizeOfLabel.x / 2), Mathf.FloorToInt(0.8f * Screen.height), sizeOfLabel.x, sizeOfLabel.y), status, centeredStyle);
494499

495500
if (errorCount > 0)
496501
{
497-
var errorStyle = GUI.skin.GetStyle("Label");
502+
var errorStyle = mmSkin.GetStyle("Label");
498503
errorStyle.alignment = TextAnchor.UpperLeft;
499504
errorStyle.fontSize = 16;
500505
Vector2 sizeOfError = errorStyle.CalcSize(new GUIContent(errors));

0 commit comments

Comments
 (0)