73 lines
2.4 KiB
Lua
73 lines
2.4 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 c_bg_img
|
|
local c_bg_img = GUI:Image_Create(parent, "c_bg_img", 0, 0, "res/custom/02/19.png")
|
|
GUI:setAnchorPoint(c_bg_img, 0.50, 0.50)
|
|
GUI:setTouchEnabled(c_bg_img, false)
|
|
GUI:setTag(c_bg_img, -1)
|
|
|
|
-- Create xg_ListView
|
|
local xg_ListView = GUI:ListView_Create(c_bg_img, "xg_ListView", 9, 22, 528, 263, 1)
|
|
GUI:ListView_setItemsMargin(xg_ListView, 20)
|
|
GUI:setAnchorPoint(xg_ListView, 0.00, 0.00)
|
|
GUI:setTouchEnabled(xg_ListView, true)
|
|
GUI:setTag(xg_ListView, 0)
|
|
|
|
-- Create Panel_1
|
|
local Panel_1 = GUI:Layout_Create(xg_ListView, "Panel_1", 0, 193, 530, 70, false)
|
|
GUI:Layout_setBackGroundColorType(Panel_1, 1)
|
|
GUI:Layout_setBackGroundColor(Panel_1, "#898989")
|
|
GUI:Layout_setBackGroundColorOpacity(Panel_1, 127)
|
|
GUI:setAnchorPoint(Panel_1, 0.00, 0.00)
|
|
GUI:setTouchEnabled(Panel_1, false)
|
|
GUI:setTag(Panel_1, 0)
|
|
|
|
-- Create Panel_2
|
|
local Panel_2 = GUI:Layout_Create(Panel_1, "Panel_2", 207, 4, 195, 60, false)
|
|
GUI:setAnchorPoint(Panel_2, 0.00, 0.00)
|
|
GUI:setTouchEnabled(Panel_2, false)
|
|
GUI:setTag(Panel_2, 0)
|
|
|
|
-- Create Button_1
|
|
local Button_1 = GUI:Button_Create(Panel_1, "Button_1", 430, 20, "res/custom/02/17.png")
|
|
GUI:Button_loadTexturePressed(Button_1, "res/custom/02/18.png")
|
|
GUI:setContentSize(Button_1, 88, 32)
|
|
GUI:setIgnoreContentAdaptWithSize(Button_1, false)
|
|
GUI:Button_setTitleText(Button_1, [[]])
|
|
GUI:Button_setTitleColor(Button_1, "#ffffff")
|
|
GUI:Button_setTitleFontSize(Button_1, 16)
|
|
GUI:Button_titleEnableOutline(Button_1, "#000000", 1)
|
|
GUI:setAnchorPoint(Button_1, 0.00, 0.00)
|
|
GUI:setTouchEnabled(Button_1, true)
|
|
GUI:setTag(Button_1, 0)
|
|
|
|
-- Create Text_1
|
|
local Text_1 = GUI:Text_Create(Panel_1, "Text_1", 17, 28, 16, "#ffffff", [[1.]])
|
|
GUI:Text_enableOutline(Text_1, "#000000", 1)
|
|
GUI:setAnchorPoint(Text_1, 0.00, 0.00)
|
|
GUI:setTouchEnabled(Text_1, false)
|
|
GUI:setTag(Text_1, 0)
|
|
|
|
-- Create Text_2
|
|
local Text_2 = GUI:Text_Create(Panel_1, "Text_2", 57, 25, 16, "#ffffff", [[元宝x58]])
|
|
GUI:Text_enableOutline(Text_2, "#000000", 1)
|
|
GUI:setAnchorPoint(Text_2, 0.00, 0.00)
|
|
GUI:setTouchEnabled(Text_2, false)
|
|
GUI:setTag(Text_2, 0)
|
|
|
|
ui.update(__data__)
|
|
return c_bg_img
|
|
end
|
|
|
|
function ui.update(data)
|
|
for _, func in pairs(FUNCQUEUE) do
|
|
if func then func(data) end
|
|
end
|
|
end
|
|
|
|
return ui
|