Module CorsixTH.CorsixTH.Lua.dialogs.confirm_dialog

Dialog for "Are you sure you want to quit?" and similar yes/no questions.

This dialog is also used for errors and requires some special handling

Functions

UIConfirmDialog:UIConfirmDialog (ui, must_pause, text, callback_ok, callback_cancel) Initialise the Confirmation Dialog
UIConfirmDialog:close (confirmed) Closes the confirm dialog
UIConfirmDialog:systemPause () Function to tell the game a system pause is needed


Functions

UIConfirmDialog:UIConfirmDialog (ui, must_pause, text, callback_ok, callback_cancel)
Initialise the Confirmation Dialog

Parameters:

  • ui The UI
  • must_pause (boolean) set whether this dialog should pause the game
  • text (string) message to show
  • callback_ok (function) what to do on yes/ok
  • callback_cancel (function) what to do on no/cancel/close
UIConfirmDialog:close (confirmed)
Closes the confirm dialog

Parameters:

  • confirmed (boolean or nil) whether to call the confirm callback (true) or cancel callback (false/nil)
UIConfirmDialog:systemPause ()
Function to tell the game a system pause is needed
generated by LDoc TESTING Last updated 2015-01-01 12:00:00