OpenTTD Source  1.11.0-beta2
highscore_gui.cpp File Reference
#include "stdafx.h"
#include "highscore.h"
#include "table/strings.h"
#include "gfx_func.h"
#include "table/sprites.h"
#include "window_gui.h"
#include "window_func.h"
#include "network/network.h"
#include "command_func.h"
#include "company_func.h"
#include "company_base.h"
#include "strings_func.h"
#include "hotkeys.h"
#include "zoom_func.h"
#include "widgets/highscore_widget.h"
#include "safeguards.h"

Go to the source code of this file.

Data Structures

struct  EndGameHighScoreBaseWindow
 
struct  EndGameWindow
 End game window shown at the end of the game. More...
 
struct  HighScoreWindow
 

Functions

void ShowHighscoreTable (int difficulty, int8 ranking)
 Show the highscore table for a given difficulty. More...
 
void ShowEndGameChart ()
 Show the endgame victory screen in 2050. More...
 

Variables

static const NWidgetPart _nested_highscore_widgets []
 
static WindowDesc _highscore_desc (WDP_MANUAL, nullptr, 0, 0, WC_HIGHSCORE, WC_NONE, 0, _nested_highscore_widgets, lengthof(_nested_highscore_widgets))
 
static WindowDesc _endgame_desc (WDP_MANUAL, nullptr, 0, 0, WC_ENDSCREEN, WC_NONE, 0, _nested_highscore_widgets, lengthof(_nested_highscore_widgets))
 

Detailed Description

Definition of the HighScore and EndGame windows

Definition in file highscore_gui.cpp.

Function Documentation

◆ ShowEndGameChart()

void ShowEndGameChart ( )

◆ ShowHighscoreTable()

void ShowHighscoreTable ( int  difficulty,
int8  ranking 
)

Show the highscore table for a given difficulty.

When called from endgame ranking is set to the top5 element that was newly added and is thus highlighted

Definition at line 230 of file highscore_gui.cpp.

References DeleteWindowByClass(), and WC_HIGHSCORE.

Variable Documentation

◆ _nested_highscore_widgets

const NWidgetPart _nested_highscore_widgets[]
static
Initial value:
= {
}

Definition at line 207 of file highscore_gui.cpp.

SetResize
static NWidgetPart SetResize(int16 dx, int16 dy)
Widget part function for setting the resize step.
Definition: widget_type.h:929
WID_H_BACKGROUND
@ WID_H_BACKGROUND
Background of the window.
Definition: highscore_widget.h:15
EndContainer
static NWidgetPart EndContainer()
Widget part function for denoting the end of a container (horizontal, vertical, WWT_FRAME,...
Definition: widget_type.h:998
NWidget
static NWidgetPart NWidget(WidgetType tp, Colours col, int16 idx=-1)
Widget part function for starting a new 'real' widget.
Definition: widget_type.h:1113
SetMinimalSize
static NWidgetPart SetMinimalSize(int16 x, int16 y)
Widget part function for setting the minimal size.
Definition: widget_type.h:946
WWT_PANEL
@ WWT_PANEL
Simple depressed panel.
Definition: widget_type.h:48