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

An option to be used in MultiOptionDialogs More...

Inheritance diagram for DialogGUIButton:
DialogGUIBase DialogGUIButton< T > FlagBrowserGUIButton KSP.UI.Screens.Mapview.MapContextMenuOptions.MapContextMenuOption KSP.UI.Screens.Mapview.MapContextMenuOptions.AddManeuver KSP.UI.Screens.Mapview.MapContextMenuOptions.AutoWarpToUT KSP.UI.Screens.Mapview.MapContextMenuOptions.DeleteCustomWaypoint KSP.UI.Screens.Mapview.MapContextMenuOptions.FocusObject KSP.UI.Screens.Mapview.MapContextMenuOptions.SetAsTarget KSP.UI.Screens.Mapview.MapContextMenuOptions.WaypointNavigation

Classes

class  TextLabelOptions
 

Public Member Functions

override GameObject Create (ref Stack< Transform > layouts, UISkinDef skin)
 
 DialogGUIButton (string optionText, Callback onSelected)
 Creates a new DialogOption More...
 
 DialogGUIButton (string optionText, Callback onSelected, bool dismissOnSelect)
 
 DialogGUIButton (string optionText, Callback onSelected, float w, float h, bool dismissOnSelect, UIStyle style)
 
 DialogGUIButton (string optionText, Callback onSelected, float w, float h, bool dismissOnSelect, params DialogGUIBase[] options)
 
 DialogGUIButton (Func< string > getString, Callback onSelected, float w, float h, bool dismissOnSelect, params DialogGUIBase[] options)
 
 DialogGUIButton (Func< string > getString, Callback onSelected, Func< bool > EnabledCondition, float w, float h, bool dismissOnSelect, params DialogGUIBase[] options)
 
 DialogGUIButton (string optionText, Callback onSelected, Func< bool > EnabledCondition, bool dismissOnSelect)
 
 DialogGUIButton (string optionText, Callback onSelected, Func< bool > EnabledCondition, float w, float h, bool dismissOnSelect, UIStyle style=null)
 
 DialogGUIButton (Func< string > getString, Callback onSelected, Func< bool > EnabledCondition, float w, float h, bool dismissOnSelect, UIStyle style)
 
 DialogGUIButton (UnityEngine.Sprite image, Callback onSelected, float w, float h, bool dismissOnSelect=false)
 
 DialogGUIButton (UnityEngine.Sprite image, string text, Callback onSelected, float w, float h, bool dismissOnSelect=false)
 
virtual void OptionSelected ()
 
override void Resize ()
 
override void Update ()
 
- Public Member Functions inherited from DialogGUIBase
void AddChild (DialogGUIBase child)
 
void AddChildren (DialogGUIBase[] c)
 
 DialogGUIBase (params DialogGUIBase[] list)
 
void SetOptionText (string text)
 

Public Attributes

bool DismissOnSelect
 
Func< string > GetString = null
 
UnityEngine.Sprite image
 
Callback onOptionSelected = () => { }
 
TextLabelOptions textLabelOptions
 
- Public Attributes inherited from DialogGUIBase
List< DialogGUIBasechildren = new List<DialogGUIBase>()
 
bool flexibleHeight = true
 
UIStyle guiStyle = null
 
float height = -1.0f
 
Callback OnFixedUpdate = () => { }
 
Callback OnLateUpdate = () => { }
 
Callback OnRenderObject = () => { }
 
Callback OnResize = () => { }
 
Callback OnUpdate = () => { }
 
Func< bool > OptionEnabledCondition = () => { return true; }
 
Func< bool > OptionInteractableCondition = () => { return true; }
 
string OptionText = "No Function"
 
Vector2 position
 
Vector2 size = new Vector2(-1f, -1f)
 
Color tint
 
string tooltipText
 
GameObject uiItem = null
 
bool useColor = false
 
float width = -1.0f
 

Additional Inherited Members

- Static Public Member Functions inherited from DialogGUIBase
static bool SelectFirstItem (DialogGUIBase[] items)
 
static void SetUpTextObject (TMPro.TextMeshProUGUI text, string value, UIStyle style, UISkinDef skin, bool ignoreStyleColor=false)
 
- Protected Member Functions inherited from DialogGUIBase
virtual TMPro.TextMeshProUGUI GetTextObject ()
 
void SetupTransformAndLayout ()
 
- Protected Attributes inherited from DialogGUIBase
bool dirty = true
 
bool lastEnabledState = false
 
bool lastInteractibleState = true
 
- Properties inherited from DialogGUIBase
bool Dirty [get, set]
 

Detailed Description

An option to be used in MultiOptionDialogs

Constructor & Destructor Documentation

DialogGUIButton.DialogGUIButton ( string  optionText,
Callback  onSelected 
)
inline

Creates a new DialogOption

Parameters
optionTextThe option's description
onSelectedThe method to call if this option is selected
DialogGUIButton.DialogGUIButton ( string  optionText,
Callback  onSelected,
bool  dismissOnSelect 
)
inline
DialogGUIButton.DialogGUIButton ( string  optionText,
Callback  onSelected,
float  w,
float  h,
bool  dismissOnSelect,
UIStyle  style 
)
inline
DialogGUIButton.DialogGUIButton ( string  optionText,
Callback  onSelected,
float  w,
float  h,
bool  dismissOnSelect,
params DialogGUIBase[]  options 
)
inline
DialogGUIButton.DialogGUIButton ( Func< string >  getString,
Callback  onSelected,
float  w,
float  h,
bool  dismissOnSelect,
params DialogGUIBase[]  options 
)
inline
DialogGUIButton.DialogGUIButton ( Func< string >  getString,
Callback  onSelected,
Func< bool >  EnabledCondition,
float  w,
float  h,
bool  dismissOnSelect,
params DialogGUIBase[]  options 
)
inline
DialogGUIButton.DialogGUIButton ( string  optionText,
Callback  onSelected,
Func< bool >  EnabledCondition,
bool  dismissOnSelect 
)
inline
DialogGUIButton.DialogGUIButton ( string  optionText,
Callback  onSelected,
Func< bool >  EnabledCondition,
float  w,
float  h,
bool  dismissOnSelect,
UIStyle  style = null 
)
inline
DialogGUIButton.DialogGUIButton ( Func< string >  getString,
Callback  onSelected,
Func< bool >  EnabledCondition,
float  w,
float  h,
bool  dismissOnSelect,
UIStyle  style 
)
inline
DialogGUIButton.DialogGUIButton ( UnityEngine.Sprite  image,
Callback  onSelected,
float  w,
float  h,
bool  dismissOnSelect = false 
)
inline
DialogGUIButton.DialogGUIButton ( UnityEngine.Sprite  image,
string  text,
Callback  onSelected,
float  w,
float  h,
bool  dismissOnSelect = false 
)
inline

Member Function Documentation

override GameObject DialogGUIButton.Create ( ref Stack< Transform >  layouts,
UISkinDef  skin 
)
inlinevirtual

Reimplemented from DialogGUIBase.

virtual void DialogGUIButton.OptionSelected ( )
inlinevirtual
override void DialogGUIButton.Resize ( )
inlinevirtual

Reimplemented from DialogGUIBase.

override void DialogGUIButton.Update ( )
inlinevirtual

Reimplemented from DialogGUIBase.

Member Data Documentation

bool DialogGUIButton.DismissOnSelect
Func<string> DialogGUIButton.GetString = null
UnityEngine.Sprite DialogGUIButton.image
Callback DialogGUIButton.onOptionSelected = () => { }
TextLabelOptions DialogGUIButton.textLabelOptions

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