16using SliderMarkFunc = std::optional<std::string>(
int nmarks,
int mark,
int value);
17void DrawSliderWidget(
Rect r, Colours wedge_colour, Colours handle_colour,
TextColour text_colour,
int min_value,
int max_value,
int nmarks,
int value, SliderMarkFunc *mark_func);
22 int tmp_value = value;
23 if (!
ClickSliderWidget(r, pt, min_value, max_value, nmarks, tmp_value))
return false;
All geometry types in OpenTTD.
Types related to the graphics and/or input devices.
TextColour
Colour of the strings, see _string_colourmap in table/string_colours.h or docs/ottd-colourtext-palett...
void DrawSliderWidget(Rect r, Colours wedge_colour, Colours handle_colour, TextColour text_colour, int min_value, int max_value, int nmarks, int value, SliderMarkFunc *mark_func)
Draw a slider widget with knob at given value.
bool ClickSliderWidget(Rect r, Point pt, int min_value, int max_value, int nmarks, int &value)
Handle click on a slider widget to change the value.
Coordinates of a point in 2D.
Specification of a rectangle with absolute coordinates of all edges.