by Nash » Wed Sep 30, 2020 8:27 am
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
[img]https://i.imgur.com/zvFyDgg.gif[/img]
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=php]
// 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"
[/code]
[url=https://github.com/coelckers/gzdoom/pull/1195]Pull request[/url]
[url=https://github.com/coelckers/gzdoom/files/5306155/SliderGrayCheckDemo.zip]Demo file[/url]