GuiScaledSkin Class |
Namespace: KSPDev.GUIUtils
The GuiScaledSkin type exposes the following members.
Name | Description | |
---|---|---|
GuiScaledSkin | Creates a scaled skin instance. |
Name | Description | |
---|---|---|
guiScale | The scale setting which this instance currently tracks. | |
guiTitleHeight | The dialog title height with this skin applied. | |
scaledSkin | The skin that is scaled to the current game's settings. |
Name | Description | |
---|---|---|
Finalize | Unregisters any game's callbacks. (Overrides ObjectFinalize.) | |
ScaleGuiStyle | Makes a style that respects the provided scale factor. | |
ScaleRectOffset | Scales the provided RectOffset by the scale factor. |
Name | Description | |
---|---|---|
scaledSkinIsDirty | Tells if the skin must be recalculated on the next access to scaledSkin. |
GuiScaledSkin _guiScaledSkin; void OnAwake() { _guiScaledSkin = new GuiScaledSkin(() => GUI.skin); } void OnGUI() { using (new GuiSkinScope(GuiScaledSkin.scaledSkin) { _windowRect = GUILayout.Window(GetInstanceID(), _windowRect, WindowFunc, WindowTitle); } }