16 #define GETTEXT_DOMAIN "wesnoth-lib"
36 static std::string wid =
"file_progress";
47 auto& label_widget = find_widget<label>(
this,
"message",
false);
49 label_widget.set_use_markup(
true);
52 find_widget<button>(
this,
"placeholder",
false).set_active(
false);
65 using std::chrono::duration_cast;
66 using std::chrono::milliseconds;
67 using namespace std::chrono_literals;
69 auto now = clock::now();
70 auto elapsed = duration_cast<milliseconds>(now -
update_time_);
79 find_widget<progress_bar>(
window,
"progress",
false).set_percentage(value);
void update_progress(unsigned value)
file_progress(const std::string &title, const std::string &message)
std::chrono::time_point< clock > update_time_
Main class to show messages to the user.
The popup class shows windows that are shown non-modal.
base class of top level items, the only item which needs to store the final canvases to draw on.
#define REGISTER_WINDOW(id)
Registers a window.
int get_frame_length()
Returns the length of one display frame, in milliseconds.
void draw()
Trigger a draw cycle.