|
@@ -50,7 +50,7 @@ struct GoalListWindow : public Window {
|
|
|
this->OnInvalidateData(0);
|
|
|
}
|
|
|
|
|
|
/* virtual */ void SetStringParameters(int widget) const
|
|
|
void SetStringParameters(int widget) const override
|
|
|
{
|
|
|
if (widget != WID_GOAL_CAPTION) return;
|
|
|
|
|
@@ -62,7 +62,7 @@ struct GoalListWindow : public Window {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/* virtual */ void OnClick(Point pt, int widget, int click_count)
|
|
|
void OnClick(Point pt, int widget, int click_count) override
|
|
|
{
|
|
|
if (widget != WID_GOAL_LIST) return;
|
|
|
|
|
@@ -177,7 +177,7 @@ struct GoalListWindow : public Window {
|
|
|
return 3 + num_global + num_company;
|
|
|
}
|
|
|
|
|
|
/* virtual */ void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
|
|
|
void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
|
|
|
{
|
|
|
if (widget != WID_GOAL_LIST) return;
|
|
|
Dimension d = maxdim(GetStringBoundingBox(STR_GOALS_GLOBAL_TITLE), GetStringBoundingBox(STR_GOALS_COMPANY_TITLE));
|
|
@@ -272,7 +272,7 @@ struct GoalListWindow : public Window {
|
|
|
DrawPartialGoalList(pos, cap, x, y, right, progress_col_width, false, column);
|
|
|
}
|
|
|
|
|
|
/* virtual */ void OnPaint()
|
|
|
void OnPaint() override
|
|
|
{
|
|
|
this->DrawWidgets();
|
|
|
|
|
@@ -299,7 +299,7 @@ struct GoalListWindow : public Window {
|
|
|
|
|
|
}
|
|
|
|
|
|
/* virtual */ void OnResize()
|
|
|
void OnResize() override
|
|
|
{
|
|
|
this->vscroll->SetCapacityFromWidget(this, WID_GOAL_LIST);
|
|
|
}
|
|
@@ -309,7 +309,7 @@ struct GoalListWindow : public Window {
|
|
|
* @param data Information about the changed data.
|
|
|
* @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
|
|
|
*/
|
|
|
/* virtual */ void OnInvalidateData(int data = 0, bool gui_scope = true)
|
|
|
void OnInvalidateData(int data = 0, bool gui_scope = true) override
|
|
|
{
|
|
|
if (!gui_scope) return;
|
|
|
this->vscroll->SetCount(this->CountLines());
|
|
@@ -388,7 +388,7 @@ struct GoalQuestionWindow : public Windo
|
|
|
free(this->question);
|
|
|
}
|
|
|
|
|
|
/* virtual */ void SetStringParameters(int widget) const
|
|
|
void SetStringParameters(int widget) const override
|
|
|
{
|
|
|
switch (widget) {
|
|
|
case WID_GQ_CAPTION:
|
|
@@ -409,7 +409,7 @@ struct GoalQuestionWindow : public Windo
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/* virtual */ void OnClick(Point pt, int widget, int click_count)
|
|
|
void OnClick(Point pt, int widget, int click_count) override
|
|
|
{
|
|
|
switch (widget) {
|
|
|
case WID_GQ_BUTTON_1:
|
|
@@ -429,7 +429,7 @@ struct GoalQuestionWindow : public Windo
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/* virtual */ void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
|
|
|
void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
|
|
|
{
|
|
|
if (widget != WID_GQ_QUESTION) return;
|
|
|
|
|
@@ -437,7 +437,7 @@ struct GoalQuestionWindow : public Windo
|
|
|
size->height = GetStringHeight(STR_JUST_RAW_STRING, size->width) + WD_PAR_VSEP_WIDE;
|
|
|
}
|
|
|
|
|
|
/* virtual */ void DrawWidget(const Rect &r, int widget) const
|
|
|
void DrawWidget(const Rect &r, int widget) const override
|
|
|
{
|
|
|
if (widget != WID_GQ_QUESTION) return;
|
|
|
|