Gray-able sliders

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Gray-able sliders

Re: Gray-able sliders

by Nash » Thu Oct 01, 2020 12:43 am

Yeah, that's what I thought. That's also the other reason I deliberately left ScaleSlider alone; I remember reading a post from you in another thread recently where you said you planned to redo the entire UI scaling stuff.

Re: Gray-able sliders

by Graf Zahl » Wed Sep 30, 2020 11:15 pm

Nash wrote:
Blue Shadow wrote:Is this also implemented for the ScaleSlider?
No, I deliberately left that out because ScaleSlider's use case is very specific to that only one thing in GZDoom (the HUD scaling menu). Should I the gray-check to that too? What's the likeliness of modders using that widget?
TBH, if I could implement it without compatibility issues, I'd redo the UI scaling anyway to get rid of the clean scaling, use 1 for displaying at the requested size for the page at hand and use smaller values for downscaling. The current system is awful and only grew out a ZDoom-based design decision from 20+ years ago we did not want to change.

In Raze I completely steered clear of the clean scaling outside the places where the VGA font is used and I think it handles a thousand times better as a result.

Meaning: That slider type is more likely to be deprecated anyway. No need to add support to it.

Re: Gray-able sliders

by Blue Shadow » Wed Sep 30, 2020 6:19 pm

I did some coding for someone last year, and that slider type came in handy. Apart from that, I don't know how widely it's used.

My question there was just an inquiry. I wasn't particularly asking for the feature to be added.

Re: Gray-able sliders

by Nash » Wed Sep 30, 2020 5:20 pm

Blue Shadow wrote:Is this also implemented for the ScaleSlider?
No, I deliberately left that out because ScaleSlider's use case is very specific to that only one thing in GZDoom (the HUD scaling menu). Should I the gray-check to that too? What's the likeliness of modders using that widget?

Re: Gray-able sliders

by Blue Shadow » Wed Sep 30, 2020 3:32 pm

Is this also implemented for the ScaleSlider?

Re: Gray-able sliders

by Graf Zahl » Wed Sep 30, 2020 10:28 am

Very much appreciated. :)

Re: Gray-able sliders

by sinisterseed » Wed Sep 30, 2020 9:49 am

I agree, would like to see this too, keeps things consistent for settings that require another to be enabled first.

For on/off toggles this is already there, but sliders are missing.

Re: Gray-able sliders

by Rachael » Wed Sep 30, 2020 8:36 am

Potentially a very useful option, in my opinion.

Gray-able sliders

by Nash » Wed Sep 30, 2020 8:27 am

Image

This simply lets a slider be "gray-able" depending on another CVar's value. The engine already supports this for most other widgets, I am simply exposing the existing behavior to sliders.

Usage is very simple. In your MENUDEF:

Code: Select all

// test_int is the value you want to check for. If this value is 0, the corresponding slider will be grayed out.
// test_float is the slider.
    Option "Test Option", "test_int", "OnOff"
    Slider "Test Slider", "test_float", 0.0, 1.0, 0.1, 1, "test_int"
Pull request
Demo file

Top