Update to 1.10.0-beta1

This commit is contained in:
dP
2019-10-31 22:24:28 +03:00
parent b84a475e14
commit 599ccf0c2b
1470 changed files with 354219 additions and 16795 deletions

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));
@@ -223,7 +223,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;
@@ -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();
@@ -282,7 +282,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;
@@ -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 Window {
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 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:
@@ -429,7 +429,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;
@@ -437,7 +437,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;
@@ -473,7 +473,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)