OpenTTD Source  1.11.2
slider_func.h
1 /*
2  * This file is part of OpenTTD.
3  * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4  * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5  * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
6  */
7 
10 #ifndef WIDGETS_SLIDER_TYPE_H
11 #define WIDGETS_SLIDER_TYPE_H
12 
13 #include "../window_type.h"
14 #include "../gfx_func.h"
15 
16 
17 void DrawVolumeSliderWidget(Rect r, byte value);
18 bool ClickVolumeSliderWidget(Rect r, Point pt, byte &value);
19 
20 
21 #endif /* WIDGETS_SLIDER_TYPE_H */
DrawVolumeSliderWidget
void DrawVolumeSliderWidget(Rect r, byte value)
Draw a volume slider widget with know at given value.
Definition: slider.cpp:25
Point
Coordinates of a point in 2D.
Definition: geometry_type.hpp:21
ClickVolumeSliderWidget
bool ClickVolumeSliderWidget(Rect r, Point pt, byte &value)
Handle click on a volume slider widget to change the value.
Definition: slider.cpp:56
Rect
Specification of a rectangle with absolute coordinates of all edges.
Definition: geometry_type.hpp:47