87 memset(&m_Cache, 0,
sizeof(m_Cache));
98 MessageBoxButton(
const char* pText,
const char* pDefaultText,
int iReturnCode,
bool bNewLine =
false,
bool bDefault =
false,
bool bCancel =
false,
bool bEnabled =
true);
99 MessageBoxButton(
const char* pText,
int iReturnCode,
bool bNewLine =
false,
bool bDefault =
false,
bool bCancel =
false,
bool bEnabled =
true);
181 busy_func_before_draw =
true;
182 draw_grab_on_exit =
true;
189 input_box.enabled =
false;
190 *input_box.value = 0;
191 input_box.min_width = 32;
235 void HandleSelection();
249 void DrawSpecialText();
329 static MessageBoxButton LAYOUT_YES_NO[] = {
MessageBoxButton(
"#VARIOUS__YES_L",
"Yes",
ReturnCodes::MBR_YES,
false,
true,
false),
MessageBoxButton(
"#VARIOUS__NO",
"No",
ReturnCodes::MBR_NO,
false,
false,
true)};
332 static MessageBoxButton LAYOUT_RETRY_CANCEL[] = {
MessageBoxButton(
"#VARIOUS__RETRY_L",
"Retry",
ReturnCodes::MBR_RETRY,
false,
false,
false),
MessageBoxButton(
"#VARIOUS__CANCEL_L",
"Cancel",
ReturnCodes::MBR_CANCEL,
false,
true,
true)};
335 static MessageBoxButton LAYOUT_OK_CANCEL[] = {
MessageBoxButton(
"#VARIOUS__OK",
"OK",
ReturnCodes::MBR_OK,
false,
true,
false),
MessageBoxButton(
"#VARIOUS__CANCEL_L",
"Cancel",
ReturnCodes::MBR_CANCEL,
false,
false,
true)};
void(* MessageBoxBusyFunc)(void *)
Function callback to call when.
Definition: CSMAPI_MessageBoxMode.h:35
Easy UI management.
Definition: CSMAPI_BaseModeInstance.h:469
Message box mode.
Definition: CSMAPI_MessageBoxMode.h:108
virtual void PreRender()
Render everything to surfaces.
virtual void ProcessKeys()
Process key input.
static bool ShowMessageBoxForOneFrame(const char *pTitle, const char *pMessage, MessageBoxButton *pButtons, int iButtonCount, MessageBoxConfigStruct *pConfig=NULL)
Display a message box for this frame only.
virtual void Draw()
Draw rendered surfaces.
MessageBoxReturnCodes
Special return codes.
Definition: CSMAPI_MessageBoxMode.h:268
virtual void ProcessLogic()
Process the logic of this menu.
virtual int Free()
De-initialize this mode.
MessageBoxMode()
Default constructor.
Definition: CSMAPI_MessageBoxMode.h:199
virtual int Init()
Initialize this mode.
static int ShowMessageBox(const char *pTitle, const char *pMessage, MessageBoxButton *pButtons, int iButtonCount, MessageBoxBusyFunc pBusyFunc=NULL, void *pUserData=NULL, MessageBoxConfigStruct *pConfig=NULL)
Show a message box.
virtual void ProcessMouse(GUI_POINT mouse_point)
Process this menu's mouse.
#define CAVESTORY_MOD_API
Exports / imports Cavestory Mod API functions & classes.
Definition: CSMAPI_begincode.h:30
Manages points.
Definition: CSMAPI_types.h:546
Definition: CSMAPI_types.h:842
Configuration for MessageBoxMode.
Definition: CSMAPI_MessageBoxMode.h:124
const char * title
The title of the message box.
Definition: CSMAPI_MessageBoxMode.h:127
MessageBoxConfigStruct()
Default constructor.
Definition: CSMAPI_MessageBoxMode.h:179
int line_padding
Line padding.
Definition: CSMAPI_MessageBoxMode.h:155
bool busy_func_before_draw
If set to true, then the busy function will be called BEFORE the messagebox's draw function,...
Definition: CSMAPI_MessageBoxMode.h:135
int btn_margin
The button text margin.
Definition: CSMAPI_MessageBoxMode.h:151
bool enabled
Enable the input box.
Definition: CSMAPI_MessageBoxMode.h:163
bool draw_grab_on_exit
Perform a BaseModeInstance::GrabScreen() on messagebox exit.
Definition: CSMAPI_MessageBoxMode.h:139
int text_margin
The margin of the text.
Definition: CSMAPI_MessageBoxMode.h:143
int title_margin
The title margin.
Definition: CSMAPI_MessageBoxMode.h:147
int min_width
The minimum width of the input box.
Definition: CSMAPI_MessageBoxMode.h:174
const char * text
The text to display.
Definition: CSMAPI_MessageBoxMode.h:131