Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Public Attributes | Properties | List of all members
KSP.UI.ManeuverToolUIFrame Class Reference

The main frame/window of the Maneuver Tool More...

Inheritance diagram for KSP.UI.ManeuverToolUIFrame:
KSP.UI.GenericAppFrame

Public Member Functions

ManeuverToolCBContainer ActivatePlanet (string bodyName, Vector2 position, float scale)
 Activate a planet in the Visualizer window More...
 
GameObject AddObjectToVisualizerWindow (GameObject prefab)
 Add an instance of a prefab to the Visualizer Window. This method will create an instance of the passed in GameObject and parent it to the side panel window. It will set it's position to the centre of the window and it's scale to one. More...
 
GameObject AddObjectToVisualizerWindow (GameObject prefab, Vector2 localPosition, Vector3 localScale)
 Add an instance of a prefab to the Visualizer Window. This method will create an instance of the passed in GameObject and parent it to the side panel window. It will set it's local position and scale based on the passed in values. More...
 
void AddOnErrorStateChanged (OnErrorStateDelegate method)
 Add a method to the ErrorStateChanged delegate method call stack. This stack will be called whenever the Error State changes. More...
 
void AddOnSidePanelClicked (OnActionDelegate method)
 Add a method to the SidePanelClicked delegate method call stack. Will be called when the side panel (visualizer is opened/closed). More...
 
void DeactivatePlanet (string bodyName)
 Deactivate a planet in the Visualizer Window More...
 
void DeactivatePlanet (ManeuverToolCBContainer planet)
 Deactivate a planet in the Visualizer Window More...
 
ManeuverToolCBContainer FindPlanet (string bodyName)
 Find a Planet and return it from the planet objects. More...
 
delegate void OnActionDelegate (bool state)
 
delegate void OnErrorStateDelegate (bool state)
 
bool RemoveObjectFromVisualizerWindow (string name)
 Remove an object from the Visualizer window by name. More...
 
void RemoveOnErrorStateChanged (OnErrorStateDelegate method)
 Remove a method to the ErrorStateChanged delegate method call stack. More...
 
void RemoveOnSidePanelClicked (OnActionDelegate method)
 Remove a method to the SidePanelClicked delegate method call stack. More...
 
void SetCalculationState (TransferDataBase.ManeuverCalculationState state, int percentage)
 Changes the UI components based on the current calculation state. Is automatically called when TransferDatabase.CalculationState is changed. More...
 
void SetCreateManeuverButton (bool interactable)
 Set the interactable state of the Create Maneuver Button. More...
 
void SetErrorState (bool state, string text, AppUI_Data data, bool toggleInputPanel, Callback onDataChanged)
 Set error text to the text string and toggle the errorText object and inputPanel on/off. Note: this means the inputPanel data will be destroyed from the UI. More...
 
void SetHeaderText (string text)
 Set the text for the header for the transfer type. More...
 
void SetHelpString (string text)
 Updates the Help text at the bottom of the UI. More...
 
void SetTopPanelHeader (string topHeader, string col1Header, string col2Header, string col3Header)
 Set the header strings for the Top Panel More...
 
void SetTopPanelState (bool state)
 Set the TopPanel active or inactive. More...
 
void SetVisualPanelState (bool state)
 Set the SidePanel active or inactive. More...
 
void TransitionTopPanelImmediate ()
 Transition the Top Panel immediately to it's current state. More...
 
void TransitionVisualPanelImmediate ()
 Transition the Visual Panel immediately to it's current state. More...
 
void UpdateDVText (string text)
 Updates the dV Text at the bottom of the UI. More...
 
void UpdateTimeText (string text)
 Updates the Time Text at the bottom of the UI. More...
 
- Public Member Functions inherited from KSP.UI.GenericAppFrame
void AddGlobalInputDelegate (UnityAction< PointerEventData > pointerEnter, UnityAction< PointerEventData > pointerExit)
 
void AutoScale ()
 
void OnBeginDragFooter (PointerEventData eventData)
 
void OnBeginDragHeader (PointerEventData eventData)
 
void OnDragFooter (PointerEventData eventData)
 
void OnDragHeader (PointerEventData eventData)
 
void OnEndDragFooter (PointerEventData eventData)
 
void OnEndDragHeader (PointerEventData eventData)
 
void Reposition ()
 
void Setup (ApplicationLauncherButton appLauncherButton, string appName, string displayName)
 
void Setup (ApplicationLauncherButton appLauncherButton, string appName, string displayName, int width, int height)
 
void Setup (ApplicationLauncherButton appLauncherButton, string appName, string displayName, int width, int height, bool scaleHeightToContainList)
 
void UpdateDraggingBounds (int height)
 
void UpdateDraggingBoundsAtBottom (float height, float pos)
 scale and move the transform so it sticks to the bottom Note: only positions based on sizeDelta are affected by scale. Height is not affected by scaling. More...
 

Public Attributes

KSP.UI.Screens.AppUIInputPanel inputPanel
 
ManeuverTool maneuverApp
 Reference to the ManeuverTool App. More...
 
Vector2 parentBodyLocalPos = new Vector2(-132, 70)
 
TMP_Dropdown positionDropDown
 
Vector2 sourceBodyLocalPos = new Vector2(-126,-168)
 
Vector2 targetBodyLocalPos = new Vector2(94, 154)
 
KSP.UI.Screens.AppUIInputPanel topPanelData
 
TMP_Dropdown transferTypeDropDown
 
AppUIMemberDropdown transferTypeParent
 
- Public Attributes inherited from KSP.UI.GenericAppFrame
bool anchorToAppButton = false
 Force the app frame to be anchored to the button More...
 
DragHandler dragFooter
 
DragHandler dragHeader
 
Image gfxBg
 
Image gfxFooter
 
Image gfxHeader
 
TMPro.TextMeshProUGUI header
 
PointerEnterExitHandler hoverController
 
int maxHeight = 476
 
int minHeight = 176
 
UIList scrollList
 

Properties

bool ErrorState [get]
 Is the App/Transfer currently in an error state or not? This is set via SetErrorState method. More...
 
bool TopPanelActive [get]
 Is the Top slide out panel active or not? Set it off or on using the method SetTopPanel(state) More...
 
bool TopPanelExtended [get]
 Is the Top Panel currently extended or not? More...
 
bool TopPanelTransitioning [get]
 Is the Top panel transitioning in or out? More...
 
bool VisualPanelActive [get]
 Is the Visual(side) slide out panel active or not? Set it off or on using the method SetTopPanel(state) More...
 
bool VisualPanelExtended [get]
 Is the Side Panel currently extended or not? More...
 
bool VisualPanelTransitioning [get]
 Is the Visual Panel transitioning in or out? More...
 

Detailed Description

The main frame/window of the Maneuver Tool

Member Function Documentation

ManeuverToolCBContainer KSP.UI.ManeuverToolUIFrame.ActivatePlanet ( string  bodyName,
Vector2  position,
float  scale 
)
inline

Activate a planet in the Visualizer window

Parameters
bodyName
position
Returns
GameObject KSP.UI.ManeuverToolUIFrame.AddObjectToVisualizerWindow ( GameObject  prefab)
inline

Add an instance of a prefab to the Visualizer Window. This method will create an instance of the passed in GameObject and parent it to the side panel window. It will set it's position to the centre of the window and it's scale to one.

Parameters
prefab
Returns
The new instance of the prefab
GameObject KSP.UI.ManeuverToolUIFrame.AddObjectToVisualizerWindow ( GameObject  prefab,
Vector2  localPosition,
Vector3  localScale 
)
inline

Add an instance of a prefab to the Visualizer Window. This method will create an instance of the passed in GameObject and parent it to the side panel window. It will set it's local position and scale based on the passed in values.

Parameters
prefab
localPosition
localScale
Returns
void KSP.UI.ManeuverToolUIFrame.AddOnErrorStateChanged ( OnErrorStateDelegate  method)
inline

Add a method to the ErrorStateChanged delegate method call stack. This stack will be called whenever the Error State changes.

Parameters
method
void KSP.UI.ManeuverToolUIFrame.AddOnSidePanelClicked ( OnActionDelegate  method)
inline

Add a method to the SidePanelClicked delegate method call stack. Will be called when the side panel (visualizer is opened/closed).

Parameters
method
void KSP.UI.ManeuverToolUIFrame.DeactivatePlanet ( string  bodyName)
inline

Deactivate a planet in the Visualizer Window

Parameters
bodyName
void KSP.UI.ManeuverToolUIFrame.DeactivatePlanet ( ManeuverToolCBContainer  planet)
inline

Deactivate a planet in the Visualizer Window

Parameters
planet
ManeuverToolCBContainer KSP.UI.ManeuverToolUIFrame.FindPlanet ( string  bodyName)
inline

Find a Planet and return it from the planet objects.

Parameters
bodyName
Returns
The ManeuverToolCBContainer for the planet, or null if not found.
delegate void KSP.UI.ManeuverToolUIFrame.OnActionDelegate ( bool  state)
delegate void KSP.UI.ManeuverToolUIFrame.OnErrorStateDelegate ( bool  state)
bool KSP.UI.ManeuverToolUIFrame.RemoveObjectFromVisualizerWindow ( string  name)
inline

Remove an object from the Visualizer window by name.

Parameters
name
Returns
True if a match is found and removed, otherwise false.
void KSP.UI.ManeuverToolUIFrame.RemoveOnErrorStateChanged ( OnErrorStateDelegate  method)
inline

Remove a method to the ErrorStateChanged delegate method call stack.

Parameters
method
void KSP.UI.ManeuverToolUIFrame.RemoveOnSidePanelClicked ( OnActionDelegate  method)
inline

Remove a method to the SidePanelClicked delegate method call stack.

Parameters
method
void KSP.UI.ManeuverToolUIFrame.SetCalculationState ( TransferDataBase.ManeuverCalculationState  state,
int  percentage 
)
inline

Changes the UI components based on the current calculation state. Is automatically called when TransferDatabase.CalculationState is changed.

Parameters
stateThe current calculation state
percentageThe percentage complete whilst calculating
void KSP.UI.ManeuverToolUIFrame.SetCreateManeuverButton ( bool  interactable)
inline

Set the interactable state of the Create Maneuver Button.

Parameters
interactable
void KSP.UI.ManeuverToolUIFrame.SetErrorState ( bool  state,
string  text,
AppUI_Data  data,
bool  toggleInputPanel,
Callback  onDataChanged 
)
inline

Set error text to the text string and toggle the errorText object and inputPanel on/off. Note: this means the inputPanel data will be destroyed from the UI.

Parameters
stateTrue if we are in error mode, otherwise false if all good.
textThe text to display.
dataThe data class instance reference for the inputPanel.
onDataChangedA callback that will be given to the inputPanel to call when any of it's controls data are changed.
void KSP.UI.ManeuverToolUIFrame.SetHeaderText ( string  text)
inline

Set the text for the header for the transfer type.

Parameters
text
void KSP.UI.ManeuverToolUIFrame.SetHelpString ( string  text)
inline

Updates the Help text at the bottom of the UI.

Parameters
textShould be the formatted text to display
void KSP.UI.ManeuverToolUIFrame.SetTopPanelHeader ( string  topHeader,
string  col1Header,
string  col2Header,
string  col3Header 
)
inline

Set the header strings for the Top Panel

Parameters
topHeader
col1Header
col2Header
col3Header
void KSP.UI.ManeuverToolUIFrame.SetTopPanelState ( bool  state)
inline

Set the TopPanel active or inactive.

Parameters
state
void KSP.UI.ManeuverToolUIFrame.SetVisualPanelState ( bool  state)
inline

Set the SidePanel active or inactive.

Parameters
state
void KSP.UI.ManeuverToolUIFrame.TransitionTopPanelImmediate ( )
inline

Transition the Top Panel immediately to it's current state.

void KSP.UI.ManeuverToolUIFrame.TransitionVisualPanelImmediate ( )
inline

Transition the Visual Panel immediately to it's current state.

void KSP.UI.ManeuverToolUIFrame.UpdateDVText ( string  text)
inline

Updates the dV Text at the bottom of the UI.

Parameters
textShould be the formatted text to display
void KSP.UI.ManeuverToolUIFrame.UpdateTimeText ( string  text)
inline

Updates the Time Text at the bottom of the UI.

Parameters
textShould be the formatted text to display

Member Data Documentation

KSP.UI.Screens.AppUIInputPanel KSP.UI.ManeuverToolUIFrame.inputPanel
ManeuverTool KSP.UI.ManeuverToolUIFrame.maneuverApp

Reference to the ManeuverTool App.

Vector2 KSP.UI.ManeuverToolUIFrame.parentBodyLocalPos = new Vector2(-132, 70)
TMP_Dropdown KSP.UI.ManeuverToolUIFrame.positionDropDown
Vector2 KSP.UI.ManeuverToolUIFrame.sourceBodyLocalPos = new Vector2(-126,-168)
Vector2 KSP.UI.ManeuverToolUIFrame.targetBodyLocalPos = new Vector2(94, 154)
KSP.UI.Screens.AppUIInputPanel KSP.UI.ManeuverToolUIFrame.topPanelData
TMP_Dropdown KSP.UI.ManeuverToolUIFrame.transferTypeDropDown
AppUIMemberDropdown KSP.UI.ManeuverToolUIFrame.transferTypeParent

Property Documentation

bool KSP.UI.ManeuverToolUIFrame.ErrorState
get

Is the App/Transfer currently in an error state or not? This is set via SetErrorState method.

bool KSP.UI.ManeuverToolUIFrame.TopPanelActive
get

Is the Top slide out panel active or not? Set it off or on using the method SetTopPanel(state)

bool KSP.UI.ManeuverToolUIFrame.TopPanelExtended
get

Is the Top Panel currently extended or not?

bool KSP.UI.ManeuverToolUIFrame.TopPanelTransitioning
get

Is the Top panel transitioning in or out?

bool KSP.UI.ManeuverToolUIFrame.VisualPanelActive
get

Is the Visual(side) slide out panel active or not? Set it off or on using the method SetTopPanel(state)

bool KSP.UI.ManeuverToolUIFrame.VisualPanelExtended
get

Is the Side Panel currently extended or not?

bool KSP.UI.ManeuverToolUIFrame.VisualPanelTransitioning
get

Is the Visual Panel transitioning in or out?


The documentation for this class was generated from the following file: