OpenTTD Source: src/widgets/slider.cpp File Reference

OpenTTD Source 12.2

Functions | Variables
slider.cpp File Reference
`#include "../stdafx.h"`
`#include "../window_gui.h"`
`#include "../window_func.h"`
`#include "../strings_func.h"`
`#include "../zoom_func.h"`
`#include "slider_func.h"`
`#include "../safeguards.h"`

Go to the source code of this file.

## Functions
void | DrawVolumeSliderWidget (Rect r, byte value)
| Draw a volume slider widget with know at given value. More...
bool | ClickVolumeSliderWidget (Rect r, Point pt, byte &value)
| Handle click on a volume slider widget to change the value. More...

## Variables
static const int | SLIDER_WIDTH = 3

## Detailed Description

Implementation of the horizontal slider widget.

Definition in file slider.cpp.

## Function Documentation

## ◆ ClickVolumeSliderWidget()

bool ClickVolumeSliderWidget | ( | Rect | r,
|  | Point | pt,
|  | byte & | value
| ) |  |

Handle click on a volume slider widget to change the value.

Parameters

  r | Rectangle of the widget
  pt | Clicked point
  value[in,out] | Volume value to modify

Returns
  True if the volume setting was modified

Definition at line 55 of file slider.cpp.

References ScaleGUITrad().

Referenced by MusicWindow::OnClick().

## ◆ DrawVolumeSliderWidget()

void DrawVolumeSliderWidget | ( | Rect | r,
|  | byte | value
| ) |  |

Draw a volume slider widget with know at given value.

Parameters

  r | Rectangle to draw the widget in
  value | Value to put the slider at

Definition at line 26 of file slider.cpp.

References _colour_gradient, _current_text_dir, and TD_RTL.