OpenTTD
Macros | Functions
settings_gui.h File Reference

Functions for setting GUIs. More...

#include "gfx_type.h"

Go to the source code of this file.

Macros

#define SETTING_BUTTON_WIDTH   ((int)NWidgetScrollbar::GetHorizontalDimension().width * 2)
 Width of setting buttons.
 
#define SETTING_BUTTON_HEIGHT   ((int)NWidgetScrollbar::GetHorizontalDimension().height)
 Height of setting buttons.
 

Functions

void DrawArrowButtons (int x, int y, Colours button_colour, byte state, bool clickable_left, bool clickable_right)
 Draw [<][>] boxes. More...
 
void DrawDropDownButton (int x, int y, Colours button_colour, bool state, bool clickable)
 Draw a dropdown button. More...
 
void DrawBoolButton (int x, int y, bool state, bool clickable)
 Draw a toggle button. More...
 

Detailed Description

Functions for setting GUIs.

Definition in file settings_gui.h.

Function Documentation

◆ DrawArrowButtons()

void DrawArrowButtons ( int  x,
int  y,
Colours  button_colour,
byte  state,
bool  clickable_left,
bool  clickable_right 
)

Draw [<][>] boxes.

Parameters
xthe x position to draw
ythe y position to draw
button_colourthe colour of the button
state0 = none clicked, 1 = first clicked, 2 = second clicked
clickable_leftis the left button clickable?
clickable_rightis the right button clickable?

Definition at line 2391 of file settings_gui.cpp.

◆ DrawBoolButton()

void DrawBoolButton ( int  x,
int  y,
bool  state,
bool  clickable 
)

Draw a toggle button.

Parameters
xthe x position to draw
ythe y position to draw
statetrue = lowered
clickableis the button clickable?

Definition at line 2438 of file settings_gui.cpp.

◆ DrawDropDownButton()

void DrawDropDownButton ( int  x,
int  y,
Colours  button_colour,
bool  state,
bool  clickable 
)

Draw a dropdown button.

Parameters
xthe x position to draw
ythe y position to draw
button_colourthe colour of the button
statetrue = lowered
clickableis the button clickable?

Definition at line 2419 of file settings_gui.cpp.