OpenTTD Source  1.11.2
transparency_gui.cpp File Reference
#include "stdafx.h"
#include "window_gui.h"
#include "transparency.h"
#include "sound_func.h"
#include "settings_type.h"
#include "widgets/transparency_widget.h"
#include "table/sprites.h"
#include "table/strings.h"
#include "safeguards.h"

Go to the source code of this file.

Data Structures

class  TransparenciesWindow
 

Functions

void ShowTransparencyToolbar ()
 Show the transparency toolbar.
 

Variables

TransparencyOptionBits _transparency_opt
 The bits that should be transparent.
 
TransparencyOptionBits _transparency_lock
 Prevent these bits from flipping with X.
 
TransparencyOptionBits _invisibility_opt
 The bits that should be invisible.
 
byte _display_opt
 What do we want to draw/do?
 
static const NWidgetPart _nested_transparency_widgets []
 
static WindowDesc _transparency_desc (WDP_MANUAL, "toolbar_transparency", 0, 0, WC_TRANSPARENCY_TOOLBAR, WC_NONE, 0, _nested_transparency_widgets, lengthof(_nested_transparency_widgets))
 

Detailed Description

The transparency GUI.

Definition in file transparency_gui.cpp.

Variable Documentation

◆ _nested_transparency_widgets

const NWidgetPart _nested_transparency_widgets[]
static
Initial value:
= {
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_TRANSPARENCY_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN),
NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_TT_SIGNS), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_SIGN, STR_TRANSPARENT_SIGNS_TOOLTIP),
NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_TT_TREES), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_PLANTTREES, STR_TRANSPARENT_TREES_TOOLTIP),
NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_TT_HOUSES), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_TOWN, STR_TRANSPARENT_HOUSES_TOOLTIP),
NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_TT_INDUSTRIES), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_INDUSTRY, STR_TRANSPARENT_INDUSTRIES_TOOLTIP),
NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_TT_BUILDINGS), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_COMPANY_LIST, STR_TRANSPARENT_BUILDINGS_TOOLTIP),
NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_TT_BRIDGES), SetMinimalSize(43, 22), SetFill(0, 1), SetDataTip(SPR_IMG_BRIDGE, STR_TRANSPARENT_BRIDGES_TOOLTIP),
NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_TT_STRUCTURES), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_TRANSMITTER, STR_TRANSPARENT_STRUCTURES_TOOLTIP),
NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_TT_CATENARY), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_BUILD_X_ELRAIL, STR_TRANSPARENT_CATENARY_TOOLTIP),
NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_TT_LOADING), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_TRAINLIST, STR_TRANSPARENT_LOADING_TOOLTIP),
NWidget(WWT_PANEL, COLOUR_DARK_GREEN), SetFill(1, 1), EndContainer(),
NWidget(WWT_PANEL, COLOUR_DARK_GREEN, WID_TT_BUTTONS), SetMinimalSize(219, 13), SetDataTip(0x0, STR_TRANSPARENT_INVISIBLE_TOOLTIP),
}

Definition at line 126 of file transparency_gui.cpp.

WID_TT_LOADING
@ WID_TT_LOADING
Loading indicators transparency toggle button.
Definition: transparency_widget.h:25
WWT_STICKYBOX
@ WWT_STICKYBOX
Sticky box (at top-right of a window, after WWT_DEFSIZEBOX)
Definition: widget_type.h:64
WWT_CAPTION
@ WWT_CAPTION
Window caption (window title between closebox and stickybox)
Definition: widget_type.h:59
WWT_IMGBTN
@ WWT_IMGBTN
(Toggle) Button with image
Definition: widget_type.h:50
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:1023
WID_TT_BUTTONS
@ WID_TT_BUTTONS
Panel with 'invisibility' buttons.
Definition: transparency_widget.h:29
WID_TT_HOUSES
@ WID_TT_HOUSES
Houses transparency toggle button.
Definition: transparency_widget.h:19
WID_TT_TREES
@ WID_TT_TREES
Trees transparency toggle button.
Definition: transparency_widget.h:18
WID_TT_CATENARY
@ WID_TT_CATENARY
Catenary transparency toggle button.
Definition: transparency_widget.h:24
WID_TT_SIGNS
@ WID_TT_SIGNS
Signs background transparency toggle button.
Definition: transparency_widget.h:17
WID_TT_BUILDINGS
@ WID_TT_BUILDINGS
Company buildings and structures transparency toggle button.
Definition: transparency_widget.h:21
WWT_CLOSEBOX
@ WWT_CLOSEBOX
Close box (at top-left of a window)
Definition: widget_type.h:67
WID_TT_BRIDGES
@ WID_TT_BRIDGES
Bridges transparency toggle button.
Definition: transparency_widget.h:22
EndContainer
static NWidgetPart EndContainer()
Widget part function for denoting the end of a container (horizontal, vertical, WWT_FRAME,...
Definition: widget_type.h:1008
NWidget
static NWidgetPart NWidget(WidgetType tp, Colours col, int16 idx=-1)
Widget part function for starting a new 'real' widget.
Definition: widget_type.h:1123
SetMinimalSize
static NWidgetPart SetMinimalSize(int16 x, int16 y)
Widget part function for setting the minimal size.
Definition: widget_type.h:956
WWT_PANEL
@ WWT_PANEL
Simple depressed panel.
Definition: widget_type.h:48
WID_TT_INDUSTRIES
@ WID_TT_INDUSTRIES
industries transparency toggle button.
Definition: transparency_widget.h:20
SetFill
static NWidgetPart SetFill(uint fill_x, uint fill_y)
Widget part function for setting filling.
Definition: widget_type.h:992
WID_TT_STRUCTURES
@ WID_TT_STRUCTURES
Object structure transparency toggle button.
Definition: transparency_widget.h:23