Shift/Alt/ctrl key support for Menu Sliders/numbers

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

Shift/Alt/ctrl key support for Menu Sliders/numbers

Postby Major Cooke » 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:
Code: Select allExpand view
   Slider "$MCM_HEALTHMUL1_TEXT",      MCC_HealthMul,         0.5, 100.0, 0.1
   Slider "$MCM_HEALTHMUL2_TEXT",      MCC_HealthMul,         1.0, 100.0, 1.0

Into this:
Code: Select allExpand view
Slider "$MCM_HEALTHMUL_TEXT",      MCC_HealthMul,         0.5, 100.0, 0.1, 1.0, 0.05, 10.0

In order, left to right:
  • 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.

So in my example above, when holding one of the keys and changing the value with key arrows:
  • 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]
User avatar
Major Cooke
QZDoom Maintenance Team
Joined: 28 Jan 2007

Return to Feature Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests