src/misc_gui.cpp
changeset 9273 35e0224ea8f1
parent 9272 e64b518a7b54
child 9285 235e5e2d7f55
equal deleted inserted replaced
9272:e64b518a7b54 9273:35e0224ea8f1
    81 public:
    81 public:
    82 	char landinfo_data[LAND_INFO_LINES][LAND_INFO_LINE_BUFF_SIZE];
    82 	char landinfo_data[LAND_INFO_LINES][LAND_INFO_LINE_BUFF_SIZE];
    83 
    83 
    84 	virtual void OnPaint()
    84 	virtual void OnPaint()
    85 	{
    85 	{
    86 		DrawWindowWidgets(this);
    86 		this->DrawWidgets();
    87 
    87 
    88 		DoDrawStringCentered(140, 16, this->landinfo_data[0], TC_LIGHT_BLUE);
    88 		DoDrawStringCentered(140, 16, this->landinfo_data[0], TC_LIGHT_BLUE);
    89 		DoDrawStringCentered(140, 27, this->landinfo_data[1], TC_FROMSTRING);
    89 		DoDrawStringCentered(140, 27, this->landinfo_data[1], TC_FROMSTRING);
    90 		DoDrawStringCentered(140, 38, this->landinfo_data[2], TC_FROMSTRING);
    90 		DoDrawStringCentered(140, 38, this->landinfo_data[2], TC_FROMSTRING);
    91 		DoDrawStringCentered(140, 49, this->landinfo_data[3], TC_FROMSTRING);
    91 		DoDrawStringCentered(140, 49, this->landinfo_data[3], TC_FROMSTRING);
   287 			"",
   287 			"",
   288 			"And last but not least:",
   288 			"And last but not least:",
   289 			"  Chris Sawyer - For an amazing game!"
   289 			"  Chris Sawyer - For an amazing game!"
   290 		};
   290 		};
   291 
   291 
   292 		DrawWindowWidgets(this);
   292 		this->DrawWidgets();
   293 
   293 
   294 		/* Show original copyright and revision version */
   294 		/* Show original copyright and revision version */
   295 		DrawStringCentered(210, 17, STR_00B6_ORIGINAL_COPYRIGHT, TC_FROMSTRING);
   295 		DrawStringCentered(210, 17, STR_00B6_ORIGINAL_COPYRIGHT, TC_FROMSTRING);
   296 		DrawStringCentered(210, 17 + 10, STR_00B7_VERSION, TC_FROMSTRING);
   296 		DrawStringCentered(210, 17 + 10, STR_00B7_VERSION, TC_FROMSTRING);
   297 
   297 
   369 			{15, 25, 30}, // _errmsg_widgets
   369 			{15, 25, 30}, // _errmsg_widgets
   370 			{45, 65, 90}, // _errmsg_face_widgets
   370 			{45, 65, 90}, // _errmsg_face_widgets
   371 		};
   371 		};
   372 
   372 
   373 		CopyInDParam(0, this->decode_params, lengthof(this->decode_params));
   373 		CopyInDParam(0, this->decode_params, lengthof(this->decode_params));
   374 		DrawWindowWidgets(this);
   374 		this->DrawWidgets();
   375 		CopyInDParam(0, this->decode_params, lengthof(this->decode_params));
   375 		CopyInDParam(0, this->decode_params, lengthof(this->decode_params));
   376 
   376 
   377 		/* If the error message comes from a NewGRF, we must use the text ref. stack reserved for error messages.
   377 		/* If the error message comes from a NewGRF, we must use the text ref. stack reserved for error messages.
   378 		 * If the message doesn't come from a NewGRF, it won't use the TTDP-style text ref. stack, so we won't hurt anything
   378 		 * If the message doesn't come from a NewGRF, it won't use the TTDP-style text ref. stack, so we won't hurt anything
   379 		 */
   379 		 */
   996 	}
   996 	}
   997 
   997 
   998 	virtual void OnPaint()
   998 	virtual void OnPaint()
   999 	{
   999 	{
  1000 		SetDParam(0, this->caption);
  1000 		SetDParam(0, this->caption);
  1001 		DrawWindowWidgets(this);
  1001 		this->DrawWidgets();
  1002 
  1002 
  1003 		this->DrawEditBox(QUERY_STR_WIDGET_TEXT);
  1003 		this->DrawEditBox(QUERY_STR_WIDGET_TEXT);
  1004 	}
  1004 	}
  1005 
  1005 
  1006 	void OnOk()
  1006 	void OnOk()
  1151 	}
  1151 	}
  1152 
  1152 
  1153 	virtual void OnPaint()
  1153 	virtual void OnPaint()
  1154 	{
  1154 	{
  1155 		CopyInDParam(0, this->params, lengthof(this->params));
  1155 		CopyInDParam(0, this->params, lengthof(this->params));
  1156 		DrawWindowWidgets(this);
  1156 		this->DrawWidgets();
  1157 		CopyInDParam(0, this->params, lengthof(this->params));
  1157 		CopyInDParam(0, this->params, lengthof(this->params));
  1158 
  1158 
  1159 		DrawStringMultiCenter(this->width / 2, (this->height / 2) - 10, this->message, this->width - 2);
  1159 		DrawStringMultiCenter(this->width / 2, (this->height / 2) - 10, this->message, this->width - 2);
  1160 	}
  1160 	}
  1161 
  1161 
  1417 	{
  1417 	{
  1418 		int pos;
  1418 		int pos;
  1419 		int y;
  1419 		int y;
  1420 
  1420 
  1421 		SetVScrollCount(this, _fios_num);
  1421 		SetVScrollCount(this, _fios_num);
  1422 		DrawWindowWidgets(this);
  1422 		this->DrawWidgets();
  1423 		DrawFiosTexts(this->width);
  1423 		DrawFiosTexts(this->width);
  1424 
  1424 
  1425 		if (_savegame_sort_dirty) {
  1425 		if (_savegame_sort_dirty) {
  1426 			_savegame_sort_dirty = false;
  1426 			_savegame_sort_dirty = false;
  1427 			MakeSortedSaveGameList();
  1427 			MakeSortedSaveGameList();
  1428 		}
  1428 		}
  1429 
  1429 
  1430 		GfxFillRect(this->widget[7].left + 1, this->widget[7].top + 1, this->widget[7].right, this->widget[7].bottom, 0xD7);
  1430 		GfxFillRect(this->widget[7].left + 1, this->widget[7].top + 1, this->widget[7].right, this->widget[7].bottom, 0xD7);
  1431 		DrawSortButtonState(this, _savegame_sort_order & SORT_BY_NAME ? 2 : 3, _savegame_sort_order & SORT_DESCENDING ? SBS_DOWN : SBS_UP);
  1431 		this->DrawSortButtonState(_savegame_sort_order & SORT_BY_NAME ? 2 : 3, _savegame_sort_order & SORT_DESCENDING ? SBS_DOWN : SBS_UP);
  1432 
  1432 
  1433 		y = this->widget[7].top + 1;
  1433 		y = this->widget[7].top + 1;
  1434 		for (pos = this->vscroll.pos; pos < _fios_num; pos++) {
  1434 		for (pos = this->vscroll.pos; pos < _fios_num; pos++) {
  1435 			const FiosItem *item = _fios_list + pos;
  1435 			const FiosItem *item = _fios_list + pos;
  1436 
  1436