Page 1 of 1

[SOLVED] Customizing the volume slider

Posted: Sun Nov 27, 2022 5:29 am
by Exodus13
So I wanted to change the width and length of the sliders in user preferences, but I'm not sure how to do that in a way that it doesn't change the sliders in other menus. Basically I want the options menu to look different depending on where you access it from (quick menu or main menu).

Re: Customizing the volume slider

Posted: Sun Nov 27, 2022 5:31 pm
by _ticlock_
Exodus13 wrote: Sun Nov 27, 2022 5:29 am So I wanted to change the width and length of the sliders in user preferences, but I'm not sure how to do that in a way that it doesn't change the sliders in other menus.
You can apply different styles to the sliders, or specify some parameters to overwrite currently used style:

Code: Select all

bar value Preference("music volume"):
    style "some_new_style"

Code: Select all

bar value Preference("music volume"):
    xysize 100,5
Exodus13 wrote: Sun Nov 27, 2022 5:29 am Basically I want the options menu to look different depending on where you access it from (quick menu or main menu).
There are two ways:
1) you define two screens (for example, preferences and preferences2) and use action ShowMenu('preferences') from the game_menu and ShowMenu('preferences2') from the quick menu
2) You may pass argument to the screen to distinguish what style you want to use for example:

Code: Select all

... ShowMenu('preferences', from_quick_menu = True)

Code: Select all

screen preferences( from_quick_menu = False):
    tag menu
    ...
    bar value Preference("music volume"):
        if from_quick_menu:
            xysize 100,5