38 lines
1.1 KiB
Lua
38 lines
1.1 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 TaskShow_Layout
|
|
local TaskShow_Layout = GUI:Layout_Create(Layer, "TaskShow_Layout", 0, 0, 200, 185, false)
|
|
GUI:Layout_setBackGroundColorType(TaskShow_Layout, 1)
|
|
GUI:Layout_setBackGroundColor(TaskShow_Layout, "#00006d")
|
|
GUI:Layout_setBackGroundColorOpacity(TaskShow_Layout, 255)
|
|
GUI:setAnchorPoint(TaskShow_Layout, 0.00, 0.00)
|
|
GUI:setTouchEnabled(TaskShow_Layout, false)
|
|
GUI:setTag(TaskShow_Layout, 0)
|
|
|
|
-- Create Text_1
|
|
local Text_1 = GUI:Text_Create(TaskShow_Layout, "Text_1", 55, 85, 16, "#ffffff", [[文本]])
|
|
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)
|
|
|
|
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
|