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, -1) -- Create img_bg local img_bg = GUI:Image_Create(nd_root, "img_bg", 0, 0, "res/custom/37/bg.png") GUI:setAnchorPoint(img_bg, 0.50, 0.50) GUI:setTouchEnabled(img_bg, true) GUI:setTag(img_bg, 0) -- Create btn_close local btn_close = GUI:Button_Create(img_bg, "btn_close", 615, 337, "res/public/1900000510.png") GUI:Button_loadTexturePressed(btn_close, "res/public/1900000511.png") GUI:Button_setTitleText(btn_close, [[]]) GUI:Button_setTitleColor(btn_close, "#ffffff") GUI:Button_setTitleFontSize(btn_close, 16) GUI:Button_titleEnableOutline(btn_close, "#000000", 1) GUI:setAnchorPoint(btn_close, 0.00, 0.00) GUI:setTouchEnabled(btn_close, true) GUI:setTag(btn_close, 0) -- Create statusText local statusText = GUI:Text_Create(img_bg, "statusText", 212, 309, 18, "#c0c0c0", [[未开启]]) GUI:Text_enableOutline(statusText, "#000000", 1) GUI:setAnchorPoint(statusText, 0.00, 0.00) GUI:setTouchEnabled(statusText, false) GUI:setTag(statusText, -1) -- Create autoKuangBao local autoKuangBao = GUI:CheckBox_Create(img_bg, "autoKuangBao", 128, 135, "res/public/1900000682.png", "res/public/1900000551.png") GUI:CheckBox_setSelected(autoKuangBao, false) GUI:setAnchorPoint(autoKuangBao, 0.00, 0.00) GUI:setTouchEnabled(autoKuangBao, true) GUI:setTag(autoKuangBao, -1) -- Create orderMode local orderMode = GUI:CheckBox_Create(img_bg, "orderMode", 298, 135, "res/public/1900000682.png", "res/public/1900000551.png") GUI:CheckBox_setSelected(orderMode, false) GUI:setAnchorPoint(orderMode, 0.00, 0.00) GUI:setTouchEnabled(orderMode, true) GUI:setTag(orderMode, -1) -- Create dieInput local dieInput = GUI:TextInput_Create(img_bg, "dieInput", 226, 98, 38, 22, 14) GUI:TextInput_setString(dieInput, "0") GUI:TextInput_setFontColor(dieInput, "#fff000") GUI:TextInput_setPlaceholderFontColor(dieInput, "#a6a6a6") GUI:TextInput_setTextHorizontalAlignment(dieInput, 1) GUI:TextInput_setTextVerticalAlignment(dieInput, 1) GUI:setAnchorPoint(dieInput, 0.00, 0.00) GUI:setTouchEnabled(dieInput, true) GUI:setTag(dieInput, -1) -- Create noAtkInput local noAtkInput = GUI:TextInput_Create(img_bg, "noAtkInput", 419, 98, 42, 22, 14) GUI:TextInput_setString(noAtkInput, "0") GUI:TextInput_setFontColor(noAtkInput, "#fff000") GUI:TextInput_setPlaceholderFontColor(noAtkInput, "#a6a6a6") GUI:TextInput_setTextHorizontalAlignment(noAtkInput, 1) GUI:TextInput_setTextVerticalAlignment(noAtkInput, 1) GUI:setAnchorPoint(noAtkInput, 0.00, 0.00) GUI:setTouchEnabled(noAtkInput, true) GUI:setTag(noAtkInput, -1) -- Create saveBtn local saveBtn = GUI:Button_Create(img_bg, "saveBtn", 331, 31, "res/custom/37/btn_2.png") GUI:Button_setTitleText(saveBtn, [[]]) GUI:Button_setTitleColor(saveBtn, "#ffffff") GUI:Button_setTitleFontSize(saveBtn, 16) GUI:Button_titleEnableOutline(saveBtn, "#000000", 1) GUI:setAnchorPoint(saveBtn, 0.00, 0.00) GUI:setTouchEnabled(saveBtn, true) GUI:setTag(saveBtn, 0) -- Create toggleBtn local toggleBtn = GUI:Button_Create(img_bg, "toggleBtn", 150, 31, "res/custom/37/btn_1.png") GUI:Button_setTitleText(toggleBtn, [[]]) GUI:Button_setTitleColor(toggleBtn, "#ffffff") GUI:Button_setTitleFontSize(toggleBtn, 16) GUI:Button_titleEnableOutline(toggleBtn, "#000000", 1) GUI:setAnchorPoint(toggleBtn, 0.00, 0.00) GUI:setTouchEnabled(toggleBtn, true) GUI:setTag(toggleBtn, 0) -- Create mapText1 local mapText1 = GUI:Text_Create(img_bg, "mapText1", 139, 245, 16, "#fff000", [[ ]]) GUI:Text_enableOutline(mapText1, "#000000", 1) GUI:setAnchorPoint(mapText1, 0.00, 0.00) GUI:setTouchEnabled(mapText1, false) GUI:setTag(mapText1, 0) -- Create mapText2 local mapText2 = GUI:Text_Create(img_bg, "mapText2", 139, 208, 16, "#fff000", [[]]) GUI:Text_enableOutline(mapText2, "#000000", 1) GUI:setAnchorPoint(mapText2, 0.00, 0.00) GUI:setTouchEnabled(mapText2, false) GUI:setTag(mapText2, 0) -- Create mapText3 local mapText3 = GUI:Text_Create(img_bg, "mapText3", 139, 173, 16, "#fff000", [[]]) GUI:Text_enableOutline(mapText3, "#000000", 1) GUI:setAnchorPoint(mapText3, 0.00, 0.00) GUI:setTouchEnabled(mapText3, false) GUI:setTag(mapText3, 0) -- Create delBtn1 local delBtn1 = GUI:Button_Create(img_bg, "delBtn1", 316, 234, "res/custom/37/btn_3.png") GUI:setContentSize(delBtn1, 96, 44) GUI:setIgnoreContentAdaptWithSize(delBtn1, false) GUI:Button_setTitleText(delBtn1, [[]]) GUI:Button_setTitleColor(delBtn1, "#ffffff") GUI:Button_setTitleFontSize(delBtn1, 16) GUI:Button_titleEnableOutline(delBtn1, "#000000", 1) GUI:setAnchorPoint(delBtn1, 0.00, 0.00) GUI:setTouchEnabled(delBtn1, true) GUI:setTag(delBtn1, 0) -- Create recordBtn1 local recordBtn1 = GUI:Button_Create(img_bg, "recordBtn1", 409, 232, "res/custom/37/btn_4.png") GUI:Button_setTitleText(recordBtn1, [[]]) GUI:Button_setTitleColor(recordBtn1, "#ffffff") GUI:Button_setTitleFontSize(recordBtn1, 16) GUI:Button_titleEnableOutline(recordBtn1, "#000000", 1) GUI:setAnchorPoint(recordBtn1, 0.00, 0.00) GUI:setTouchEnabled(recordBtn1, true) GUI:setTag(recordBtn1, 0) -- Create delBtn2 local delBtn2 = GUI:Button_Create(img_bg, "delBtn2", 316, 198, "res/custom/37/btn_3.png") GUI:setContentSize(delBtn2, 96, 44) GUI:setIgnoreContentAdaptWithSize(delBtn2, false) GUI:Button_setTitleText(delBtn2, [[]]) GUI:Button_setTitleColor(delBtn2, "#ffffff") GUI:Button_setTitleFontSize(delBtn2, 16) GUI:Button_titleEnableOutline(delBtn2, "#000000", 1) GUI:setAnchorPoint(delBtn2, 0.00, 0.00) GUI:setTouchEnabled(delBtn2, true) GUI:setTag(delBtn2, 0) -- Create recordBtn2 local recordBtn2 = GUI:Button_Create(img_bg, "recordBtn2", 409, 196, "res/custom/37/btn_4.png") GUI:Button_setTitleText(recordBtn2, [[]]) GUI:Button_setTitleColor(recordBtn2, "#ffffff") GUI:Button_setTitleFontSize(recordBtn2, 16) GUI:Button_titleEnableOutline(recordBtn2, "#000000", 1) GUI:setAnchorPoint(recordBtn2, 0.00, 0.00) GUI:setTouchEnabled(recordBtn2, true) GUI:setTag(recordBtn2, 0) -- Create delBtn3 local delBtn3 = GUI:Button_Create(img_bg, "delBtn3", 316, 162, "res/custom/37/btn_3.png") GUI:setContentSize(delBtn3, 96, 44) GUI:setIgnoreContentAdaptWithSize(delBtn3, false) GUI:Button_setTitleText(delBtn3, [[]]) GUI:Button_setTitleColor(delBtn3, "#ffffff") GUI:Button_setTitleFontSize(delBtn3, 16) GUI:Button_titleEnableOutline(delBtn3, "#000000", 1) GUI:setAnchorPoint(delBtn3, 0.00, 0.00) GUI:setTouchEnabled(delBtn3, true) GUI:setTag(delBtn3, 0) -- Create recordBtn3 local recordBtn3 = GUI:Button_Create(img_bg, "recordBtn3", 409, 160, "res/custom/37/btn_4.png") GUI:Button_setTitleText(recordBtn3, [[]]) GUI:Button_setTitleColor(recordBtn3, "#ffffff") GUI:Button_setTitleFontSize(recordBtn3, 16) GUI:Button_titleEnableOutline(recordBtn3, "#000000", 1) GUI:setAnchorPoint(recordBtn3, 0.00, 0.00) GUI:setTouchEnabled(recordBtn3, true) GUI:setTag(recordBtn3, 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