150 lines
5.3 KiB
Lua
150 lines
5.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/custom/34/bg.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", 758, 429, "res/public/1900000510.png")
|
|
GUI:Button_loadTexturePressed(btn_close, "res/public/1900000511.png")
|
|
GUI:setContentSize(btn_close, 26, 42)
|
|
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 Effect_1
|
|
local Effect_1 = GUI:Effect_Create(img_bg, "Effect_1", 84, 401, 0, 15512, 0, 0, 0, 1)
|
|
GUI:setTag(Effect_1, 0)
|
|
|
|
-- Create ListView
|
|
local ListView = GUI:ListView_Create(img_bg, "ListView", 399, 201, 334, 190, 1)
|
|
GUI:ListView_setItemsMargin(ListView, 12)
|
|
GUI:setAnchorPoint(ListView, 0.00, 0.00)
|
|
GUI:setTouchEnabled(ListView, true)
|
|
GUI:setTag(ListView, 0)
|
|
|
|
-- Create Panel_1
|
|
local Panel_1 = GUI:Layout_Create(ListView, "Panel_1", 0, 162, 334, 28, false)
|
|
GUI:setAnchorPoint(Panel_1, 0.00, 0.00)
|
|
GUI:setTouchEnabled(Panel_1, false)
|
|
GUI:setTag(Panel_1, 0)
|
|
|
|
-- Create att_text_1
|
|
local att_text_1 = GUI:Text_Create(Panel_1, "att_text_1", 155, 14, 16, "#ff0000", [==========[[隐藏属性]第一条:未解锁]==========])
|
|
GUI:Text_enableOutline(att_text_1, "#000000", 2)
|
|
GUI:setAnchorPoint(att_text_1, 0.50, 0.50)
|
|
GUI:setTouchEnabled(att_text_1, false)
|
|
GUI:setTag(att_text_1, 0)
|
|
|
|
-- Create Panel_2
|
|
local Panel_2 = GUI:Layout_Create(ListView, "Panel_2", 0, 122, 334, 28, false)
|
|
GUI:setAnchorPoint(Panel_2, 0.00, 0.00)
|
|
GUI:setTouchEnabled(Panel_2, false)
|
|
GUI:setTag(Panel_2, 0)
|
|
|
|
-- Create att_text_2
|
|
local att_text_2 = GUI:Text_Create(Panel_2, "att_text_2", 68, 2, 16, "#ff0000", [==========[[隐藏属性]第二条:未解锁]==========])
|
|
GUI:Text_enableOutline(att_text_2, "#000000", 2)
|
|
GUI:setAnchorPoint(att_text_2, 0.00, 0.00)
|
|
GUI:setTouchEnabled(att_text_2, false)
|
|
GUI:setTag(att_text_2, 0)
|
|
|
|
-- Create Panel_3
|
|
local Panel_3 = GUI:Layout_Create(ListView, "Panel_3", 0, 82, 334, 28, false)
|
|
GUI:setAnchorPoint(Panel_3, 0.00, 0.00)
|
|
GUI:setTouchEnabled(Panel_3, false)
|
|
GUI:setTag(Panel_3, 0)
|
|
|
|
-- Create att_text_3
|
|
local att_text_3 = GUI:Text_Create(Panel_3, "att_text_3", 68, 2, 16, "#ff0000", [==========[[隐藏属性]第三条:未解锁]==========])
|
|
GUI:Text_enableOutline(att_text_3, "#000000", 2)
|
|
GUI:setAnchorPoint(att_text_3, 0.00, 0.00)
|
|
GUI:setTouchEnabled(att_text_3, false)
|
|
GUI:setTag(att_text_3, 0)
|
|
|
|
-- Create Panel_4
|
|
local Panel_4 = GUI:Layout_Create(ListView, "Panel_4", 0, 42, 334, 28, false)
|
|
GUI:setAnchorPoint(Panel_4, 0.00, 0.00)
|
|
GUI:setTouchEnabled(Panel_4, false)
|
|
GUI:setTag(Panel_4, 0)
|
|
|
|
-- Create att_text_4
|
|
local att_text_4 = GUI:Text_Create(Panel_4, "att_text_4", 68, 2, 16, "#ff0000", [==========[[隐藏属性]第四条:未解锁]==========])
|
|
GUI:Text_enableOutline(att_text_4, "#000000", 2)
|
|
GUI:setAnchorPoint(att_text_4, 0.00, 0.00)
|
|
GUI:setTouchEnabled(att_text_4, false)
|
|
GUI:setTag(att_text_4, 0)
|
|
|
|
-- Create Panel_5
|
|
local Panel_5 = GUI:Layout_Create(ListView, "Panel_5", 0, 2, 334, 28, false)
|
|
GUI:setAnchorPoint(Panel_5, 0.00, 0.00)
|
|
GUI:setTouchEnabled(Panel_5, false)
|
|
GUI:setTag(Panel_5, 0)
|
|
|
|
-- Create att_text_5
|
|
local att_text_5 = GUI:Text_Create(Panel_5, "att_text_5", 68, 2, 16, "#ff0000", [==========[[隐藏属性]第五条:未解锁]==========])
|
|
GUI:Text_enableOutline(att_text_5, "#000000", 2)
|
|
GUI:setAnchorPoint(att_text_5, 0.00, 0.00)
|
|
GUI:setTouchEnabled(att_text_5, false)
|
|
GUI:setTag(att_text_5, 0)
|
|
|
|
-- Create xh_Layout
|
|
local xh_Layout = GUI:Layout_Create(img_bg, "xh_Layout", 397, 90, 334, 60, false)
|
|
GUI:setAnchorPoint(xh_Layout, 0.00, 0.00)
|
|
GUI:setTouchEnabled(xh_Layout, false)
|
|
GUI:setTag(xh_Layout, 0)
|
|
|
|
-- Create Up_btn
|
|
local Up_btn = GUI:Button_Create(img_bg, "Up_btn", 491, 36, "res/custom/34/1.png")
|
|
GUI:setContentSize(Up_btn, 144, 48)
|
|
GUI:setIgnoreContentAdaptWithSize(Up_btn, false)
|
|
GUI:Button_setTitleText(Up_btn, [[]])
|
|
GUI:Button_setTitleColor(Up_btn, "#ffffff")
|
|
GUI:Button_setTitleFontSize(Up_btn, 16)
|
|
GUI:Button_titleEnableOutline(Up_btn, "#000000", 1)
|
|
GUI:setAnchorPoint(Up_btn, 0.00, 0.00)
|
|
GUI:setTouchEnabled(Up_btn, true)
|
|
GUI:setTag(Up_btn, 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
|