hollyhock
Functions | Variables
gui.hpp File Reference

Functions and classes to create/display GUI elements. More...

#include "gui/button.hpp"
#include "gui/dialog.hpp"
#include "gui/dropDown.hpp"
#include "gui/label.hpp"
#include "gui/longLabel.hpp"
#include "gui/radioButton.hpp"
#include "gui/textBox.hpp"
Include dependency graph for gui.hpp:

Go to the source code of this file.

Functions

void GUI_DisplayMessageBox (int unknown, int titleStringID, int contentStringID)
 
void * GUI_DisplayMessageBox_Internal (int unknown, const char *titleString, const char *contentPrefix, const char *contentString, int buttons, bool disableCloseButton)
 

Variables

const int BUTTON_OK = 1 << 5
 
const int BUTTON_YES = 1 << 6
 
const int BUTTON_NO = 1 << 7
 
const int BUTTON_ABORT = 1 << 8
 
const int BUTTON_RETRY = 1 << 9
 
const int BUTTON_CANCEL = 1 << 10
 

Detailed Description

Functions and classes to create/display GUI elements.

Example: display a simple dialog with a label

GUIDialog dialog(
GUIDialog::Height25, GUIDialog::AlignTop,
"Dialog Title",
GUIDialog::KeyboardStateABC
);
GUILabel label(
dialog.GetLeftX() + 10,
dialog.GetTopY() + 10,
"Label Text"
);
dialog.AddElement(label);
dialog.ShowDialog();
Definition: dialog.hpp:91
Definition: label.hpp:5

Function Documentation

◆ GUI_DisplayMessageBox()

void GUI_DisplayMessageBox ( int  unknown,
int  titleStringID,
int  contentStringID 
)

Displays a message box with the specified title and content, retrieved through their ID in the string table.

Parameters
unknownAn unknown parameter.
titleStringIDThe ID of the string to use for the message box's title.
contentStringIDThe ID of the string to use for the message box's content.

◆ GUI_DisplayMessageBox_Internal()

void* GUI_DisplayMessageBox_Internal ( int  unknown,
const char *  titleString,
const char *  contentPrefix,
const char *  contentString,
int  buttons,
bool  disableCloseButton 
)

Displays a message box with the specified title and content. A prefix to the content may be specified, which is displayed before the main content.

The buttons to be displayed can be set using the buttons bitfield. Possible values are defined by macros beginning with BUTTON_, which can be bitwise OR'd together to display multiple buttons. A maximum of 3 buttons can be specified.

The true usage of the 4th bit of the buttons bitfield is unknown, however it has been observed to shrink the black box which forms the title bar of the message box.

Note: if no buttons are specified, and the close button is disabled, it is impossible to exit the message box.

Parameters
unknownAn unknown parameter.
[in]titleStringA string to use for the message box's title.
[in]contentPrefixA string to prefix the content with.
[in]contentStringA string to use for the message box's content.
buttonsA bitfield specifying which buttons to show.
disableCloseButtonSet to true to disable the close button.
Returns
An unknown GUI struct.