|
@@ -799,13 +799,13 @@ static void EndGameWndProc(Window *w, Wi
|
|
|
SetDParam(2, EndGameGetPerformanceTitleFromValue(p->old_economy[0].performance_history));
|
|
|
DrawStringMultiCenter(x + (640 / 2), y + 157, STR_021B_ACHIEVES_STATUS, 640);
|
|
|
}
|
|
|
} break;
|
|
|
case WE_CLICK: /* Close the window (and show the highscore window) */
|
|
|
DeleteWindow(w);
|
|
|
break;
|
|
|
break;
|
|
|
case WE_DESTROY: /* Show the highscore window when this one is closed */
|
|
|
if (!_networking) DoCommandP(0, 0, 0, NULL, CMD_PAUSE); // unpause
|
|
|
ShowHighscoreTable(w->window_number, WP(w, highscore_d).rank);
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
@@ -856,21 +856,21 @@ static const Widget _highscore_widgets[]
|
|
|
{ WWT_PANEL, RESIZE_NONE, 16, 0, 640, 0, 480, 0x0, STR_NULL},
|
|
|
{ WIDGETS_END},
|
|
|
};
|
|
|
|
|
|
static const WindowDesc _highscore_desc = {
|
|
|
0, 0, 641, 481,
|
|
|
WC_HIGHSCORE_ENDSCREEN,0,
|
|
|
WC_HIGHSCORE,0,
|
|
|
0,
|
|
|
_highscore_widgets,
|
|
|
HighScoreWndProc
|
|
|
};
|
|
|
|
|
|
static const WindowDesc _endgame_desc = {
|
|
|
0, 0, 641, 481,
|
|
|
WC_HIGHSCORE_ENDSCREEN,0,
|
|
|
WC_ENDSCREEN,0,
|
|
|
0,
|
|
|
_highscore_widgets,
|
|
|
EndGameWndProc
|
|
|
};
|
|
|
|
|
|
/* Show the highscore table for a given difficulty. When called from
|
|
@@ -883,13 +883,13 @@ void ShowHighscoreTable(int difficulty,
|
|
|
// pause game to show the chart
|
|
|
if (!_networking) DoCommandP(0, 1, 0, NULL, CMD_PAUSE);
|
|
|
|
|
|
/* Close all always on-top windows to get a clean screen */
|
|
|
if (_game_mode != GM_MENU) HideVitalWindows();
|
|
|
|
|
|
DeleteWindowById(WC_HIGHSCORE_ENDSCREEN, 0);
|
|
|
DeleteWindowByClass(WC_HIGHSCORE);
|
|
|
w = AllocateWindowDesc(&_highscore_desc);
|
|
|
|
|
|
if (w != NULL) {
|
|
|
MarkWholeScreenDirty();
|
|
|
w->window_number = difficulty; // show highscore chart for difficulty...
|
|
|
WP(w, highscore_d).background_img = SPR_HIGHSCORE_CHART_BEGIN; // which background to show
|
|
@@ -906,13 +906,13 @@ void ShowEndGameChart(void)
|
|
|
/* Dedicated server doesn't need the highscore window */
|
|
|
if (_network_dedicated) return;
|
|
|
/* Pause in single-player to have a look at the highscore at your own leisure */
|
|
|
if (!_networking) DoCommandP(0, 1, 0, NULL, CMD_PAUSE);
|
|
|
|
|
|
HideVitalWindows();
|
|
|
DeleteWindowById(WC_HIGHSCORE_ENDSCREEN, 0);
|
|
|
DeleteWindowByClass(WC_ENDSCREEN);
|
|
|
w = AllocateWindowDesc(&_endgame_desc);
|
|
|
|
|
|
if (w != NULL) {
|
|
|
MarkWholeScreenDirty();
|
|
|
|
|
|
WP(w, highscore_d).background_img = SPR_TYCOON_IMG1_BEGIN;
|