49 const std::string& window_id,
50 const std::string& title,
52 const std::string& portrait,
62 , input_text_(nullptr)
63 , input_maximum_length_(0)
65 , chosen_option_(nullptr)
77 void set_input(
const std::string& caption,
79 const unsigned maximum_length);
88 void set_option_list(
const std::vector<wml_message_option>& option_list,
141 const std::string& portrait,
148 virtual const std::string& window_id()
const override;
157 const std::string& portrait,
164 virtual const std::string& window_id()
const override;
173 const std::string& portrait,
175 const std::string& second_portrait,
176 const bool second_mirror)
178 , second_portrait_(second_portrait)
179 , second_mirror_(second_mirror)
184 virtual const std::string& window_id()
const override;
wml_message_right(const std::string &title, const std::string &message, const std::string &portrait, const bool mirror)
Parameter pack for message portrait.
std::string portrait_
Filename of the portrait.
int chosen_option
The initially chosen option.
std::string title_
The title for the dialog.
std::vector< wml_message_option > option_list_
The list of options the user can choose.
Main class to show messages to the user.
std::string input_caption_
The caption to show for the input text.
Parameter pack for message list input options.
A label displays a text, the text can be wrapped but no scrollbars are provided.
wml_message_left(const std::string &title, const std::string &message, const std::string &portrait, const bool mirror)
wml_message_option(std::string label, std::string description="", std::string image="")
wml_message_base(const std::string &window_id, const std::string &title, const std::string &message, const std::string &portrait, const bool mirror)
wml_message_double(const std::string &title, const std::string &message, const std::string &portrait, const bool mirror, const std::string &second_portrait, const bool second_mirror)
Shows a dialog with the portrait on the left side.
std::string label() const
std::string image() const
unsigned input_maximum_length_
The maximum length of the input text.
std::string portrait
Filename of the portrait.
bool has_input_
Do we need to show an input box?
int show_wml_message(const std::string &title, const std::string &message, const wml_message_portrait *left, const wml_message_portrait *right, const wml_message_options &options, const wml_message_input &input)
Helper function to show a portrait.
bool mirror_
Mirror the portrait?
Base class for the wml generated messages.
Helper class for message options.
std::string message_
The message to show to the user.
Shows a dialog with two portraits, one on each side.
std::vector< wml_message_option > option_list
A list of options to select in the dialog.
std::string * input_text_
The text input.
Abstract base class for all modal dialogs.
Functions to load and save images from/to disk.
int * chosen_option_
The chosen option.
std::string second_portrait_
Shows a dialog with the portrait on the right side.
base class of top level items, the only item which needs to store the final canvases to draw on...
bool mirror
Does the portrait need to be mirrored?
std::string description() const
std::string image_
The image which is shown in the dialog.