Click or drag to resize

GuiScale Constructor

Creates a scaled skin instance.

Namespace:  KSPDev.GUIUtils
Assembly:  KSPDev_Utils.2.6 (in KSPDev_Utils.2.6.dll) Version: 2.6 for KSP v1
Syntax
C#
public GuiScale(
	Func<Vector2> getPivotFn,
	Action onScaleUpdatedFn = null
)
Request Example View Source

Parameters

getPivotFn
Type: SystemFuncVector2
A function that returns the pivot point for the scale transformation. In a regular usual case, this method returns the position top-left corner of the last known dialog position.
onScaleUpdatedFn (Optional)
Type: SystemAction
A callback which will be called every time the game's UI scale is updated. The mods can react on it to update their internal cached styles. This callback is processed from the UpdateMatrix method.
See Also