bayuMIR/client/dev/GUIExport/game/Tongyong/TaskShowUI.lua
2026-06-21 21:55:53 +08:00

58 lines
2.2 KiB
Lua
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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, 202, 188, false)
GUI:setAnchorPoint(TaskShow_Layout, 0.00, 0.00)
GUI:setTouchEnabled(TaskShow_Layout, false)
GUI:setTag(TaskShow_Layout, 0)
local Bg = GUI:Layout_Create(TaskShow_Layout, "Bg", 0, 0, 202, 188, false)
GUI:Layout_setBackGroundColorType(Bg, 1)
GUI:Layout_setBackGroundColor(Bg, "#000000")
GUI:Layout_setBackGroundColorOpacity(Bg, 120)
GUI:setTouchEnabled(Bg, false)
local TaskTitle_Text = GUI:Text_Create(TaskShow_Layout, "TaskTitle_Text", 8, 166, 15, "#f6d27a", "[主线]任务")
GUI:setAnchorPoint(TaskTitle_Text, 0.00, 0.50)
GUI:Text_enableOutline(TaskTitle_Text, "#000000", 1)
local TaskStatus_Text = GUI:Text_Create(TaskShow_Layout, "TaskStatus_Text", 154, 166, 13, "#28ef01", "")
GUI:setAnchorPoint(TaskStatus_Text, 0.00, 0.50)
GUI:Text_enableOutline(TaskStatus_Text, "#000000", 1)
local TaskDesc_Text = GUI:Text_Create(TaskShow_Layout, "TaskDesc_Text", 8, 134, 13, "#ffffff", "")
GUI:setAnchorPoint(TaskDesc_Text, 0.00, 0.50)
GUI:Text_enableOutline(TaskDesc_Text, "#000000", 1)
local TaskProgress_Text = GUI:Text_Create(TaskShow_Layout, "TaskProgress_Text", 8, 104, 14, "#28ef01", "进度0/0")
GUI:setAnchorPoint(TaskProgress_Text, 0.00, 0.50)
GUI:Text_enableOutline(TaskProgress_Text, "#000000", 1)
local TaskReward_Text = GUI:Text_Create(TaskShow_Layout, "TaskReward_Text", 8, 75, 12, "#ffd36a", "奖励:无")
GUI:setAnchorPoint(TaskReward_Text, 0.00, 0.50)
GUI:Text_enableOutline(TaskReward_Text, "#000000", 1)
local RewardItems_Layout = GUI:Layout_Create(TaskShow_Layout, "RewardItems_Layout", 8, 6, 186, 58, false)
GUI:setAnchorPoint(RewardItems_Layout, 0.00, 0.00)
GUI:setTouchEnabled(RewardItems_Layout, false)
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