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

A GUI-Drawn Dialog that gives the player any amount of options More...

Inheritance diagram for MultiOptionDialog:
DialogGUIBase

Public Member Functions

override GameObject Create (ref Stack< Transform > layouts, UISkinDef skin)
 
void FixedUpdate ()
 
void LateUpdate ()
 
 MultiOptionDialog (string name, string msg, string windowTitle, UISkinDef skin, params DialogGUIBase[] options)
 Creates a new MultiOptionDialog (doesn't draw it automatically though. Call the DrawWindow or DrawContent method from an OnGUI event) More...
 
 MultiOptionDialog (string name, string msg, string windowTitle, UISkinDef skin, float width, params DialogGUIBase[] options)
 Creates a new MultiOptionDialog (doesn't draw it automatically though. Call the DrawWindow or DrawContent method from an OnGUI event) More...
 
 MultiOptionDialog (string name, string msg, string windowTitle, UISkinDef skin, Rect rct, params DialogGUIBase[] options)
 Creates a new MultiOptionDialog (doesn't draw it automatically though. Call the DrawWindow or DrawContent method from an OnGUI event) More...
 
new void OnRenderObject ()
 
new void Resize ()
 
override void Update ()
 Call this from an OnGUI event to draw the dialog's content only (assumes you'll be doing this in a proper location) More...
 
- Public Member Functions inherited from DialogGUIBase
void AddChild (DialogGUIBase child)
 
void AddChildren (DialogGUIBase[] c)
 
 DialogGUIBase (params DialogGUIBase[] list)
 
void SetOptionText (string text)
 

Public Attributes

Rect dialogRect
 
Callback DrawCustomContent = () => { GUILayout.FlexibleSpace(); }
 
int id
 
string message = "Choose an option:"
 
string name = ""
 
DialogGUIBase[] Options
 
string title = ""
 
UISkinDef UISkinDef
 
- 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

A GUI-Drawn Dialog that gives the player any amount of options

Constructor & Destructor Documentation

MultiOptionDialog.MultiOptionDialog ( string  name,
string  msg,
string  windowTitle,
UISkinDef  skin,
params DialogGUIBase[]  options 
)
inline

Creates a new MultiOptionDialog (doesn't draw it automatically though. Call the DrawWindow or DrawContent method from an OnGUI event)

Parameters
nameThe name (in english) to be used for lookups/etc
msgThe message to display on the dialog
windowTitleThe window title (unused if using DrawContent)
skinThe GUI sking to use (unapplied if null)
optionsThe Options to Display
MultiOptionDialog.MultiOptionDialog ( string  name,
string  msg,
string  windowTitle,
UISkinDef  skin,
float  width,
params DialogGUIBase[]  options 
)
inline

Creates a new MultiOptionDialog (doesn't draw it automatically though. Call the DrawWindow or DrawContent method from an OnGUI event)

Parameters
nameThe name (in english) to be used for lookups/etc
msgThe message to display on the dialog
drawCustomContentA callback to a function to draw custom GUI content on this dialog, just under the message label
windowTitleThe window title
skinThe GUI sking to use (unapplied if null)
optionsThe Options to Display
MultiOptionDialog.MultiOptionDialog ( string  name,
string  msg,
string  windowTitle,
UISkinDef  skin,
Rect  rct,
params DialogGUIBase[]  options 
)
inline

Creates a new MultiOptionDialog (doesn't draw it automatically though. Call the DrawWindow or DrawContent method from an OnGUI event)

Parameters
nameThe name (in english) to be used for lookups/etc
msgThe message to display on the dialog
windowTitleThe window title
skinThe GUI sking to use (unapplied if null)
rctThe dialogs rectangle
optionsThe Options to Display

Member Function Documentation

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

Reimplemented from DialogGUIBase.

void MultiOptionDialog.FixedUpdate ( )
inline
void MultiOptionDialog.LateUpdate ( )
inline
new void MultiOptionDialog.OnRenderObject ( )
inline
new void MultiOptionDialog.Resize ( )
inlinevirtual

Reimplemented from DialogGUIBase.

override void MultiOptionDialog.Update ( )
inlinevirtual

Call this from an OnGUI event to draw the dialog's content only (assumes you'll be doing this in a proper location)

Reimplemented from DialogGUIBase.

Member Data Documentation

Rect MultiOptionDialog.dialogRect
Callback MultiOptionDialog.DrawCustomContent = () => { GUILayout.FlexibleSpace(); }
int MultiOptionDialog.id
string MultiOptionDialog.message = "Choose an option:"
string MultiOptionDialog.name = ""
DialogGUIBase [] MultiOptionDialog.Options
string MultiOptionDialog.title = ""
UISkinDef MultiOptionDialog.UISkinDef

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