Table of Contents

Class UIManager

Namespace
KSP.Game
Assembly
Assembly-CSharp.dll
public class UIManager : KerbalMonoBehaviour
Inheritance
UIManager
Inherited Members
Extension Methods

Constructors

UIManager()

public UIManager()

Fields

Curtain

public Curtain Curtain

Field Value

Curtain

LoadingBar

public LoadingBar LoadingBar

Field Value

LoadingBar

NotificationDeliveryIcon

public Sprite NotificationDeliveryIcon

Field Value

Sprite

NotificationDotsIcon

public Sprite NotificationDotsIcon

Field Value

Sprite

NotificationPlanetIcon

public Sprite NotificationPlanetIcon

Field Value

Sprite

NotificationRocketIcon

public Sprite NotificationRocketIcon

Field Value

Sprite

NotificationWarningIcon

public Sprite NotificationWarningIcon

Field Value

Sprite

PropertyAdmin

public Property<string> PropertyAdmin

Field Value

Property<string>

PropertyGameMode

public Property<string> PropertyGameMode

Field Value

Property<string>

PropertyGameState

public Property<GameState> PropertyGameState

Field Value

Property<GameState>

PropertyIsMultiplayer

public Property<bool> PropertyIsMultiplayer

Field Value

Property<bool>

PropertyPlayerAgency

public Property<string> PropertyPlayerAgency

Field Value

Property<string>

PropertyPlayerFlag

public Property<Sprite> PropertyPlayerFlag

Field Value

Property<Sprite>

PropertyPlayerName

public Property<string> PropertyPlayerName

Field Value

Property<string>

PropertyPlayerPlayTime

public Property<long> PropertyPlayerPlayTime

Field Value

Property<long>

PropertyPlayerScience

public Property<float> PropertyPlayerScience

Field Value

Property<float>

PropertyServerName

public Property<string> PropertyServerName

Field Value

Property<string>

TextVersionNumber

public TextMeshProUGUI TextVersionNumber

Field Value

TextMeshProUGUI

ZoomModeInfo

public ZoomModeInfo ZoomModeInfo

Field Value

ZoomModeInfo

Properties

ContextPanelController

public ContextPanelController ContextPanelController { get; }

Property Value

ContextPanelController

DebugPanel

public DebugPanelManager DebugPanel { get; }

Property Value

DebugPanelManager

EscapeMenu

public GlobalEscapeMenu EscapeMenu { get; }

Property Value

GlobalEscapeMenu

FlightHud

public UIFlightHud FlightHud { get; }

Property Value

UIFlightHud

GlobalDataContext

public DataContext GlobalDataContext { get; }

Property Value

DataContext

GlobalHeader

public GlobalHeaderManager GlobalHeader { get; }

Property Value

GlobalHeaderManager

HighlightProvider

public HighlightProvider HighlightProvider { get; }

Property Value

HighlightProvider

IndicatorProvider

public IndicatorProvider IndicatorProvider { get; }

Property Value

IndicatorProvider

Initialized

public bool Initialized { get; }

Property Value

bool

KSCMenu

public KSCMenuManager KSCMenu { get; }

Property Value

KSCMenuManager

NotificationProvider

public NotificationUIProvider NotificationProvider { get; }

Property Value

NotificationUIProvider

OutlineManager

public ObjectOutlinesManager OutlineManager { get; }

Property Value

ObjectOutlinesManager

OutlinesLayerName

public string OutlinesLayerName { get; set; }

Property Value

string

PartUnderMouse

public PartBehavior PartUnderMouse { get; }

Property Value

PartBehavior

ScaleController

public UIScaleController ScaleController { get; }

Property Value

UIScaleController

TooltipProvider

public TooltipProvider TooltipProvider { get; }

Property Value

TooltipProvider

ViewController

public UIViewController ViewController { get; }

Property Value

UIViewController

Methods

ClearAllModules()

public void ClearAllModules()

CreateCanvas(string)

public Canvas CreateCanvas(string name)

Parameters

name string

Returns

Canvas

Create<TModule>(Transform)

public TModule Create<TModule>(Transform parent) where TModule : UIModule

Parameters

parent Transform

Returns

TModule

Type Parameters

TModule

DismissMessageBox()

public void DismissMessageBox()

DismissTutorialFullScreenVideo()

public void DismissTutorialFullScreenVideo()

DismissTutorialMessageBox()

public void DismissTutorialMessageBox()

GetCurtainContextByLocation(SerializedLocation)

public CurtainContext GetCurtainContextByLocation(SerializedLocation location)

Parameters

location SerializedLocation

Returns

CurtainContext

GetDebugPanelManager()

public DebugPanelManager GetDebugPanelManager()

Returns

DebugPanelManager

GetOrCreatePopup<TModule>()

public TModule GetOrCreatePopup<TModule>() where TModule : UIModule

Returns

TModule

Type Parameters

TModule

GetOrCreate<TModule>()

public TModule GetOrCreate<TModule>() where TModule : UIModule

Returns

TModule

Type Parameters

TModule

GetOrCreate<TModule>(Canvas)

public TModule GetOrCreate<TModule>(Canvas targetCanvas) where TModule : UIModule

Parameters

targetCanvas Canvas

Returns

TModule

Type Parameters

TModule

GetOrthographicCollection()

public GameObject GetOrthographicCollection()

Returns

GameObject

GetPopupCanvas()

public Canvas GetPopupCanvas()

Returns

Canvas

GetResearchDevelopmentCanvas()

public Canvas GetResearchDevelopmentCanvas()

Returns

Canvas

GetRootCanvas()

public Canvas GetRootCanvas()

Returns

Canvas

GetScaledMainCanvas()

public Canvas GetScaledMainCanvas()

Returns

Canvas

GetScaledPopupCanvas()

public Canvas GetScaledPopupCanvas()

Returns

Canvas

GetViewportPositionFromUITransformInOverlayCanvas(Transform)

public Vector2 GetViewportPositionFromUITransformInOverlayCanvas(Transform t)

Parameters

t Transform

Returns

Vector2

Get<TModule>()

public TModule Get<TModule>() where TModule : UIModule

Returns

TModule

Type Parameters

TModule

HideMapIfVisible()

public void HideMapIfVisible()

HidePause()

public void HidePause()

IsEscapeVisible()

public bool IsEscapeVisible()

Returns

bool

LoadAndShowMessageBox(string, string, Image, List<ButtonData>, bool, bool, string, bool)

public void LoadAndShowMessageBox(string title, string text, Image icon, List<ButtonData> buttonData, bool modal = true, bool cancelButton = false, string cancelButtonText = "", bool showCloseIcon = true)

Parameters

title string
text string
icon Image
buttonData List<ButtonData>
modal bool
cancelButton bool
cancelButtonText string
showCloseIcon bool

LoadMap()

public void LoadMap()

LoadUI(Action)

public void LoadUI(Action onComplete)

Parameters

onComplete Action

Pool(UIModule)

public void Pool(UIModule module)

Parameters

module UIModule

SetCurtainContext(CurtainContext)

public void SetCurtainContext(CurtainContext curtainContext)

Parameters

curtainContext CurtainContext

SetCurtainContextData(CurtainContextData)

public void SetCurtainContextData(CurtainContextData curtainContextData)

Parameters

curtainContextData CurtainContextData

SetCurtainContextForLaunchLocation(SerializedLocation)

public void SetCurtainContextForLaunchLocation(SerializedLocation location)

Parameters

location SerializedLocation

SetCurtainContextOrSpectatedContext(CurtainContext)

public void SetCurtainContextOrSpectatedContext(CurtainContext curtainContext)

Parameters

curtainContext CurtainContext

SetCurtainVisibility(bool, Action)

public void SetCurtainVisibility(bool isVisible, Action onTransitionFinished = null)

Parameters

isVisible bool
onTransitionFinished Action

SetLoadingBarPercentComplete(float)

public void SetLoadingBarPercentComplete(float percent)

Parameters

percent float

SetLoadingBarText(string)

public void SetLoadingBarText(string text)

Parameters

text string

SetLoadingBarVisibility(bool, Action)

public void SetLoadingBarVisibility(bool isVisible, Action onTransitionFinished = null)

Parameters

isVisible bool
onTransitionFinished Action

SetPauseVisible(bool)

public void SetPauseVisible(bool isVisible)

Parameters

isVisible bool

SetVersionNumberVisibility(bool)

public void SetVersionNumberVisibility(bool isVisible)

Parameters

isVisible bool

ShowMessageBox(string, string, Image, List<ButtonData>, bool, bool, string, bool)

public void ShowMessageBox(string title, string text, Image icon, List<ButtonData> buttonData, bool modal = true, bool cancelButton = false, string cancelButtonText = "", bool showCloseIcon = true)

Parameters

title string
text string
icon Image
buttonData List<ButtonData>
modal bool
cancelButton bool
cancelButtonText string
showCloseIcon bool

ShowPause()

public void ShowPause()

ShowTutorialFullScreenVideo(string, Type, bool)

public void ShowTutorialFullScreenVideo(string scriptablePath, Type eventTypeOnClose, bool showControls = false)

Parameters

scriptablePath string
eventTypeOnClose Type
showControls bool

ShowTutorialMessageBox(string, string, string, Type, TutorialMessageBoxButtonType, string, string, string, bool, MessageDescriptions, bool, bool, Vector2, bool, Vector2, Vector2, bool, Vector2)

public void ShowTutorialMessageBox(string windowTitle, string title, string description, Type eventTypeDismiss, TutorialMessageBoxButtonType buttonType, string imageName, string playerClip, string nextMissionID, bool isMissionSummary, MessageDescriptions messageDescriptions, bool resetPositionToDefault = false, bool useCustomPosition = false, Vector2 customPosition = null, bool useCustomAnchor = false, Vector2 customAnchorMin = null, Vector2 customAnchorMax = null, bool useCustomPivot = false, Vector2 customPivot = null)

Parameters

windowTitle string
title string
description string
eventTypeDismiss Type
buttonType TutorialMessageBoxButtonType
imageName string
playerClip string
nextMissionID string
isMissionSummary bool
messageDescriptions MessageDescriptions
resetPositionToDefault bool
useCustomPosition bool
customPosition Vector2
useCustomAnchor bool
customAnchorMin Vector2
customAnchorMax Vector2
useCustomPivot bool
customPivot Vector2

Start()

public void Start()

ToggleEscapeVisible()

public void ToggleEscapeVisible()

TransitionAwayFromMapState()

public void TransitionAwayFromMapState()