OpenTTD Source: DropDownMover< TBase, TEnd, TFs > Class Template Reference

OpenTTD Source 15.0-RC2

Public Member Functions | Private Attributes
DropDownMover< TBase, TEnd, TFs > Class Template Reference

Drop down component that shows extra buttons to indicate that the item can be moved up or down. More...

Inheritance diagram for DropDownMover< TBase, TEnd, TFs >:

## Public Member Functions
template<typename... Args>
| DropDownMover (int click_up, int click_down, Colours button_colour, Args &&...args)
uint | Height () const override
uint | Width () const override
int | OnClick (const Rect &r, const Point &pt) const override
void | Draw (const Rect &full, const Rect &r, bool sel, int click_result, Colours bg_colour) const override

## Private Attributes
int | click_up
| Click result for up button. Button is inactive if 0.
int | click_down
| Click result for down button. Button is inactive if 0.
Colours | button_colour
| Colour of buttons.

## Detailed Description

template<class TBase, bool TEnd = true, FontSize TFs = FS_NORMAL>
class DropDownMover< TBase, TEnd, TFs >

Drop down component that shows extra buttons to indicate that the item can be moved up or down.

Definition at line 270 of file newgrf_badge_gui.cpp.

## Constructor & Destructor Documentation

## ◆ DropDownMover()

template<class TBase , bool TEnd = true, FontSize TFs = FS_NORMAL>
template<typename... Args>

DropDownMover< TBase, TEnd, TFs >::DropDownMover | ( | int | click_up,
|  | int | click_down,
|  | Colours | button_colour,
|  | Args &&... | args
| ) |  |
| inlineexplicit

Definition at line 273 of file newgrf_badge_gui.cpp.

## Member Function Documentation

## ◆ Draw()

template<class TBase , bool TEnd = true, FontSize TFs = FS_NORMAL>

void DropDownMover< TBase, TEnd, TFs >::Draw | ( | const Rect & | full,
|  | const Rect & | r,
|  | bool | sel,
|  | int | click_result,
|  | Colours | bg_colour
| ) |  | const
| inlineoverride

Definition at line 300 of file newgrf_badge_gui.cpp.

## ◆ Height()

template<class TBase , bool TEnd = true, FontSize TFs = FS_NORMAL>

uint DropDownMover< TBase, TEnd, TFs >::Height | ( |  | ) | const
| inlineoverride

Definition at line 278 of file newgrf_badge_gui.cpp.

## ◆ OnClick()

template<class TBase , bool TEnd = true, FontSize TFs = FS_NORMAL>

int DropDownMover< TBase, TEnd, TFs >::OnClick | ( | const Rect & | r,
|  | const Point & | pt
| ) |  | const
| inlineoverride

Definition at line 288 of file newgrf_badge_gui.cpp.

## ◆ Width()

template<class TBase , bool TEnd = true, FontSize TFs = FS_NORMAL>

uint DropDownMover< TBase, TEnd, TFs >::Width | ( |  | ) | const
| inlineoverride

Definition at line 283 of file newgrf_badge_gui.cpp.

## Field Documentation

## ◆ button_colour

template<class TBase , bool TEnd = true, FontSize TFs = FS_NORMAL>

Colours DropDownMover< TBase, TEnd, TFs >::button_colour
| private

Colour of buttons.

Definition at line 320 of file newgrf_badge_gui.cpp.

## ◆ click_down

template<class TBase , bool TEnd = true, FontSize TFs = FS_NORMAL>

int DropDownMover< TBase, TEnd, TFs >::click_down
| private

Click result for down button. Button is inactive if 0.

Definition at line 319 of file newgrf_badge_gui.cpp.

## ◆ click_up

template<class TBase , bool TEnd = true, FontSize TFs = FS_NORMAL>

int DropDownMover< TBase, TEnd, TFs >::click_up
| private

Click result for up button. Button is inactive if 0.

Definition at line 318 of file newgrf_badge_gui.cpp.

The documentation for this class was generated from the following file:

- src/newgrf_badge_gui.cpp