Shift/Alt/ctrl key support for Menu Sliders/numbers
Posted: Wed Sep 22, 2021 3:18 pm
Some mods like my own have large number scales in their menus. It'd be nice if there could be an implementation within GZDoom's base itself that everyone can take advantage of.
I.e. say a slider has 100 units, and ticks by 1 when moving along with the keyboard. Could we add additional parameters to define when holding the shift/alt/ctrl keys, so I don't have to create duplicates that have bigger scaling units?
This would allow me to change this:
Into this:
In order, left to right:
I.e. say a slider has 100 units, and ticks by 1 when moving along with the keyboard. Could we add additional parameters to define when holding the shift/alt/ctrl keys, so I don't have to create duplicates that have bigger scaling units?
This would allow me to change this:
Code: Select all
Slider "$MCM_HEALTHMUL1_TEXT", MCC_HealthMul, 0.5, 100.0, 0.1
Slider "$MCM_HEALTHMUL2_TEXT", MCC_HealthMul, 1.0, 100.0, 1.0
Code: Select all
Slider "$MCM_HEALTHMUL_TEXT", MCC_HealthMul, 0.5, 100.0, 0.1, 1.0, 0.05, 10.0
- Shift value amount. Programs like Blender tend to use this to amplify the change.
- Alt value amount. Usually used to reduce the amount changed for precision.
- Ctrl/cmd value amount. Special case where it's percentage based instead.
- Holding shift would do so by 1.0 instead of 0.1
- Holding alt would be by 0.05 instead of 0.1
- Holding ctrl/cmd would go by 10% of the range instead of by value. Limited to range [0.0, 100.0]