Commit Graph

3 Commits

Author SHA1 Message Date
Peter Nelson 9a7c30a109 Codechange: Let ClickSliderWidget handle rounding to nearest mark. 2024-05-03 11:48:36 +01:00
Peter Nelson 9d2efd4c96 Codechange: Use callback function to set labels of slider widget marks.
Slider widgets can only use a predefined list of values and strings to draw labels. This makes it difficult to vary the display by context.

Instead of providing a predefined list as a std::map, use a callback function instead. This function can decide what text to display, and can call SetDParam to dynamically set up strings.
2024-05-03 11:48:36 +01:00
Peter Nelson d683ec0183
Codechange: Move dropdown and slider out of widgets directory. (#12403)
Also shuffle headers to place widget includes near end.

This leaves the widgets directory solely for defining Widget IDs.
2024-03-31 19:37:16 +01:00
Renamed from src/widgets/slider_func.h (Browse further)