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 | Protected Member Functions | Protected Attributes | Properties | List of all members
KSP.UI.Screens.AppUIMember Class Referenceabstract

This is the UI element, with a link to the object.field or property behind it More...

Inheritance diagram for KSP.UI.Screens.AppUIMember:
KSP.UI.Screens.AppUIMemberDateTime KSP.UI.Screens.AppUIMemberDropdown KSP.UI.Screens.AppUIMemberHeading KSP.UI.Screens.AppUIMemberInput KSP.UI.Screens.AppUIMemberLabel KSP.UI.Screens.AppUIMemberLabelList KSP.UI.Screens.AppUIMemberRadioBool KSP.UI.Screens.AppUIMemberSliderFloat KSP.UI.Screens.AppUIMemberToggleBool

Public Member Functions

void RefreshUI ()
 Method called for refreshing the UI More...
 
void SetHoverTextTarget (TextMeshProUGUI textTargetForHover)
 
virtual void Setup (AppUI_Data host, MemberInfo member, AppUI_Control attribs, AppUIInputPanel parentPanel)
 Setup the UI element from the host, member and attributes More...
 

Static Public Member Functions

static int SortByOrder (AppUIMember m1, AppUIMember m2)
 Sort AppUIMembers by ascending order More...
 

Public Attributes

AppUI_Control.HorizontalAlignment guiNameHorizAlignment = AppUI_Control.HorizontalAlignment.Left
 The horizontal alignment for the guiName text. More...
 
TextMeshProUGUI guiNameLabel
 
AppUI_Control.VerticalAlignment guiNameVertAlignment = AppUI_Control.VerticalAlignment.Midline
 The vertical alignment for the guiName text. More...
 
bool hideOnError
 If set true will hide this control in error states. More...
 
int order
 Sort order index for this parameter in the panel More...
 
bool showGuiName = true
 

Protected Member Functions

object GetValue ()
 Get the value of the underlying member More...
 
GetValue< T > ()
 
virtual void OnAwake ()
 Overridable Method called at end of Unity Awake More...
 
virtual void OnInitialized ()
 Overridable Method called after a member is correctly set up More...
 
abstract void OnRefreshUI ()
 Method called in subclasses when refreshUI is called More...
 
virtual void OnStart ()
 Overridable Method called at end of Unity Start More...
 
virtual void OnUpdate ()
 Overridable Method called at end of Unity Update More...
 
bool SetValue (object newValue)
 Set the value of the underlying member More...
 

Protected Attributes

AppUI_Control _attribs
 
FieldInfo _field
 
AppUI_Data _host
 
MemberInfo _member
 
PropertyInfo _property
 
RectTransform guiNameLabelRectTransform = null
 
List< UIHoverTexthoverTextList
 List of hover text elemants that should have their help text set by this component More...
 
bool isEnum
 
VerticalLayoutGroup parentLayoutGroup = null
 The layout group of the parent More...
 
AppUIInputPanel parentPanel = null
 The panel that is holding this member More...
 
RectTransform valueHolderRectTransform = null
 
Vector2 valueRectOffsetMin
 
Type valueType
 

Properties

string guiName [get, set]
 The field's gui name More...
 
string HoverText [get, set]
 WHat to change the panels textTargetForHover to when mouse is over this More...
 
bool IsInitialized [get, set]
 Did the reflected member get all set up correctly More...
 
string Name [get]
 The Member Name More...
 

Detailed Description

This is the UI element, with a link to the object.field or property behind it

Member Function Documentation

object KSP.UI.Screens.AppUIMember.GetValue ( )
inlineprotected

Get the value of the underlying member

Returns
The value from the underlying member
T KSP.UI.Screens.AppUIMember.GetValue< T > ( )
inlineprotected
virtual void KSP.UI.Screens.AppUIMember.OnAwake ( )
inlineprotectedvirtual

Overridable Method called at end of Unity Awake

virtual void KSP.UI.Screens.AppUIMember.OnInitialized ( )
inlineprotectedvirtual
abstract void KSP.UI.Screens.AppUIMember.OnRefreshUI ( )
protectedpure virtual
virtual void KSP.UI.Screens.AppUIMember.OnStart ( )
inlineprotectedvirtual

Overridable Method called at end of Unity Start

Reimplemented in KSP.UI.Screens.AppUIMemberDateTime, KSP.UI.Screens.AppUIMemberInput, and KSP.UI.Screens.AppUIMemberDropdown.

virtual void KSP.UI.Screens.AppUIMember.OnUpdate ( )
inlineprotectedvirtual

Overridable Method called at end of Unity Update

Reimplemented in KSP.UI.Screens.AppUIMemberDateTime.

void KSP.UI.Screens.AppUIMember.RefreshUI ( )
inline

Method called for refreshing the UI

void KSP.UI.Screens.AppUIMember.SetHoverTextTarget ( TextMeshProUGUI  textTargetForHover)
inline
virtual void KSP.UI.Screens.AppUIMember.Setup ( AppUI_Data  host,
MemberInfo  member,
AppUI_Control  attribs,
AppUIInputPanel  parentPanel 
)
inlinevirtual

Setup the UI element from the host, member and attributes

Parameters
hostThe data class based off AppUI_Data
memberThe member (field or property) that is being linked to this UI
attribsThe attribs that holds guiName, etc about the control
bool KSP.UI.Screens.AppUIMember.SetValue ( object  newValue)
inlineprotected

Set the value of the underlying member

Parameters
newValueThe new value
Returns
True if set
static int KSP.UI.Screens.AppUIMember.SortByOrder ( AppUIMember  m1,
AppUIMember  m2 
)
inlinestatic

Sort AppUIMembers by ascending order

Parameters
m1member 1
m2member 2
Returns
Standard Compareto int based on order value

Member Data Documentation

AppUI_Control KSP.UI.Screens.AppUIMember._attribs
protected
FieldInfo KSP.UI.Screens.AppUIMember._field
protected
AppUI_Data KSP.UI.Screens.AppUIMember._host
protected
MemberInfo KSP.UI.Screens.AppUIMember._member
protected
PropertyInfo KSP.UI.Screens.AppUIMember._property
protected
AppUI_Control.HorizontalAlignment KSP.UI.Screens.AppUIMember.guiNameHorizAlignment = AppUI_Control.HorizontalAlignment.Left

The horizontal alignment for the guiName text.

TextMeshProUGUI KSP.UI.Screens.AppUIMember.guiNameLabel
RectTransform KSP.UI.Screens.AppUIMember.guiNameLabelRectTransform = null
protected
AppUI_Control.VerticalAlignment KSP.UI.Screens.AppUIMember.guiNameVertAlignment = AppUI_Control.VerticalAlignment.Midline

The vertical alignment for the guiName text.

bool KSP.UI.Screens.AppUIMember.hideOnError

If set true will hide this control in error states.

List<UIHoverText> KSP.UI.Screens.AppUIMember.hoverTextList
protected

List of hover text elemants that should have their help text set by this component

bool KSP.UI.Screens.AppUIMember.isEnum
protected
int KSP.UI.Screens.AppUIMember.order

Sort order index for this parameter in the panel

VerticalLayoutGroup KSP.UI.Screens.AppUIMember.parentLayoutGroup = null
protected

The layout group of the parent

Note: No need to null check this as the component is required on a AppUIInputPanel

AppUIInputPanel KSP.UI.Screens.AppUIMember.parentPanel = null
protected

The panel that is holding this member

bool KSP.UI.Screens.AppUIMember.showGuiName = true
RectTransform KSP.UI.Screens.AppUIMember.valueHolderRectTransform = null
protected
Vector2 KSP.UI.Screens.AppUIMember.valueRectOffsetMin
protected
Type KSP.UI.Screens.AppUIMember.valueType
protected

Property Documentation

string KSP.UI.Screens.AppUIMember.guiName
getset

The field's gui name

string KSP.UI.Screens.AppUIMember.HoverText
getset

WHat to change the panels textTargetForHover to when mouse is over this

bool KSP.UI.Screens.AppUIMember.IsInitialized
getset

Did the reflected member get all set up correctly

string KSP.UI.Screens.AppUIMember.Name
get

The Member Name


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