2025-08-06 22:40:17 +08:00
|
|
|
local GameInfoWindow = {}
|
|
|
|
|
|
|
|
|
|
function GameInfoWindow.New()
|
|
|
|
|
setmetatable(GameInfoWindow, { __index = BaseWindow })
|
|
|
|
|
local ints = setmetatable({}, { __index = GameInfoWindow })
|
|
|
|
|
ints:init("ui://Main_Majiang/com_gameInfoWindow")
|
|
|
|
|
return ints
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function GameInfoWindow:Reflash()
|
|
|
|
|
local config = self.room.room_config.config
|
|
|
|
|
local game_id = self.room.game_id
|
|
|
|
|
local Info = ExtendManager.GetExtendConfig(game_id):GetGameInfo()
|
|
|
|
|
|
2025-09-01 16:18:56 +08:00
|
|
|
self.tex_tex.text = Info:LoadConfigToDetail(config)
|
2025-08-06 22:40:17 +08:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function GameInfoWindow:Show(room)
|
|
|
|
|
BaseWindow.Show(self)
|
|
|
|
|
self.room = room
|
|
|
|
|
self:Reflash()
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function GameInfoWindow:init(url)
|
|
|
|
|
BaseWindow.init(self, url)
|
|
|
|
|
|
|
|
|
|
self.tex_tex = self._view:GetChild("tex_tex")
|
|
|
|
|
self.btn_quit = self._view:GetChild("btn_quit")
|
|
|
|
|
|
|
|
|
|
self.btn_quit.onClick:Set(function()
|
|
|
|
|
self:Close()
|
|
|
|
|
end)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
return GameInfoWindow
|