jx_client_neibu/lua_probject/main_project/main/majiang/GameInfoWindow.lua

38 lines
981 B
Lua
Raw Normal View History

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
2025-08-23 22:23:17 +08:00
local times = self.room.room_config.config.times
2025-08-06 22:40:17 +08:00
local game_id = self.room.game_id
local Info = ExtendManager.GetExtendConfig(game_id):GetGameInfo()
local text = Info:LoadConfigToDetail(config)
2025-08-23 22:23:17 +08:00
self.tex_tex.text = times / 1000 .. "倍," .. text
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