bayuMIR/client/dev/GUIExport/game/B/TianGuanUI.lua
2026-06-12 02:32:15 +08:00

94 lines
3.3 KiB
Lua

local ui = {}
local _V = function(...) return SL:GetMetaValue(...) end
local FUNCQUEUE = {}
local TAGOBJ = {}
function ui.init(parent, __data__, __update__)
if __update__ then return ui.update(__data__) end
-- Create Layer
local Layer = GUI:Node_Create(parent, "Layer", 0, 0)
GUI:setTag(Layer, -1)
-- Create bg_close
local bg_close = GUI:Layout_Create(Layer, "bg_close", 0, 0, 1136, 640, false)
GUI:Layout_setBackGroundColorType(bg_close, 1)
GUI:Layout_setBackGroundColor(bg_close, "#000000")
GUI:Layout_setBackGroundColorOpacity(bg_close, 0)
GUI:setAnchorPoint(bg_close, 0.00, 0.00)
GUI:setTouchEnabled(bg_close, true)
GUI:setTag(bg_close, -1)
-- Create nd_root
local nd_root = GUI:Node_Create(Layer, "nd_root", 568, 320)
GUI:setTag(nd_root, 670)
TAGOBJ["670"] = nd_root
-- Create img_bg
local img_bg = GUI:Image_Create(nd_root, "img_bg", 0, 0, "res/private/TianGuanUI/0_0.png")
GUI:setChineseName(img_bg, "背景图片")
GUI:setAnchorPoint(img_bg, 0.50, 0.50)
GUI:setTouchEnabled(img_bg, true)
GUI:setTag(img_bg, -1)
-- Create btn_close
local btn_close = GUI:Button_Create(img_bg, "btn_close", 867, 426, "res/private/TianGuanUI/x1.png")
GUI:setContentSize(btn_close, 70, 70)
GUI:setIgnoreContentAdaptWithSize(btn_close, false)
GUI:Button_setTitleText(btn_close, [[]])
GUI:Button_setTitleColor(btn_close, "#ffffff")
GUI:Button_setTitleFontSize(btn_close, 14)
GUI:Button_titleDisableOutLine(btn_close)
GUI:setAnchorPoint(btn_close, 0.00, 0.00)
GUI:setTouchEnabled(btn_close, true)
GUI:setTag(btn_close, -1)
-- Create JiangChi_Text
local JiangChi_Text = GUI:Text_Create(img_bg, "JiangChi_Text", 327, 68, 16, "#00ff00", [[x 0]])
GUI:Text_enableOutline(JiangChi_Text, "#000000", 2)
GUI:setAnchorPoint(JiangChi_Text, 0.00, 0.00)
GUI:setTouchEnabled(JiangChi_Text, false)
GUI:setTag(JiangChi_Text, 0)
-- Create ItemShow_1
local ItemShow_1 = GUI:ItemShow_Create(JiangChi_Text, "ItemShow_1", -21, 11, {index = 10173, count = 1, look = true, bgVisible = false, color = 0})
GUI:setAnchorPoint(ItemShow_1, 0.50, 0.50)
GUI:setScale(ItemShow_1, 0.50)
GUI:setTag(ItemShow_1, 0)
-- Create Up_btn_1
local Up_btn_1 = GUI:Button_Create(img_bg, "Up_btn_1", 515, 117, "res/private/TianGuanUI/2.png")
GUI:Button_loadTexturePressed(Up_btn_1, "res/private/TianGuanUI/4.png")
GUI:setContentSize(Up_btn_1, 161, 41)
GUI:setIgnoreContentAdaptWithSize(Up_btn_1, false)
GUI:Button_setTitleText(Up_btn_1, [[]])
GUI:Button_setTitleColor(Up_btn_1, "#ffffff")
GUI:Button_setTitleFontSize(Up_btn_1, 16)
GUI:Button_titleEnableOutline(Up_btn_1, "#000000", 1)
GUI:setAnchorPoint(Up_btn_1, 0.00, 0.00)
GUI:setTouchEnabled(Up_btn_1, true)
GUI:setTag(Up_btn_1, 0)
-- Create Up_btn_2
local Up_btn_2 = GUI:Button_Create(img_bg, "Up_btn_2", 730, 117, "res/private/TianGuanUI/1.png")
GUI:Button_loadTexturePressed(Up_btn_2, "res/private/TianGuanUI/3.png")
GUI:setContentSize(Up_btn_2, 161, 41)
GUI:setIgnoreContentAdaptWithSize(Up_btn_2, false)
GUI:Button_setTitleText(Up_btn_2, [[]])
GUI:Button_setTitleColor(Up_btn_2, "#ffffff")
GUI:Button_setTitleFontSize(Up_btn_2, 16)
GUI:Button_titleEnableOutline(Up_btn_2, "#000000", 1)
GUI:setAnchorPoint(Up_btn_2, 0.00, 0.00)
GUI:setTouchEnabled(Up_btn_2, true)
GUI:setTag(Up_btn_2, 0)
ui.update(__data__)
return Layer
end
function ui.update(data)
for _, func in pairs(FUNCQUEUE) do
if func then func(data) end
end
end
return ui