How to achieve volume slider

Place to get help with not working mods / modding interface.
MateuszCOMPANY
Inserter
Inserter
Posts: 44
Joined: Wed Mar 09, 2022 12:36 am
Contact:

How to achieve volume slider

Post by MateuszCOMPANY »

My mod have volume adjustment and I can't achieve slider in mod menu settings.
I only can get box to write digits or opening pop menu with defined values
User avatar
Osmo
Filter Inserter
Filter Inserter
Posts: 257
Joined: Wed Oct 23, 2024 12:08 pm
Contact:

Re: How to achieve volume slider

Post by Osmo »

You cannot.
MateuszCOMPANY
Inserter
Inserter
Posts: 44
Joined: Wed Mar 09, 2022 12:36 am
Contact:

Re: How to achieve volume slider

Post by MateuszCOMPANY »

:cry:
quyxkh
Smart Inserter
Smart Inserter
Posts: 1070
Joined: Sun May 08, 2016 9:01 am
Contact:

Re: How to achieve volume slider

Post by quyxkh »

You can, you can hook on_gui_opened so it instead does whatever you want under any conditions you want, the end of that thread is where we arrived at the way we liked, adapting that looks easy.

Basically it's just when a gui opens, if it's one of your special items immediately close it and start watching whatever you want, here you could start watching on_player_selection_changed and stop watching as soon as they move away from one of your slider boxes or lamps or whatever.
hunh. I'd swear there used to be a description available on profiles. "quyxkh" is a made-up word for fun, pronounced a lot like "cook".
User avatar
Osmo
Filter Inserter
Filter Inserter
Posts: 257
Joined: Wed Oct 23, 2024 12:08 pm
Contact:

Re: How to achieve volume slider

Post by Osmo »

quyxkh wrote: Fri Mar 27, 2026 8:03 pm You can, you can hook on_gui_opened so it instead does whatever you want under any conditions you want, the end of that thread is where we arrived at the way we liked, adapting that looks easy.
This doesn't work for mod settings, settings menu is not a gui you can interact with in control stage. Mod settings are either boolean, a number, a color or a string. For numbers and strings, its either a textfield or a dropdown with predefined values. It cannor be a slider, but you can make an interface request for it, it will be a good feature.
quyxkh
Smart Inserter
Smart Inserter
Posts: 1070
Joined: Sun May 08, 2016 9:01 am
Contact:

Re: How to achieve volume slider

Post by quyxkh »

You can't override the mod settings gui, that's true, but you can supplement it. Last I checked it takes six? seven? separate steps to change even the simplest mod settings through the generic mod-settings gui, or you could provide a hotkey that gets it done a different way.
hunh. I'd swear there used to be a description available on profiles. "quyxkh" is a made-up word for fun, pronounced a lot like "cook".
Post Reply

Return to “Modding help”