mirror of
https://github.com/edubart/otclient.git
synced 2025-10-19 22:13:27 +02:00
Rework options visual
This commit is contained in:
40
modules/client_options/audio.otui
Normal file
40
modules/client_options/audio.otui
Normal file
@@ -0,0 +1,40 @@
|
||||
VolumeScrollbar < HorizontalScrollBar
|
||||
step: 1
|
||||
@onValueChange: modules.client_options.setOption(self:getId(), self:getValue())
|
||||
@onSetup: |
|
||||
UIScrollBar.onSetup(self)
|
||||
local value = modules.client_options.getOption(self:getId())
|
||||
self:setValue(value)
|
||||
|
||||
Panel
|
||||
OptionCheckBox
|
||||
id: enableAudio
|
||||
!text: tr('Enable audio')
|
||||
|
||||
OptionCheckBox
|
||||
id: enableMusicSound
|
||||
!text: tr('Enable music sound')
|
||||
|
||||
OptionCheckBox
|
||||
id: enableEffectsSound
|
||||
!text: tr('Enable effects sound')
|
||||
|
||||
Label
|
||||
id: musicSoundVolumeLabel
|
||||
!text: tr('Music volume: %d', 100)
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 6
|
||||
@onSetup: |
|
||||
local value = modules.client_options.getOption('musicSoundVolume')
|
||||
self:setText(tr('Music volume: %d', value))
|
||||
|
||||
VolumeScrollbar
|
||||
id: musicSoundVolume
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 3
|
||||
minimum: 0
|
||||
maximum: 100
|
Reference in New Issue
Block a user