Skip to content

Commit

Permalink
gui2/text_box: Store hint text as a t_string
Browse files Browse the repository at this point in the history
Storing it in a regular string results in issues with the game getting
stuck with the translation for the locale that was set during GUI2
initialization and not reflecting changes when switching languages later
on.

(cherry-picked from commit eacbc5f)
  • Loading branch information
irydacea committed Oct 7, 2018
1 parent ddc2ba4 commit 46eadd7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/gui/widgets/text_box.cpp
Expand Up @@ -481,7 +481,7 @@ builder_text_box::builder_text_box(const config& cfg)
: builder_styled_widget(cfg)
, history(cfg["history"])
, max_input_length(cfg["max_input_length"])
, hint_text(cfg["hint_text"])
, hint_text(cfg["hint_text"].t_str())
, hint_image(cfg["hint_image"])
{
}
Expand Down
2 changes: 1 addition & 1 deletion src/gui/widgets/text_box.hpp
Expand Up @@ -324,7 +324,7 @@ struct builder_text_box : public builder_styled_widget

std::size_t max_input_length;

std::string hint_text;
t_string hint_text;
std::string hint_image;
};

Expand Down

0 comments on commit 46eadd7

Please sign in to comment.