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

A GUI-drawn dialog that gives the player two options More...

Public Member Functions

 ConfirmDialog (Callback confirmCallback, Callback abortCallback, UISkinDef UISkinDef=null)
 Creates a new Dialog (doesn't draw it though, you need to call it's DrawWindow or DrawContent method from an OnGUI event) More...
 

Public Attributes

Callback abort
 
string abortButtonText = "Cancel"
 
string confirmButtonText = "Yes"
 
Callback confirmed
 
Rect dialogRect
 
Callback DrawCustomContent = () => { GUILayout.FlexibleSpace(); }
 
string message = "Are you sure you want to proceed?"
 
UISkinDef skin
 
string windowTitle = "Confirmation Needed"
 

Detailed Description

A GUI-drawn dialog that gives the player two options

Constructor & Destructor Documentation

ConfirmDialog.ConfirmDialog ( Callback  confirmCallback,
Callback  abortCallback,
UISkinDef  UISkinDef = null 
)
inline

Creates a new Dialog (doesn't draw it though, you need to call it's DrawWindow or DrawContent method from an OnGUI event)

Parameters
confirmCallbackThe method to call if the confirm button is pressed
abortCallbackThe method to call if the abort button is pressed
UISkinDefThe GUI Skin to use to draw the window (no effect if DrawContent is used)

Member Data Documentation

Callback ConfirmDialog.abort
string ConfirmDialog.abortButtonText = "Cancel"
string ConfirmDialog.confirmButtonText = "Yes"
Callback ConfirmDialog.confirmed
Rect ConfirmDialog.dialogRect
Callback ConfirmDialog.DrawCustomContent = () => { GUILayout.FlexibleSpace(); }
string ConfirmDialog.message = "Are you sure you want to proceed?"
UISkinDef ConfirmDialog.skin
string ConfirmDialog.windowTitle = "Confirmation Needed"

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