You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
OpenTTD-patches/src/game
PeterN d42a78f3e8
Codechange: Make DropDownListStringItem preformat and remove other implementations. (#11063)
Having to choose between DropDownListStringItem, DropDownListCharStringItem, and DropDownListParamStringItem depending on whether to draw a StringID, a raw string, or a StringID with extra parameters was needlessly complex.

Instead, allow passing a StringID or raw string to DropDownListStringItem. This will preformat the StringID into a raw string, and can therefore accept parameters via the normal SetDParam mechanism.

This also means that strings no longer need to be formatted on every draw.
1 year ago
..
CMakeLists.txt
game.hpp Codechange: use fmt::format_to to format the help message 1 year ago
game_config.cpp Codechange: use std::string for script info/library finding 1 year ago
game_config.hpp Codechange: use std::string for script info/library finding 1 year ago
game_core.cpp Codechange: use fmt::format_to to format the help message 1 year ago
game_gui.cpp Codechange: Make DropDownListStringItem preformat and remove other implementations. (#11063) 1 year ago
game_gui.hpp
game_info.cpp Codechange: Move includes for common STL headers to stdafx. 1 year ago
game_info.hpp Codechange: use std::string for script library category 1 year ago
game_instance.cpp Codechange: replace 'const char *' script API parameters with std::string 1 year ago
game_instance.hpp Codechange: replace 'const char *' script API parameters with std::string 1 year ago
game_scanner.cpp Codechange: use std::string for script info/library finding 1 year ago
game_scanner.hpp Codechange: use std::string for script info/library finding 1 year ago
game_text.cpp Codechange: let ReadLine return a string instead of passing a buffer 1 year ago
game_text.hpp Codechange: rename smallvec_type to container_func and use only when needed 1 year ago