Change: Make vehicle list dropdown buttons resize to fit strings. (#10286)

This commit is contained in:
PeterN
2022-12-27 18:39:37 +00:00
committed by GitHub
parent 6caed5f15e
commit f7e2b6ef12
4 changed files with 76 additions and 20 deletions

View File

@@ -148,6 +148,7 @@ static inline void GfxFillRect(const Rect &r, int colour, FillRectMode mode = FI
Dimension GetStringBoundingBox(const char *str, FontSize start_fontsize = FS_NORMAL);
Dimension GetStringBoundingBox(const std::string &str, FontSize start_fontsize = FS_NORMAL);
Dimension GetStringBoundingBox(StringID strid, FontSize start_fontsize = FS_NORMAL);
uint GetStringListWidth(const StringID *list, FontSize fontsize = FS_NORMAL);
int GetStringHeight(const char *str, int maxw, FontSize fontsize = FS_NORMAL);
int GetStringHeight(StringID str, int maxw);
int GetStringLineCount(StringID str, int maxw);