旁观换背景

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 = {} local WitnessView = {}
setmetatable(WitnessView, { __index = BaseView }) setmetatable(WitnessView, { __index = BaseView })
function WitnessView:init() function WitnessView:init()
end
function WitnessView:InitView()
self.btn_setting = self._view:GetChild("btn_setting") self.btn_setting = self._view:GetChild("btn_setting")
self.com_logocType = self._view:GetChild("com_logo"):GetController("cType")
self.btn_setting.onClick:Set(function() self.btn_setting.onClick:Set(function()
local view = MJSettingView.new(self, true) local view = MJSettingView.new(self, true)
view:Show() view:Show()
end) end)
end
function WitnessView:InitView()
local default_bg = 1 local default_bg = 1
TableBG.LoadTableBG(default_bg, self._room.game_id, self._root_view, bg_config) TableBG.LoadTableBG(default_bg, self._room.game_id, self._root_view, bg_config)
end end

View File

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

View File

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

View File

@ -132,13 +132,10 @@ function M:InitView(url)
end) end)
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._ctr_state.selectedIndex = 4
self.com_logocType.selectedIndex = 2
end end
function M:EventInit() function M:EventInit()

View File

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