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

Prefab class used no display a PAW item for a resource to toggle, a delegate is added to add any kind of hebaviour to it. More...

Inheritance diagram for UIPartActionResourceToggle:

Public Member Functions

void InitializeItem (string displayName, PartResource resource, bool active)
 Update the Item Text and status More...
 
delegate void PartStatus (PartResource pR, bool b)
 Delegate that sends the part resource and state when the togle is pressed. More...
 
void UpdateItemName (string name)
 Update the Item Text More...
 
void UpdateItemNameAndStatus (string name, bool status)
 Update the Item Text More...
 

Static Public Member Functions

static void CacheLocalStrings ()
 

Public Attributes

TMPro.TextMeshProUGUI fieldName
 Resource field display name More...
 
TMPro.TextMeshProUGUI fieldStatus
 Resource field display status More...
 
PartResource partResource
 Par resource asociated with this field More...
 
PartStatus sendPartStatus
 Delegate to add a certain behaviour to the toggle. More...
 
Toggle toggle
 Resource toggle More...
 

Detailed Description

Prefab class used no display a PAW item for a resource to toggle, a delegate is added to add any kind of hebaviour to it.

Member Function Documentation

static void UIPartActionResourceToggle.CacheLocalStrings ( )
inlinestatic
void UIPartActionResourceToggle.InitializeItem ( string  displayName,
PartResource  resource,
bool  active 
)
inline

Update the Item Text and status

delegate void UIPartActionResourceToggle.PartStatus ( PartResource  pR,
bool  b 
)

Delegate that sends the part resource and state when the togle is pressed.

Parameters
pRPart resource reference
bState to send
void UIPartActionResourceToggle.UpdateItemName ( string  name)
inline

Update the Item Text

void UIPartActionResourceToggle.UpdateItemNameAndStatus ( string  name,
bool  status 
)
inline

Update the Item Text

Member Data Documentation

TMPro.TextMeshProUGUI UIPartActionResourceToggle.fieldName

Resource field display name

TMPro.TextMeshProUGUI UIPartActionResourceToggle.fieldStatus

Resource field display status

PartResource UIPartActionResourceToggle.partResource

Par resource asociated with this field

PartStatus UIPartActionResourceToggle.sendPartStatus

Delegate to add a certain behaviour to the toggle.

Toggle UIPartActionResourceToggle.toggle

Resource toggle


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