# transparency_gui.cpp File Reference

The transparency GUI. More...

`#include "stdafx.h"`
`#include "window_gui.h"`
`#include "transparency.h"`
`#include "sound_func.h"`
`#include "table/sprites.h"`
`#include "table/strings.h"`

Go to the source code of this file.

## Data Structures
class | TransparenciesWindow
## Enumerations
enum | TransparencyToolbarWidgets { TTW_WIDGET_BEGIN, TTW_WIDGET_SIGNS = TTW_WIDGET_BEGIN, TTW_WIDGET_TREES, TTW_WIDGET_HOUSES, TTW_WIDGET_INDUSTRIES, TTW_WIDGET_BUILDINGS, TTW_WIDGET_BRIDGES, TTW_WIDGET_STRUCTURES, TTW_WIDGET_CATENARY, TTW_WIDGET_LOADING, TTW_WIDGET_END, TTW_WIDGET_BUTTONS }
| Widget numbers of the transparency window. More...
## Functions
void | ShowTransparencyToolbar ()
## Variables
TransparencyOptionBits | _transparency_opt
TransparencyOptionBits | _transparency_lock
TransparencyOptionBits | _invisibility_opt
static const NWidgetPart | _nested_transparency_widgets []
static const WindowDesc | _transparency_desc (WDP_MANUAL, 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.

## Enumeration Type Documentation

enum TransparencyToolbarWidgets

Widget numbers of the transparency window.

Enumerator:

  TTW_WIDGET_BEGIN | First toggle button.
  TTW_WIDGET_SIGNS | Signs background transparency toggle button.
  TTW_WIDGET_TREES | Trees transparency toggle button.
  TTW_WIDGET_HOUSES | Houses transparency toggle button.
  TTW_WIDGET_INDUSTRIES | industries transparency toggle button.
  TTW_WIDGET_BUILDINGS | Company buildings and structures transparency toggle button.
  TTW_WIDGET_BRIDGES | Bridges transparency toggle button.
  TTW_WIDGET_STRUCTURES | Unmovable structures transparency toggle button.
  TTW_WIDGET_CATENARY | Catenary transparency toggle button.
  TTW_WIDGET_LOADING | Loading indicators transparency toggle button.
  TTW_WIDGET_END | End of toggle buttons.
  TTW_WIDGET_BUTTONS | Panel with 'invisibility' buttons.

Definition at line 25 of file transparency_gui.cpp.

## Variable Documentation

const NWidgetPart _nested_transparency_widgets[]`[static]`

Initial value:

     {
      NWidget(NWID_HORIZONTAL),
        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),
      EndContainer(),
      NWidget(NWID_HORIZONTAL),
        NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, TTW_WIDGET_SIGNS), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_SIGN, STR_TRANSPARENT_SIGNS_TOOLTIP),
        NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, TTW_WIDGET_TREES), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_PLANTTREES, STR_TRANSPARENT_TREES_TOOLTIP),
        NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, TTW_WIDGET_HOUSES), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_TOWN, STR_TRANSPARENT_HOUSES_TOOLTIP),
        NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, TTW_WIDGET_INDUSTRIES), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_INDUSTRY, STR_TRANSPARENT_INDUSTRIES_TOOLTIP),
        NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, TTW_WIDGET_BUILDINGS), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_COMPANY_LIST, STR_TRANSPARENT_BUILDINGS_TOOLTIP),
        NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, TTW_WIDGET_BRIDGES), SetMinimalSize(43, 22), SetFill(0, 1), SetDataTip(SPR_IMG_BRIDGE, STR_TRANSPARENT_BRIDGES_TOOLTIP),
        NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, TTW_WIDGET_STRUCTURES), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_IMG_TRANSMITTER, STR_TRANSPARENT_STRUCTURES_TOOLTIP),
        NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, TTW_WIDGET_CATENARY), SetMinimalSize(22, 22), SetFill(0, 1), SetDataTip(SPR_BUILD_X_ELRAIL, STR_TRANSPARENT_CATENARY_TOOLTIP),
        NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, TTW_WIDGET_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(),
      EndContainer(),

      NWidget(WWT_PANEL, COLOUR_DARK_GREEN, TTW_WIDGET_BUTTONS), SetMinimalSize(219, 13), SetDataTip(0x0, STR_TRANSPARENT_INVISIBLE_TOOLTIP),
      EndContainer(),
    }

Definition at line 134 of file transparency_gui.cpp.