Codechange: Use parameters, which should be used.

This commit is contained in:
frosch
2023-09-16 23:25:17 +02:00
committed by frosch
parent b6c8f301be
commit b5885295f0
13 changed files with 67 additions and 41 deletions

View File

@@ -698,7 +698,7 @@ struct TooltipsWindow : public Window
void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
{
/* There is only one widget. */
if (widget != WID_TT_BACKGROUND) return;
CopyInDParam(this->params);
size->width = std::min<uint>(GetStringBoundingBox(this->string_id).width, ScaleGUITrad(194));
@@ -711,7 +711,7 @@ struct TooltipsWindow : public Window
void DrawWidget(const Rect &r, int widget) const override
{
/* There is only one widget. */
if (widget != WID_TT_BACKGROUND) return;
GfxFillRect(r, PC_BLACK);
GfxFillRect(r.Shrink(WidgetDimensions::scaled.bevel), PC_LIGHT_YELLOW);