Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Classes | Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Properties | List of all members
UIPartActionWindow Class Reference
Inheritance diagram for UIPartActionWindow:

Public Types

enum  DisplayType { DisplayType.Selected, DisplayType.ResourceOnly, DisplayType.ResourceSelected }
 

Public Member Functions

void AddAeroControl (Part p)
 
void AddEventControl (BaseEvent evt, Part part, PartModule module)
 
void AddFieldControl (BaseField field, Part part, PartModule module)
 
void AddFuelFlowOverlay (Part p)
 
void AddResourceEditorControl (PartResource r)
 
void AddResourceFlightControl (PartResource r)
 
void AddResourcePriorityControl (Part p)
 
void AddResourceTransferControl (PartResource r)
 
void AddRoboticJointControl (Part p)
 
void AddThermalControl (Part p)
 
void Awake ()
 
bool CanActivateAeroDisplay (Part p)
 
bool CanActivateEvent (BaseEvent evt, Part p, UI_Scene scene)
 
bool CanActivateField (BaseField fld, Part p, UI_Scene scene)
 
bool CanActivateFuelFlowOverlay (Part p)
 
bool CanActivateResource (PartResource rsrc, Part p, UI_Scene scene)
 
bool CanActivateResourcePriorityDisplay (Part p)
 
bool CanActivateRoboticJointDisplay (Part p)
 
bool CanActivateThermalDisplay (Part p)
 
void ClearList ()
 
void CloseAllColorPickers (UIPartActionColorPicker caller)
 
bool ContainsResourceControl (PartResource r)
 Returns true if the PAW contains a UIPartActionResource item that matches the passed in resource More...
 
bool ContainsResourceTransferControl (PartResource resource, out UIPartActionResourceTransfer control)
 Returns true if the PAW has a UIPartActionResourceTransfer item that mathces the passed in resource. More...
 
bool CreatePartList (bool clearFirst)
 
bool GetPartHover ()
 
void OnBeginDrag (PointerEventData eventData)
 
void OnDestroy ()
 
void OnDrag (PointerEventData eventData)
 
void OnEnable ()
 
void OnEndDrag (PointerEventData eventData)
 
void OnGameSettingsApplied ()
 
void OnNumericSwap (bool numeric)
 Slider swaps for numbers in Slider fields. More...
 
void OnPin (bool pinned)
 
void OnPointerEnter (PointerEventData eventData)
 
void OnPointerExit (PointerEventData eventData)
 
void PointerUpdate ()
 
void RecyclePartList ()
 
void RefreshResourceTransferTargets ()
 Refresh the target (other parts for transfer) for all UIPartActionResourceTransfer items in the PAW More...
 
bool RemoveAeroControl (Part p)
 
bool RemoveEventControl (BaseEvent evt, Part part, PartModule module)
 
bool RemoveFieldControl (BaseField field, Part part, PartModule module)
 
bool RemoveFuelFlowOverlay (Part p)
 
void RemoveGroup (string groupName)
 Removes a group from the Dictionary. More...
 
bool RemoveResourceControlEditor (PartResource r)
 
bool RemoveResourceControlFlight (PartResource r)
 
bool RemoveResourcePriorityControl (Part p)
 
bool RemoveResourceTransferControl (PartResource r)
 
bool RemoveRoboticJointControl (Part p)
 
bool RemoveThermalControl (Part p)
 
void RepositionWindow (Transform partTransform, Camera cam)
 
bool Setup (Part part, DisplayType type, UI_Scene scene)
 
void SetupResourceControls (PartResource r, bool clearFirst, UI_Scene scene, ref int controlIndex)
 
void Start ()
 
void TrackPartPosition ()
 
UIPartActionAeroDisplay TrySetAeroControl (Part r)
 
UIPartActionButton TrySetEventControl (BaseEvent evt, Part part, PartModule module)
 
UIPartActionFieldItem TrySetFieldControl (BaseField field, Part part, PartModule module)
 
UIPartActionFuelFlowOverlay TrySetFuelFlowOverlay (Part r)
 
UIPartActionResourceEditor TrySetResourceControlEditor (PartResource r)
 
UIPartActionResource TrySetResourceControlFlight (PartResource r)
 
UIPartActionResourcePriority TrySetResourcePriorityControl (Part r)
 
UIPartActionResourceTransfer TrySetResourceTransferControl (PartResource r)
 
UIPartActionRoboticJointDisplay TrySetRoboticJointControl (Part r)
 
UIPartActionThermalDisplay TrySetThermalControl (Part r)
 
void UpdateWindow ()
 
void UpdateWindowHeight (float newHeight)
 Update the height that the PAW can expand too. If it needs less space it will not get this big More...
 

Public Attributes

List< UIPartActionColorPickercolorPickers
 All the color pickers in this PAW's hierarchy More...
 
VerticalLayoutGroup layoutGroup
 
Color lineColor
 
float lineCornerRadius = 10f
 
Material lineMaterial
 
float lineWidth = 5f
 
DictionaryValueList< string,
UIPartActionGroup
parameterGroups
 dictionary of UI PAW Groups - key is group name. More...
 
LayerMask partLayerMask
 
bool PreviousResourceOnly
 
RectTransform titleBar
 
TMPro.TextMeshProUGUI titleText
 
Toggle toggleNumeric
 
Toggle togglePinned
 
bool usingNumericValue
 The nmeric sliders in this PAW are in text input mode, PAW items enabled with numeric input field set this. More...
 
float zOffset
 

Protected Member Functions

void AddItem (UIPartActionItem item, int index)
 Adds an item to be displayed in the PAW. More...
 
void RemoveItemAt (int index)
 Removes an item currently displayed in the PAW. More...
 

Protected Attributes

Part _part
 
int controlIndex
 
DisplayType displayType
 
bool hover
 
List< UIPartActionItemlistItems = new List<UIPartActionItem>()
 
bool numericSliders = false
 
bool pinned = false
 
KSP.UI.UIWorldPointer pointer
 
float previousUiScale
 
RectTransform rectTransform
 
UI_Scene scene
 

Properties

DisplayType Display [get, set]
 
bool displayDirty [get, set]
 
bool dragging [get]
 
bool Hover [get]
 
bool isValid [get, set]
 
List< UIPartActionItemListItems [get]
 
bool NumericSliders [get]
 The numeric sliders in this PAW are in text input mode More...
 
Part part [get]
 
bool Pinned [get]
 
KSP.UI.UIWorldPointer Pointer [get]
 
float targetDistanceFromCamera [get, set]
 

Member Enumeration Documentation

Enumerator
Selected 
ResourceOnly 
ResourceSelected 

Member Function Documentation

void UIPartActionWindow.AddAeroControl ( Part  p)
inline
void UIPartActionWindow.AddEventControl ( BaseEvent  evt,
Part  part,
PartModule  module 
)
inline

< Added for Unity 4 Support CJ

void UIPartActionWindow.AddFieldControl ( BaseField  field,
Part  part,
PartModule  module 
)
inline

< Added for Unity 4 Support CJ

void UIPartActionWindow.AddFuelFlowOverlay ( Part  p)
inline
void UIPartActionWindow.AddItem ( UIPartActionItem  item,
int  index 
)
inlineprotected

Adds an item to be displayed in the PAW.

Parameters
itemItem to be added.
indexIndex at which to add the object.
Returns
void UIPartActionWindow.AddResourceEditorControl ( PartResource  r)
inline

< Added for Unity 4 Support CJ

void UIPartActionWindow.AddResourceFlightControl ( PartResource  r)
inline

< Added for Unity 4 Support CJ

void UIPartActionWindow.AddResourcePriorityControl ( Part  p)
inline
void UIPartActionWindow.AddResourceTransferControl ( PartResource  r)
inline

< Added for Unity 4 Support CJ

void UIPartActionWindow.AddRoboticJointControl ( Part  p)
inline
void UIPartActionWindow.AddThermalControl ( Part  p)
inline
void UIPartActionWindow.Awake ( )
inline
bool UIPartActionWindow.CanActivateAeroDisplay ( Part  p)
inline
bool UIPartActionWindow.CanActivateEvent ( BaseEvent  evt,
Part  p,
UI_Scene  scene 
)
inline
bool UIPartActionWindow.CanActivateField ( BaseField  fld,
Part  p,
UI_Scene  scene 
)
inline
bool UIPartActionWindow.CanActivateFuelFlowOverlay ( Part  p)
inline
bool UIPartActionWindow.CanActivateResource ( PartResource  rsrc,
Part  p,
UI_Scene  scene 
)
inline
bool UIPartActionWindow.CanActivateResourcePriorityDisplay ( Part  p)
inline
bool UIPartActionWindow.CanActivateRoboticJointDisplay ( Part  p)
inline
bool UIPartActionWindow.CanActivateThermalDisplay ( Part  p)
inline
void UIPartActionWindow.ClearList ( )
inline
void UIPartActionWindow.CloseAllColorPickers ( UIPartActionColorPicker  caller)
inline
bool UIPartActionWindow.ContainsResourceControl ( PartResource  r)
inline

Returns true if the PAW contains a UIPartActionResource item that matches the passed in resource

Parameters
rThe PartResource to look for
Returns
bool UIPartActionWindow.ContainsResourceTransferControl ( PartResource  resource,
out UIPartActionResourceTransfer  control 
)
inline

Returns true if the PAW has a UIPartActionResourceTransfer item that mathces the passed in resource.

Parameters
resourceThe PartResource to look for
controlWill be the matching UIPartActionResourceTransfer if found, otherwise null
Returns
bool UIPartActionWindow.CreatePartList ( bool  clearFirst)
inline
bool UIPartActionWindow.GetPartHover ( )
inline
void UIPartActionWindow.OnBeginDrag ( PointerEventData  eventData)
inline
void UIPartActionWindow.OnDestroy ( )
inline
void UIPartActionWindow.OnDrag ( PointerEventData  eventData)
inline
void UIPartActionWindow.OnEnable ( )
inline
void UIPartActionWindow.OnEndDrag ( PointerEventData  eventData)
inline
void UIPartActionWindow.OnGameSettingsApplied ( )
inline

it never is in ksp, and if it would be it wouldn't matter sinche the dialog would cover the whole screen then in most cases

void UIPartActionWindow.OnNumericSwap ( bool  numeric)
inline

Slider swaps for numbers in Slider fields.

Parameters
numeric
void UIPartActionWindow.OnPin ( bool  pinned)
inline
void UIPartActionWindow.OnPointerEnter ( PointerEventData  eventData)
inline
void UIPartActionWindow.OnPointerExit ( PointerEventData  eventData)
inline
void UIPartActionWindow.PointerUpdate ( )
inline
void UIPartActionWindow.RecyclePartList ( )
inline
void UIPartActionWindow.RefreshResourceTransferTargets ( )
inline

Refresh the target (other parts for transfer) for all UIPartActionResourceTransfer items in the PAW

bool UIPartActionWindow.RemoveAeroControl ( Part  p)
inline
bool UIPartActionWindow.RemoveEventControl ( BaseEvent  evt,
Part  part,
PartModule  module 
)
inline
bool UIPartActionWindow.RemoveFieldControl ( BaseField  field,
Part  part,
PartModule  module 
)
inline
bool UIPartActionWindow.RemoveFuelFlowOverlay ( Part  p)
inline
void UIPartActionWindow.RemoveGroup ( string  groupName)
inline

Removes a group from the Dictionary.

Parameters
groupName
void UIPartActionWindow.RemoveItemAt ( int  index)
inlineprotected

Removes an item currently displayed in the PAW.

Parameters
indexIndex of the object to be removed.
Returns
bool UIPartActionWindow.RemoveResourceControlEditor ( PartResource  r)
inline
bool UIPartActionWindow.RemoveResourceControlFlight ( PartResource  r)
inline
bool UIPartActionWindow.RemoveResourcePriorityControl ( Part  p)
inline
bool UIPartActionWindow.RemoveResourceTransferControl ( PartResource  r)
inline
bool UIPartActionWindow.RemoveRoboticJointControl ( Part  p)
inline
bool UIPartActionWindow.RemoveThermalControl ( Part  p)
inline
void UIPartActionWindow.RepositionWindow ( Transform  partTransform,
Camera  cam 
)
inline
bool UIPartActionWindow.Setup ( Part  part,
DisplayType  type,
UI_Scene  scene 
)
inline
void UIPartActionWindow.SetupResourceControls ( PartResource  r,
bool  clearFirst,
UI_Scene  scene,
ref int  controlIndex 
)
inline
void UIPartActionWindow.Start ( )
inline
void UIPartActionWindow.TrackPartPosition ( )
inline
UIPartActionAeroDisplay UIPartActionWindow.TrySetAeroControl ( Part  r)
inline
UIPartActionButton UIPartActionWindow.TrySetEventControl ( BaseEvent  evt,
Part  part,
PartModule  module 
)
inline
UIPartActionFieldItem UIPartActionWindow.TrySetFieldControl ( BaseField  field,
Part  part,
PartModule  module 
)
inline
UIPartActionFuelFlowOverlay UIPartActionWindow.TrySetFuelFlowOverlay ( Part  r)
inline
UIPartActionResourceEditor UIPartActionWindow.TrySetResourceControlEditor ( PartResource  r)
inline
UIPartActionResource UIPartActionWindow.TrySetResourceControlFlight ( PartResource  r)
inline
UIPartActionResourcePriority UIPartActionWindow.TrySetResourcePriorityControl ( Part  r)
inline
UIPartActionResourceTransfer UIPartActionWindow.TrySetResourceTransferControl ( PartResource  r)
inline
UIPartActionRoboticJointDisplay UIPartActionWindow.TrySetRoboticJointControl ( Part  r)
inline
UIPartActionThermalDisplay UIPartActionWindow.TrySetThermalControl ( Part  r)
inline
void UIPartActionWindow.UpdateWindow ( )
inline
void UIPartActionWindow.UpdateWindowHeight ( float  newHeight)
inline

Update the height that the PAW can expand too. If it needs less space it will not get this big

Parameters
newHeightNew height in pixels

Member Data Documentation

Part UIPartActionWindow._part
protected
List<UIPartActionColorPicker> UIPartActionWindow.colorPickers

All the color pickers in this PAW's hierarchy

int UIPartActionWindow.controlIndex
protected
DisplayType UIPartActionWindow.displayType
protected
bool UIPartActionWindow.hover
protected
VerticalLayoutGroup UIPartActionWindow.layoutGroup
Color UIPartActionWindow.lineColor
float UIPartActionWindow.lineCornerRadius = 10f
Material UIPartActionWindow.lineMaterial
float UIPartActionWindow.lineWidth = 5f
List<UIPartActionItem> UIPartActionWindow.listItems = new List<UIPartActionItem>()
protected
bool UIPartActionWindow.numericSliders = false
protected
DictionaryValueList<string, UIPartActionGroup> UIPartActionWindow.parameterGroups

dictionary of UI PAW Groups - key is group name.

LayerMask UIPartActionWindow.partLayerMask
bool UIPartActionWindow.pinned = false
protected
KSP.UI.UIWorldPointer UIPartActionWindow.pointer
protected
bool UIPartActionWindow.PreviousResourceOnly
float UIPartActionWindow.previousUiScale
protected
RectTransform UIPartActionWindow.rectTransform
protected
UI_Scene UIPartActionWindow.scene
protected
RectTransform UIPartActionWindow.titleBar
TMPro.TextMeshProUGUI UIPartActionWindow.titleText
Toggle UIPartActionWindow.toggleNumeric
Toggle UIPartActionWindow.togglePinned
bool UIPartActionWindow.usingNumericValue

The nmeric sliders in this PAW are in text input mode, PAW items enabled with numeric input field set this.

float UIPartActionWindow.zOffset

Property Documentation

DisplayType UIPartActionWindow.Display
getset
bool UIPartActionWindow.displayDirty
getset
bool UIPartActionWindow.dragging
get
bool UIPartActionWindow.Hover
get
bool UIPartActionWindow.isValid
getset
List<UIPartActionItem> UIPartActionWindow.ListItems
get
bool UIPartActionWindow.NumericSliders
get

The numeric sliders in this PAW are in text input mode

Part UIPartActionWindow.part
get
bool UIPartActionWindow.Pinned
get
KSP.UI.UIWorldPointer UIPartActionWindow.Pointer
get
float UIPartActionWindow.targetDistanceFromCamera
getset

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