OpenTTD Source: src/league_gui.cpp File Reference

OpenTTD Source 13.2.1

Data Structures | Functions | Variables
league_gui.cpp File Reference
`#include "stdafx.h"`
`#include "league_gui.h"`
`#include "company_base.h"`
`#include "company_gui.h"`
`#include "gui.h"`
`#include "industry.h"`
`#include "league_base.h"`
`#include "sortlist_type.h"`
`#include "story_base.h"`
`#include "strings_func.h"`
`#include "tile_map.h"`
`#include "town.h"`
`#include "viewport_func.h"`
`#include "window_gui.h"`
`#include "widgets/league_widget.h"`
`#include "table/strings.h"`
`#include "table/sprites.h"`
`#include "safeguards.h"`

Go to the source code of this file.

## Data Structures
class | PerformanceLeagueWindow
class | ScriptLeagueWindow

## Functions
static StringID | GetPerformanceTitleFromValue (uint value)
void | ShowPerformanceLeagueTable ()
static void | HandleLinkClick (Link link)
void | ShowScriptLeagueTable (LeagueTableID table)
void | ShowFirstLeagueTable ()

## Variables
static const StringID | _performance_titles []
static const NWidgetPart | _nested_performance_league_widgets []
static WindowDesc | _performance_league_desc (WDP_AUTO, "league", 0, 0, WC_COMPANY_LEAGUE, WC_NONE, 0, _nested_performance_league_widgets, lengthof(_nested_performance_league_widgets))
static const NWidgetPart | _nested_script_league_widgets []
static WindowDesc | _script_league_desc (WDP_AUTO, "league", 0, 0, WC_COMPANY_LEAGUE, WC_NONE, 0, _nested_script_league_widgets, lengthof(_nested_script_league_widgets))

## Detailed Description

GUI for league tables.

Definition in file league_gui.cpp.

## Variable Documentation

## ◆ _nested_performance_league_widgets

const NWidgetPart _nested_performance_league_widgets[]
| static

Initial value:
= {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
NWidget(WWT_CAPTION, COLOUR_BROWN), SetDataTip(STR_COMPANY_LEAGUE_TABLE_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_SHADEBOX, COLOUR_BROWN),
NWidget(WWT_STICKYBOX, COLOUR_BROWN),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_BROWN, WID_PLT_BACKGROUND), SetMinimalSize(400, 0), SetMinimalTextLines(15, WidgetDimensions::unscaled.framerect.Vertical()),
}

Definition at line 189 of file league_gui.cpp.

## ◆ _nested_script_league_widgets

const NWidgetPart _nested_script_league_widgets[]
| static

Initial value:
= {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
NWidget(WWT_CAPTION, COLOUR_BROWN, WID_SLT_CAPTION), SetDataTip(STR_BLACK_RAW_STRING, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_SHADEBOX, COLOUR_BROWN),
NWidget(WWT_STICKYBOX, COLOUR_BROWN),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_BROWN, WID_SLT_BACKGROUND), SetMinimalSize(400, 0), SetMinimalTextLines(15, WidgetDimensions::scaled.framerect.Vertical()),
}

Definition at line 421 of file league_gui.cpp.

## ◆ _performance_titles

const StringID _performance_titles[]
| static

Initial value:
= {
STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_ENGINEER,
STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_ENGINEER,
STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_TRAFFIC_MANAGER,
STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_TRAFFIC_MANAGER,
STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_TRANSPORT_COORDINATOR,
STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_TRANSPORT_COORDINATOR,
STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_ROUTE_SUPERVISOR,
STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_ROUTE_SUPERVISOR,
STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_DIRECTOR,
STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_DIRECTOR,
STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_CHIEF_EXECUTIVE,
STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_CHIEF_EXECUTIVE,
STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_CHAIRMAN,
STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_CHAIRMAN,
STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_PRESIDENT,
STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_TYCOON,
}

Definition at line 32 of file league_gui.cpp.

WWT_STICKYBOX
@ WWT_STICKYBOX
Sticky box (at top-right of a window, after WWT_DEFSIZEBOX)
Definition: widget_type.h:64
WidgetDimensions::unscaled
static const WidgetDimensions unscaled
Unscaled widget dimensions.
Definition: window_gui.h:67
WWT_CAPTION
@ WWT_CAPTION
Window caption (window title between closebox and stickybox)
Definition: widget_type.h:59
NWID_HORIZONTAL
@ NWID_HORIZONTAL
Horizontal container.
Definition: widget_type.h:73
SetDataTip
static NWidgetPart SetDataTip(uint32 data, StringID tip)
Widget part function for setting the data and tooltip.
Definition: widget_type.h:1111
WID_PLT_BACKGROUND
@ WID_PLT_BACKGROUND
Background of the window.
Definition: league_widget.h:15
WWT_CLOSEBOX
@ WWT_CLOSEBOX
Close box (at top-left of a window)
Definition: widget_type.h:67
EndContainer
static NWidgetPart EndContainer()
Widget part function for denoting the end of a container (horizontal, vertical, WWT_FRAME,...
Definition: widget_type.h:1096
NWidget
static NWidgetPart NWidget(WidgetType tp, Colours col, int16 idx=-1)
Widget part function for starting a new 'real' widget.
Definition: widget_type.h:1229
SetMinimalSize
static NWidgetPart SetMinimalSize(int16 x, int16 y)
Widget part function for setting the minimal size.
Definition: widget_type.h:1014
WWT_PANEL
@ WWT_PANEL
Simple depressed panel.
Definition: widget_type.h:48
WID_SLT_CAPTION
@ WID_SLT_CAPTION
Caption of the window.
Definition: league_widget.h:20
WID_SLT_BACKGROUND
@ WID_SLT_BACKGROUND
Background of the window.
Definition: league_widget.h:21
WidgetDimensions::scaled
static WidgetDimensions scaled
Widget dimensions scaled for current zoom level.
Definition: window_gui.h:68
SetMinimalTextLines
static NWidgetPart SetMinimalTextLines(uint8 lines, uint8 spacing, FontSize size=FS_NORMAL)
Widget part function for setting the minimal text lines.
Definition: widget_type.h:1032
WWT_SHADEBOX
@ WWT_SHADEBOX
Shade box (at top-right of a window, between WWT_DEBUGBOX and WWT_DEFSIZEBOX)
Definition: widget_type.h:62