Merge 1.10.0-beta1

This commit is contained in:
dP
2019-11-01 16:08:44 +03:00
parent 4bf7002873
commit ceea4c88be
920 changed files with 26309 additions and 16944 deletions
+13 -13
View File
@@ -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));
@@ -231,7 +231,7 @@ struct GoalListWindow : public Window {
}
case GC_PROGRESS:
if (s->progress != NULL) {
if (s->progress != nullptr) {
SetDParamStr(0, s->progress);
StringID str = s->completed ? STR_GOALS_PROGRESS_COMPLETE : STR_GOALS_PROGRESS;
int progress_x = x;
@@ -280,7 +280,7 @@ struct GoalListWindow : public Window {
DrawPartialGoalList(pos, cap, x, y, right, progress_col_width, false, column);
}
/* virtual */ void OnPaint()
void OnPaint() override
{
this->DrawWidgets();
@@ -290,7 +290,7 @@ struct GoalListWindow : public Window {
uint max_width = 0;
Goal *s;
FOR_ALL_GOALS(s) {
if (s->progress != NULL) {
if (s->progress != nullptr) {
SetDParamStr(0, s->progress);
StringID str = s->completed ? STR_GOALS_PROGRESS_COMPLETE : STR_GOALS_PROGRESS;
uint str_width = GetStringBoundingBox(str).width;
@@ -307,7 +307,7 @@ struct GoalListWindow : public Window {
}
/* virtual */ void OnResize()
void OnResize() override
{
this->vscroll->SetCapacityFromWidget(this, WID_GOAL_LIST);
}
@@ -317,7 +317,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());
@@ -396,7 +396,7 @@ struct GoalQuestionWindow : public Window {
free(this->question);
}
/* virtual */ void SetStringParameters(int widget) const
void SetStringParameters(int widget) const override
{
switch (widget) {
case WID_GQ_CAPTION:
@@ -417,7 +417,7 @@ struct GoalQuestionWindow : public Window {
}
}
/* 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:
@@ -437,7 +437,7 @@ struct GoalQuestionWindow : public Window {
}
}
/* 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;
@@ -445,7 +445,7 @@ struct GoalQuestionWindow : public Window {
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;
@@ -481,7 +481,7 @@ static const NWidgetPart _nested_goal_question_widgets[] = {
};
static WindowDesc _goal_question_list_desc(
WDP_CENTER, NULL, 0, 0,
WDP_CENTER, nullptr, 0, 0,
WC_GOAL_QUESTION, WC_NONE,
WDF_CONSTRUCTION,
_nested_goal_question_widgets, lengthof(_nested_goal_question_widgets)