Skip to content
This repository was archived by the owner on Nov 7, 2024. It is now read-only.

Commit e85b4e5

Browse files
author
DaZombieKiller
committed
Restore GUI style at end of OnGUI
1 parent f7e3352 commit e85b4e5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Source/SrDebugDirector.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,10 @@ private void OnGUI()
227227
if (!_showHelp)
228228
return;
229229

230+
Font oldFont = GUI.skin.label.font;
231+
TextAnchor oldAnchor = GUI.skin.label.alignment;
232+
Color oldTextColor = GUI.skin.label.normal.textColor;
233+
230234
GUI.skin.label.font = _helpFont;
231235
GUI.skin.label.alignment = TextAnchor.LowerRight;
232236

@@ -267,5 +271,9 @@ private void OnGUI()
267271

268272
GUI.skin.label.normal.textColor = Color.white;
269273
GUI.Label(new Rect(0, 0, Screen.width, Screen.height), helpMessage);
274+
275+
GUI.skin.label.font = oldFont;
276+
GUI.skin.label.alignment = oldAnchor;
277+
GUI.skin.label.normal.textColor = oldTextColor;
270278
}
271279
}

0 commit comments

Comments
 (0)