25.4.1.4
parent
96f5a05460
commit
5d1e0caefe
|
|
@ -3,10 +3,10 @@
|
|||
local LobbySettingView = {}
|
||||
|
||||
local M = LobbySettingView
|
||||
setmetatable(M, {__index = BaseWindow})
|
||||
setmetatable(M, { __index = BaseWindow })
|
||||
|
||||
function LobbySettingView.new()
|
||||
local self = setmetatable({}, {__index = M})
|
||||
local self = setmetatable({}, { __index = M })
|
||||
self.class = 'SettingView'
|
||||
self._close_destroy = true
|
||||
self:init('ui://Lobby/Setting')
|
||||
|
|
@ -21,29 +21,28 @@ function M:init(url)
|
|||
local slider_music = view:GetChild('slider_vedio_music')
|
||||
local btn_music = view:GetChild('btn_vedio_music')
|
||||
local btn_sound = view:GetChild('btn_vedio_sound')
|
||||
print(GameApplication.Instance.MusicMute)
|
||||
|
||||
slider_sound.value = GameApplication.Instance.SoundValue
|
||||
slider_music.value = GameApplication.Instance.MusicValue
|
||||
-- slider_sound.value = GameApplication.Instance.SoundValue
|
||||
-- slider_music.value = GameApplication.Instance.MusicValue
|
||||
|
||||
slider_music.onChanged:Add(function()
|
||||
GameApplication.Instance.MusicValue = slider_music.value
|
||||
btn_music.selected = false
|
||||
GameApplication.Instance.MusicMute = false;
|
||||
-- GameApplication.Instance.MusicValue = slider_music.value
|
||||
-- btn_music.selected = false
|
||||
-- GameApplication.Instance.MusicMute = false;
|
||||
end)
|
||||
|
||||
slider_sound.onChanged:Add(function()
|
||||
GameApplication.Instance.SoundValue = slider_sound.value
|
||||
btn_sound.selected = false
|
||||
GameApplication.Instance.SoundMute = false;
|
||||
-- GameApplication.Instance.SoundValue = slider_sound.value
|
||||
-- btn_sound.selected = false
|
||||
-- GameApplication.Instance.SoundMute = false;
|
||||
end)
|
||||
|
||||
btn_sound.onClick:Add(function()
|
||||
GameApplication.Instance.SoundMute = btn_sound.selected;
|
||||
-- GameApplication.Instance.SoundMute = btn_sound.selected;
|
||||
end)
|
||||
|
||||
btn_music.onClick:Add(function()
|
||||
GameApplication.Instance.MusicMute = btn_music.selected;
|
||||
-- GameApplication.Instance.MusicMute = btn_music.selected;
|
||||
end)
|
||||
|
||||
local _btn_logout = self._view:GetChild('btn_switchAccount')
|
||||
|
|
@ -60,11 +59,11 @@ function M:init(url)
|
|||
local btn_quit = view:GetChild('btn_exitAccount')
|
||||
btn_quit.onClick:Set(
|
||||
function()
|
||||
GameApplication.Instance:QuitGameOnUnity();
|
||||
-- GameApplication.Instance:QuitGameOnUnity();
|
||||
end
|
||||
)
|
||||
--[[
|
||||
|
||||
|
||||
local _btn_logout = self._view:GetChild('btn_del')
|
||||
_btn_logout.onClick:Set(function()
|
||||
local _curren_msg = MsgWindow.new(self._root_view, '您是否退出当前账号?', MsgWindow.MsgMode.OkAndCancel)
|
||||
|
|
@ -77,13 +76,6 @@ function M:init(url)
|
|||
end)
|
||||
|
||||
--]]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
return M
|
||||
|
|
|
|||
Loading…
Reference in New Issue