Click or drag to resize

GuiScaledSkinScaleGuiStyle Method

Makes a style that respects the provided scale factor.

Namespace:  KSPDev.GUIUtils
Assembly:  KSPDev_Utils.2.6 (in KSPDev_Utils.2.6.dll) Version: 2.6 for KSP v1
Syntax
C#
public static GUIStyle ScaleGuiStyle(
	GUISkin originalSkin,
	GUIStyle originalStyle,
	float guiScale
)
Request Example View Source

Parameters

originalSkin
Type: UnityEngineGUISkin
The skin that is a base for the scaling.
originalStyle
Type: UnityEngineGUIStyle
The style to get values from.
guiScale
Type: SystemSingle
The scale factor, where 1.0 means "exactly as in the original".

Return Value

Type: GUIStyle
A scaled style. The default font size will be overwritten.
Remarks
This method overrides the default font usage. The resulted style will be overriding the font size, even if the original style wasn't assuming it. It may have performance or UI consequences.
See Also