15 #define GETTEXT_DOMAIN "wesnoth-lib" 37 static std::string wid =
"file_progress";
48 auto& label_widget = find_widget<label>(
this,
"message",
false);
50 label_widget.set_use_markup(
true);
53 find_widget<button>(
this,
"placeholder",
false).
set_active(
false);
66 using std::chrono::duration_cast;
67 using std::chrono::milliseconds;
70 auto now = clock::now();
71 auto elapsed = duration_cast<milliseconds>(now -
update_time_);
80 find_widget<progress_bar>(
window,
"progress",
false).set_percentage(value);
window(const builder_window::window_resolution &definition)
< Needs to be initialized in show.
Main class to show messages to the user.
file_progress(const std::string &title, const std::string &message)
This file contains the settings handling of the widget library.
std::chrono::time_point< clock > update_time_
int get_frame_length()
Returns the length of one display frame, in milliseconds.
virtual void set_active(const bool active) override
See styled_widget::set_active.
The popup class shows windows that are shown non-modal.
#define REGISTER_WINDOW(id)
Registers a window.
void update_progress(unsigned value)
base class of top level items, the only item which needs to store the final canvases to draw on...
void draw()
Trigger a draw cycle.