diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 97a6c69717..5fdc9b0ca5 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -7,6 +7,7 @@ - Fix: [#21919] Non-recolourable cars still show colour picker. - Fix: [#23108] Missing pieces on Hypercoaster and Hyper-Twister, even with the ‘all drawable track pieces’ cheat enabled. - Fix: [#24013] Failure to load a scenario preview image (minimap) could lead to an uncaught exception error message. +- Fix: [#24121] Checkbox labels run beyond the edge of the window if they’re too long to fit. - Fix: [#24142] [Plugin] Track origin is miscalculated on downward slopes. - Fix: [#24220] Narrow station platforms have missing sides on certain rotations. diff --git a/src/openrct2-ui/interface/Widget.cpp b/src/openrct2-ui/interface/Widget.cpp index bdc0442523..d3523eda5a 100644 --- a/src/openrct2-ui/interface/Widget.cpp +++ b/src/openrct2-ui/interface/Widget.cpp @@ -653,8 +653,16 @@ namespace OpenRCT2::Ui if (widget.text == kStringIdNone) return; - auto [stringId, formatArgs] = WidgetGetStringidAndArgs(widget); - GfxDrawStringLeftCentred(dpi, stringId, formatArgs, colour, { midLeft + ScreenCoordsXY{ 14, 0 } }); + auto stringId = widget.text; + auto ft = Formatter::Common(); + if (widget.flags & WIDGET_FLAGS::TEXT_IS_STRING) + { + stringId = STR_STRING; + ft.Add(widget.string); + } + + DrawTextEllipsised( + dpi, w.windowPos + ScreenCoordsXY{ widget.left + 14, widget.textTop() }, widget.width() - 14, stringId, ft, colour); } /**