30 #include "table/strings.h"
58 SetDParam(0, STR_GOALS_SPECTATOR_CAPTION);
92 if (s->
company == this->window_number) {
144 default: NOT_REACHED();
162 uint num_company = 0;
167 }
else if (s->
company == this->window_number) {
173 if (num_global == 0) num_global = 1;
174 if (num_company == 0) num_company = 1;
177 return 3 + num_global + num_company;
185 resize->height = d.height;
221 DrawString(x + (rtl ? width_reduction : 0), right - (rtl ? 0 : width_reduction), y + pos * FONT_HEIGHT_NORMAL, STR_GOALS_TEXT);
230 int progress_right = rtl ? x + progress_col_width : right;
244 DrawString(x, right, y + pos * FONT_HEIGHT_NORMAL, str);
289 if (str_width > max_width) max_width = str_width;
294 uint progress_col_width =
min(max_width, wid->
current_x);
314 if (!gui_scope)
return;
331 NWidget(
WWT_EMPTY, COLOUR_GREY,
WID_GOAL_LIST),
SetResize(1, 1),
SetMinimalTextLines(2, 0),
SetFill(1, 1),
SetPadding(
WD_FRAMERECT_TOP, 2,
WD_FRAMETEXT_BOTTOM, 2),
344 _nested_goals_list_widgets,
lengthof(_nested_goals_list_widgets)
355 AllocateWindowDescFront<GoalListWindow>(&_goals_list_desc, company);
368 this->question =
stredup(question);
395 SetDParam(0, STR_GOAL_QUESTION_CAPTION_QUESTION + this->
type);
456 NWidget(
WWT_EMPTY, INVALID_COLOUR,
WID_GQ_QUESTION),
SetMinimalSize(300, 0),
SetPadding(8, 8, 8, 8),
SetFill(1, 0),
479 _nested_goal_question_widgets,
lengthof(_nested_goal_question_widgets)