diff options
| author | untodesu <kirill@untode.su> | 2025-12-26 14:50:33 +0500 |
|---|---|---|
| committer | untodesu <kirill@untode.su> | 2025-12-26 14:50:33 +0500 |
| commit | 6c2abde5c99a236453b795abaa6d7d70105e31f7 (patch) | |
| tree | f085049b9615a7d03cca5de40adb6529d6c13e11 /src/game/client/gui/message_box.cc | |
| parent | f40d09cb8f712e87691af4912f3630d92d692779 (diff) | |
| download | voxelius-6c2abde5c99a236453b795abaa6d7d70105e31f7.tar.bz2 voxelius-6c2abde5c99a236453b795abaa6d7d70105e31f7.zip | |
Just a big Ctrl+H refactoring
Diffstat (limited to 'src/game/client/gui/message_box.cc')
| -rw-r--r-- | src/game/client/gui/message_box.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/game/client/gui/message_box.cc b/src/game/client/gui/message_box.cc index 59e2d33..d97267a 100644 --- a/src/game/client/gui/message_box.cc +++ b/src/game/client/gui/message_box.cc @@ -10,7 +10,7 @@ constexpr static ImGuiWindowFlags WINDOW_FLAGS = ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoDecoration; struct Button final { - gui::message_box_action action; + message_box_action action; std::string str_title; }; @@ -18,14 +18,14 @@ static std::string str_title; static std::string str_subtitle; static std::vector<Button> buttons; -void gui::message_box::init(void) +void message_box::init(void) { str_title = std::string(); str_subtitle = std::string(); buttons.clear(); } -void gui::message_box::layout(void) +void message_box::layout(void) { const auto viewport = ImGui::GetMainViewport(); const auto window_start = ImVec2(0.0f, viewport->Size.y * 0.30f); @@ -68,27 +68,27 @@ void gui::message_box::layout(void) ImGui::End(); } -void gui::message_box::reset(void) +void message_box::reset(void) { str_title.clear(); str_subtitle.clear(); buttons.clear(); } -void gui::message_box::set_title(std::string_view title) +void message_box::set_title(std::string_view title) { - str_title = gui::language::resolve(title); + str_title = language::resolve(title); } -void gui::message_box::set_subtitle(std::string_view subtitle) +void message_box::set_subtitle(std::string_view subtitle) { - str_subtitle = gui::language::resolve(subtitle); + str_subtitle = language::resolve(subtitle); } -void gui::message_box::add_button(std::string_view text, const message_box_action& action) +void message_box::add_button(std::string_view text, const message_box_action& action) { Button button = {}; - button.str_title = std::format("{}###MessageBox_Button{}", gui::language::resolve(text), buttons.size()); + button.str_title = std::format("{}###MessageBox_Button{}", language::resolve(text), buttons.size()); button.action = action; buttons.push_back(button); |
