Page 1 of 1

Radio Button in Mod Settings

Posted: Sat Apr 30, 2022 8:26 am
by Ralzar
I just noticed that the ingame Effects Settings menu uses radio buttons.
For example, switching aspect ratio in Retro Mode settings.

Mod Settings, as far as I know, does not have a way to code the modsettings.json file to use this function. So everyone that makes a mod with a choice between several settings option uses the slider, which is not really what the slider is intended for and tends to look awkward in the layout.


So yeah, I was wondering if there was any way to get radio button for the mod settings?

Re: Radio Button in Mod Settings

Posted: Sat Apr 30, 2022 9:31 pm
by Interkarma
That's a bespoke setup I made with a few checkbox controls. There's no radio control in DFU at this time.

It was easy to do though - make a method to clear all checkbox controls in group, call it from the click handler of each control in group, set self to enabled then do work on click as normal.