旁观换背景

master
1076390229 2025-07-30 22:31:32 +08:00
parent a891dfc111
commit 40301d2f4e
5 changed files with 15 additions and 10 deletions

View File

@ -11,15 +11,20 @@ local bg_config = {
local WitnessView = {}
setmetatable(WitnessView, { __index = BaseView })
function WitnessView:init()
self.btn_setting = self._view:GetChild("btn_setting")
self.btn_setting.onClick:Set(function()
local view = MJSettingView.new(self, true)
view:Show()
end)
end
function WitnessView:InitView()
self.btn_setting = self._view:GetChild("btn_setting")
self.com_logocType = self._view:GetChild("com_logo"):GetController("cType")
self.btn_setting.onClick:Set(function()
local view = MJSettingView.new(self, true)
view:Show()
end)
local default_bg = 1
TableBG.LoadTableBG(default_bg, self._room.game_id, self._root_view, bg_config)
end

View File

@ -111,6 +111,7 @@ function M:InitView(url)
-------------------------------------------------------
self._ctr_state.selectedIndex = 4
self.com_logocType.selectedIndex = 0
end
function M:EventInit()

View File

@ -110,6 +110,7 @@ function M:InitView(url)
-------------------------------------------------------
self._ctr_state.selectedIndex = 4
self.com_logocType.selectedIndex = 3
end
function M:EventInit()

View File

@ -132,13 +132,10 @@ function M:InitView(url)
end)
end
self._view:GetChild('btn_setting').onClick:Add(handler(self, function()
local settingView = SettingView.new(self, 1)
settingView:Show()
end))
-------------------------------------------------------
self._ctr_state.selectedIndex = 4
self.com_logocType.selectedIndex = 2
end
function M:EventInit()

View File

@ -110,6 +110,7 @@ function M:InitView(url)
-------------------------------------------------------
self._ctr_state.selectedIndex = 4
self.com_logocType.selectedIndex = 1
end
function M:EventInit()