1818---- ----------------------------------------------------------------------------
1919-- Local Variables
2020local spSetConfigInt = Spring .SetConfigInt
21+ local spGetConfigInt = Spring .GetConfigInt
2122
2223local battleStartDisplay = 1
2324local lobbyFullscreen = 1
@@ -39,6 +40,7 @@ local TEXT_OFFSET = 6
3940local settingsWindowHandler
4041
4142local trackbarLobbyMusicVolume
43+ local trackbarMasterVolume
4244
4345---- ----------------------------------------------------------------------------
4446---- ----------------------------------------------------------------------------
@@ -730,6 +732,25 @@ local function GetLobbyTabControls()
730732 }
731733 offset = offset + ITEM_OFFSET
732734
735+ trackbarMasterVolume = Trackbar :New {
736+ x = COMBO_X ,
737+ y = offset ,
738+ width = COMBO_WIDTH ,
739+ height = 30 ,
740+ value = spGetConfigInt (" snd_volmaster" , 50 ),
741+ OnChange = {
742+ function (obj , value )
743+ if freezeSettings then
744+ return
745+ end
746+ spSetConfigInt (" snd_volmaster" , value )
747+ end
748+ }
749+ }
750+ children [# children + 1 ] = AddLabel (offset , " Master Volume" )
751+ children [# children + 1 ] = trackbarMasterVolume
752+ offset = offset + ITEM_OFFSET
753+
733754 trackbarLobbyMusicVolume = Trackbar :New {
734755 x = COMBO_X ,
735756 y = offset ,
@@ -1756,6 +1777,7 @@ function widget:Update()
17561777 return
17571778 end
17581779
1780+ trackbarMasterVolume .value = spGetConfigInt (" snd_volmaster" , trackbarMasterVolume .value )
17591781 trackbarLobbyMusicVolume .value = WG .Chobby .Configuration .menuMusicVolume
17601782end
17611783
0 commit comments