14 #include "table/strings.h"
31 uint32 background_img;
38 ResizeWindow(
this, _screen.width - this->width, _screen.height - this->height);
42 void SetupHighScoreEndWindow()
45 if (this->
width != _screen.width || this->height != _screen.height)
ResizeWindow(
this, _screen.width - this->width, _screen.height - this->height);
54 for (uint i = 0; i < 10; i++) {
55 DrawSprite(this->background_img + i, PAL_NONE, pt.x, pt.y + (i * dim.height));
62 Point pt = {
max(0, (_screen.width / 2) - (x / 2)),
max(0, (_screen.height / 2) - (y / 2))};
102 this->background_img = SPR_TYCOON_IMG1_BEGIN;
107 this->background_img = SPR_TYCOON_IMG2_BEGIN;
134 this->SetupHighScoreEndWindow();
138 if (c == NULL)
return;
142 if (this->background_img == SPR_TYCOON_IMG2_BEGIN) {
146 DrawStringMultiLine(pt.x + 15, pt.x + 640 - 25, pt.y + 90, pt.y + 160, STR_HIGHSCORE_PRESIDENT_OF_COMPANY_ACHIEVES_STATUS, TC_FROMSTRING,
SA_CENTER);
169 this->background_img = SPR_HIGHSCORE_CHART_BEGIN;
170 this->rank = ranking;
184 this->SetupHighScoreEndWindow();
193 DrawString(pt.x + 40, pt.x + 600, pt.y + 140 + (i * 55), STR_HIGHSCORE_POSITION);
195 if (hs[i].company[0] !=
'\0') {
196 TextColour colour = (this->rank == i) ? TC_RED : TC_BLACK;
199 DrawString(pt.x + 71, pt.x + 569, pt.y + 140 + (i * 55), STR_JUST_BIG_RAW_STRING, colour);
208 static const NWidgetPart _nested_highscore_widgets[] = {
216 _nested_highscore_widgets,
lengthof(_nested_highscore_widgets)
223 _nested_highscore_widgets,
lengthof(_nested_highscore_widgets)