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 Attributes | List of all members
UIConfirmDialog Class Reference

Mission expansion confirm dialogue with OK and Cancel buttons as well as a Checkbox for don't show this dialog again More...

Inheritance diagram for UIConfirmDialog:
UIFolderManagementDialog

Public Member Functions

void CloseDialog ()
 
void OnCancel ()
 
void OnConfirm ()
 
void OnLeavingScene (GameScenes scn)
 

Static Public Member Functions

static UIConfirmDialog Spawn (string title, string message, Callback< bool > onOk, Callback< bool > onCancel, bool showCancelBtn=true)
 Spawn and display a simple OK/Cancel dialog If user presses ESC key Cancel Callback will be called first. If no Cancel Callback is set then the OK callback WILL be called. More...
 
static UIConfirmDialog Spawn (string title, string message, Callback< bool > onOk, bool showCancelBtn=true)
 Spawn and display a simple OK/Cancel dialog If user presses ESC key Cancel Callback will be called first. If no Cancel Callback is set then the OK callback WILL be called. More...
 
static UIConfirmDialog Spawn (string title, string message, Callback< bool > onOk, bool showDontShowAgain, string textDontShowAgain)
 This is a confirm button where we can choose th text for son't show again or avoid it entirely. More...
 
static UIConfirmDialog Spawn (string title, string message, string textCancel, string textOK, string textDontShowAgain, Callback< bool > onOk, Callback< bool > onCancel, bool showCancelBtn=true)
 Spawn and display a simple OK/Cancel dialog If user presses ESC key Cancel Callback will be called first. If no Cancel Callback is set then the OK callback WILL be called. More...
 

Public Attributes

bool modal = true
 If true dialog is modal. More...
 

Protected Attributes

Callback< bool > onOk
 
TMPro.TextMeshProUGUI textCancel = null
 Confirmation Cancel button text More...
 
TMPro.TextMeshProUGUI textConfirmation = null
 Confirmation ok button More...
 
TMPro.TextMeshProUGUI textDescription = null
 confirmation body text More...
 
TMPro.TextMeshProUGUI textHeader = null
 Title of the popup More...
 

Detailed Description

Mission expansion confirm dialogue with OK and Cancel buttons as well as a Checkbox for don't show this dialog again

Member Function Documentation

void UIConfirmDialog.CloseDialog ( )
inline
void UIConfirmDialog.OnCancel ( )
inline
void UIConfirmDialog.OnConfirm ( )
inline
void UIConfirmDialog.OnLeavingScene ( GameScenes  scn)
inline
static UIConfirmDialog UIConfirmDialog.Spawn ( string  title,
string  message,
Callback< bool >  onOk,
Callback< bool >  onCancel,
bool  showCancelBtn = true 
)
inlinestatic

Spawn and display a simple OK/Cancel dialog If user presses ESC key Cancel Callback will be called first. If no Cancel Callback is set then the OK callback WILL be called.

Parameters
titleTitle text in the dialog
messageMessage text in the dialog
onOkCallback to invoke when OK is pressed
onCancelCallback to invoked when Cancel is pressed
showCancelBtnTru to show a cancle button, otherwise just show an OK
Returns
static UIConfirmDialog UIConfirmDialog.Spawn ( string  title,
string  message,
Callback< bool >  onOk,
bool  showCancelBtn = true 
)
inlinestatic

Spawn and display a simple OK/Cancel dialog If user presses ESC key Cancel Callback will be called first. If no Cancel Callback is set then the OK callback WILL be called.

Parameters
titleTitle text in the dialog
messageMessage text in the dialog
onOkCallback to invoke when OK is pressed
showCancelBtnTru to show a cancle button, otherwise just show an OK
Returns
static UIConfirmDialog UIConfirmDialog.Spawn ( string  title,
string  message,
Callback< bool >  onOk,
bool  showDontShowAgain,
string  textDontShowAgain 
)
inlinestatic

This is a confirm button where we can choose th text for son't show again or avoid it entirely.

Parameters
titleTitle text in the dialog
messageMessage text in the dialog
onOkCallback to invoke when OK is pressed
showDontShowAgainTrue if the don't show again text will be displayed
textDontShowAgainPass an empty string for none, ensure showDontShowAgain is true, if not this will not display
Returns
static UIConfirmDialog UIConfirmDialog.Spawn ( string  title,
string  message,
string  textCancel,
string  textOK,
string  textDontShowAgain,
Callback< bool >  onOk,
Callback< bool >  onCancel,
bool  showCancelBtn = true 
)
inlinestatic

Spawn and display a simple OK/Cancel dialog If user presses ESC key Cancel Callback will be called first. If no Cancel Callback is set then the OK callback WILL be called.

Parameters
titleTitle text in the dialog
messageMessage text in the dialog
onOkCallback to invoke when OK is pressed
onCancelCallback to invoked when Cancel is pressed it will be called when player hits ESC instead of the ok callback if present
showCancelBtnTru to show a cancle button, otherwise just show an OK
textCancelText to display in the cancel button
textOKText to Display in the OK button
textDontShowAgainText to show in the Dont show me again toggle
Returns

Member Data Documentation

bool UIConfirmDialog.modal = true

If true dialog is modal.

Callback<bool> UIConfirmDialog.onOk
protected
TMPro.TextMeshProUGUI UIConfirmDialog.textCancel = null
protected

Confirmation Cancel button text

TMPro.TextMeshProUGUI UIConfirmDialog.textConfirmation = null
protected

Confirmation ok button

TMPro.TextMeshProUGUI UIConfirmDialog.textDescription = null
protected

confirmation body text

TMPro.TextMeshProUGUI UIConfirmDialog.textHeader = null
protected

Title of the popup


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