99 lines
3.5 KiB
Lua
99 lines
3.5 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/custom/19/new/1.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", 759, 431, "res/public/1900000510.png")
|
|
GUI:Button_loadTexturePressed(btn_close, "res/public/1900000511.png")
|
|
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 xh_Layout
|
|
local xh_Layout = GUI:Layout_Create(img_bg, "xh_Layout", 461, 124, 260, 60, false)
|
|
GUI:setAnchorPoint(xh_Layout, 0.00, 0.00)
|
|
GUI:setTouchEnabled(xh_Layout, false)
|
|
GUI:setTag(xh_Layout, -1)
|
|
|
|
-- Create up_btn
|
|
local up_btn = GUI:Button_Create(img_bg, "up_btn", 531, 47, "res/custom/19/new/4.png")
|
|
GUI:Button_loadTexturePressed(up_btn, "res/custom/19/new/5.png")
|
|
GUI:Button_setTitleText(up_btn, [[]])
|
|
GUI:Button_setTitleColor(up_btn, "#ffffff")
|
|
GUI:Button_setTitleFontSize(up_btn, 14)
|
|
GUI:Button_titleEnableOutline(up_btn, "#000000", 1)
|
|
GUI:setAnchorPoint(up_btn, 0.00, 0.00)
|
|
GUI:setTouchEnabled(up_btn, true)
|
|
GUI:setTag(up_btn, -1)
|
|
|
|
-- Create ListView
|
|
local ListView = GUI:ListView_Create(img_bg, "ListView", 52, 150, 380, 230, 1)
|
|
GUI:setAnchorPoint(ListView, 0.00, 0.00)
|
|
GUI:setTouchEnabled(ListView, true)
|
|
GUI:setTag(ListView, -1)
|
|
|
|
-- Create EquipShow
|
|
local EquipShow = GUI:EquipShow_Create(img_bg, "EquipShow", 593, 354, 1, false, {bgVisible = false, doubleTakeOff = false, look = true, movable = false, starLv = true, lookPlayer = false, showModelEffect = false})
|
|
GUI:EquipShow_setAutoUpdate(EquipShow)
|
|
GUI:setAnchorPoint(EquipShow, 0.50, 0.50)
|
|
GUI:setTouchEnabled(EquipShow, false)
|
|
GUI:setTag(EquipShow, -1)
|
|
|
|
-- Create baohu_img
|
|
local baohu_img = GUI:Image_Create(img_bg, "baohu_img", 500, 232, "res/custom/19/new/7.png")
|
|
GUI:setAnchorPoint(baohu_img, 0.00, 0.00)
|
|
GUI:setTouchEnabled(baohu_img, false)
|
|
GUI:setTag(baohu_img, -1)
|
|
|
|
-- Create CheckBox
|
|
local CheckBox = GUI:CheckBox_Create(baohu_img, "CheckBox", 22, 10, "res/public/1900000550.png", "res/public/1900000551.png")
|
|
GUI:setContentSize(CheckBox, 29, 28)
|
|
GUI:setIgnoreContentAdaptWithSize(CheckBox, false)
|
|
GUI:CheckBox_setSelected(CheckBox, false)
|
|
GUI:setAnchorPoint(CheckBox, 0.00, 0.00)
|
|
GUI:setTouchEnabled(CheckBox, true)
|
|
GUI:setTag(CheckBox, -1)
|
|
|
|
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
|