Kerbal Space Program
1.12.4
|
The main frame/window of the Maneuver Tool More...
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... | |
The main frame/window of the Maneuver Tool
|
inline |
Activate a planet in the Visualizer window
bodyName | |
position |
|
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.
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 local position and scale based on the passed in values.
prefab | |
localPosition | |
localScale |
|
inline |
Add a method to the ErrorStateChanged delegate method call stack. This stack will be called whenever the Error State changes.
method |
|
inline |
Add a method to the SidePanelClicked delegate method call stack. Will be called when the side panel (visualizer is opened/closed).
method |
|
inline |
Deactivate a planet in the Visualizer Window
bodyName |
|
inline |
Deactivate a planet in the Visualizer Window
planet |
|
inline |
Find a Planet and return it from the planet objects.
bodyName |
delegate void KSP.UI.ManeuverToolUIFrame.OnActionDelegate | ( | bool | state | ) |
delegate void KSP.UI.ManeuverToolUIFrame.OnErrorStateDelegate | ( | bool | state | ) |
|
inline |
Remove an object from the Visualizer window by name.
name |
|
inline |
Remove a method to the ErrorStateChanged delegate method call stack.
method |
|
inline |
Remove a method to the SidePanelClicked delegate method call stack.
method |
|
inline |
Changes the UI components based on the current calculation state. Is automatically called when TransferDatabase.CalculationState is changed.
state | The current calculation state |
percentage | The percentage complete whilst calculating |
|
inline |
Set the interactable state of the Create Maneuver Button.
interactable |
|
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.
state | True if we are in error mode, otherwise false if all good. |
text | The text to display. |
data | The data class instance reference for the inputPanel. |
onDataChanged | A callback that will be given to the inputPanel to call when any of it's controls data are changed. |
|
inline |
Set the text for the header for the transfer type.
text |
|
inline |
Updates the Help text at the bottom of the UI.
text | Should be the formatted text to display |
|
inline |
Set the header strings for the Top Panel
topHeader | |
col1Header | |
col2Header | |
col3Header |
|
inline |
Set the TopPanel active or inactive.
state |
|
inline |
Set the SidePanel active or inactive.
state |
|
inline |
Transition the Top Panel immediately to it's current state.
|
inline |
Transition the Visual Panel immediately to it's current state.
|
inline |
Updates the dV Text at the bottom of the UI.
text | Should be the formatted text to display |
|
inline |
Updates the Time Text at the bottom of the UI.
text | Should be the formatted text to display |
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 |
|
get |
Is the App/Transfer currently in an error state or not? This is set via SetErrorState method.
|
get |
Is the Top slide out panel active or not? Set it off or on using the method SetTopPanel(state)
|
get |
Is the Top Panel currently extended or not?
|
get |
Is the Top panel transitioning in or out?
|
get |
Is the Visual(side) slide out panel active or not? Set it off or on using the method SetTopPanel(state)
|
get |
Is the Side Panel currently extended or not?
|
get |
Is the Visual Panel transitioning in or out?