57 lines
1.8 KiB
Lua
57 lines
1.8 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", -2, 2, "res/custom/02/4.png")
|
|
GUI:setAnchorPoint(c_bg_img, 0.50, 0.50)
|
|
GUI:setTouchEnabled(c_bg_img, false)
|
|
GUI:setTag(c_bg_img, -1)
|
|
|
|
-- Create give_Layout
|
|
local give_Layout = GUI:Layout_Create(c_bg_img, "give_Layout", 47, 195, 360, 60, false)
|
|
GUI:setAnchorPoint(give_Layout, 0.00, 0.00)
|
|
GUI:setTouchEnabled(give_Layout, false)
|
|
GUI:setTag(give_Layout, -1)
|
|
|
|
-- Create Up_btn
|
|
local Up_btn = GUI:Button_Create(c_bg_img, "Up_btn", 168, 97, "res/custom/02/10.png")
|
|
GUI:Button_loadTexturePressed(Up_btn, "res/custom/02/12.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, 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 y_lq
|
|
local y_lq = GUI:Image_Create(c_bg_img, "y_lq", 202, 95, "res/custom/Label/0-3.png")
|
|
GUI:setAnchorPoint(y_lq, 0.00, 0.00)
|
|
GUI:setTouchEnabled(y_lq, false)
|
|
GUI:setTag(y_lq, -1)
|
|
GUI:setVisible(y_lq, false)
|
|
|
|
-- Create Text
|
|
local Text = GUI:Text_Create(c_bg_img, "Text", 243, 81, 16, "#00ff00", [[文本]])
|
|
GUI:Text_enableOutline(Text, "#000000", 2)
|
|
GUI:setAnchorPoint(Text, 0.50, 0.50)
|
|
GUI:setTouchEnabled(Text, false)
|
|
GUI:setTag(Text, -1)
|
|
|
|
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
|