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
UIPartActionResourceDrain Class Reference

Ths field is used for displaying a list of resources to drain with the resource name and drain rate for each resource. More...

Inheritance diagram for UIPartActionResourceDrain:
UIPartActionFieldItem UIPartActionItem

Public Member Functions

override void Setup (UIPartActionWindow window, Part part, PartModule partModule, UI_Scene scene, UI_Control control, BaseField field)
 Initialize the Resource to drain list More...
 
void UpdatePartResourceStatus (PartResource p, bool active)
 Adds or removes a resource depending on the status received More...
 
void UpdateResourcesDrainRate ()
 Update the resource displayed drain rates and status. More...
 
void UpdateResourcesDrainRateAndStatus (string resourceName, bool status)
 Update the resource displayed drain rates and status. More...
 
- Public Member Functions inherited from UIPartActionFieldItem
bool CheckInRange ()
 Checks if the field is within range from the active vessel. More...
 
override bool IsItemValid ()
 
- Public Member Functions inherited from UIPartActionItem
virtual void AddInputFieldLock (string val)
 
virtual void RemoveInputfieldLock ()
 
void SetupItem (UIPartActionWindow window, Part part, PartModule partModule, UI_Scene scene, UI_Control control)
 
virtual void UpdateItem ()
 

Static Public Member Functions

static void CacheLocalStrings ()
 

Public Attributes

int fieldValue
 Number of resources to display More...
 
UI_Resources resourcesControl
 UI_Control for referencing this class. More...
 
GameObject resourceTogglePrefab
 the resource toggle prefab used for each resource to display. More...
 
List< UIPartActionResourceToggleuiPartActionResourcetoggle = null
 Displayed resources by name, drain rate and drain status. More...
 
VerticalLayoutGroup verticalLayout
 The vertical layout froup for the resources to be listed. More...
 

Additional Inherited Members

- Protected Member Functions inherited from UIPartActionFieldItem
BaseField GetField (string name)
 
void SetFieldValue (object newValue)
 
bool SetSymCounterpartValue (object value)
 
- Protected Attributes inherited from UIPartActionFieldItem
BaseField field
 
bool isActiveUnfocused
 
float itemRange
 
bool removedIfPinned
 
- Protected Attributes inherited from UIPartActionItem
UI_Control control
 
bool isModule
 
Part part
 
PartModule partModule
 
UI_Scene scene
 
UIPartActionWindow window
 
- Properties inherited from UIPartActionFieldItem
BaseField Field [get]
 
object Host [get]
 
- Properties inherited from UIPartActionItem
UI_Control Control [get]
 
bool IsModule [get]
 
Part Part [get]
 
PartModule PartModule [get]
 
UI_Scene Scene [get]
 
UIPartActionWindow Window [get]
 

Detailed Description

Ths field is used for displaying a list of resources to drain with the resource name and drain rate for each resource.

Member Function Documentation

static void UIPartActionResourceDrain.CacheLocalStrings ( )
inlinestatic
override void UIPartActionResourceDrain.Setup ( UIPartActionWindow  window,
Part  part,
PartModule  partModule,
UI_Scene  scene,
UI_Control  control,
BaseField  field 
)
inlinevirtual

Initialize the Resource to drain list

Parameters
window
part
partModule
scene
control
field

Reimplemented from UIPartActionFieldItem.

void UIPartActionResourceDrain.UpdatePartResourceStatus ( PartResource  p,
bool  active 
)
inline

Adds or removes a resource depending on the status received

Parameters
pPart resource to remove from draining
activePart resource status to remove
void UIPartActionResourceDrain.UpdateResourcesDrainRate ( )
inline

Update the resource displayed drain rates and status.

void UIPartActionResourceDrain.UpdateResourcesDrainRateAndStatus ( string  resourceName,
bool  status 
)
inline

Update the resource displayed drain rates and status.

Member Data Documentation

int UIPartActionResourceDrain.fieldValue

Number of resources to display

UI_Resources UIPartActionResourceDrain.resourcesControl

UI_Control for referencing this class.

GameObject UIPartActionResourceDrain.resourceTogglePrefab

the resource toggle prefab used for each resource to display.

List<UIPartActionResourceToggle> UIPartActionResourceDrain.uiPartActionResourcetoggle = null

Displayed resources by name, drain rate and drain status.

VerticalLayoutGroup UIPartActionResourceDrain.verticalLayout

The vertical layout froup for the resources to be listed.


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