修改巡航UI
|
|
@ -97,8 +97,15 @@ function AutoXunHangOBJ:sync(actor)
|
|||
self:sendSync(actor)
|
||||
end
|
||||
|
||||
function AutoXunHangOBJ:recordMap(actor)
|
||||
LOGDump("进来了~~~~~")
|
||||
function AutoXunHangOBJ:recordMap(actor, p1, p2, p3, data)
|
||||
data = type(data) == "table" and (data[1] or data) or data
|
||||
local idx = tonumber(data and data.index or data) or 0
|
||||
if idx < 1 or idx > self.maxMap then
|
||||
Func.sendmsg9(actor, "¼Ç¼λÖÃÎÞЧ!")
|
||||
self:sendSync(actor)
|
||||
return
|
||||
end
|
||||
|
||||
local mapid = getbaseinfo(actor, ConstCfg.gbase.mapid)
|
||||
local forbid, msg = self:isForbidMap(mapid)
|
||||
if forbid then
|
||||
|
|
@ -108,21 +115,15 @@ function AutoXunHangOBJ:recordMap(actor)
|
|||
end
|
||||
|
||||
local maps = self:getMaps(actor)
|
||||
for _, v in ipairs(maps) do
|
||||
if tostring(v) == tostring(mapid) then
|
||||
for i, v in ipairs(maps) do
|
||||
if i ~= idx and tostring(v) == tostring(mapid) then
|
||||
Func.sendmsg9(actor, "蜆華芞眒暮翹!")
|
||||
self:sendSync(actor)
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
if #maps >= self.maxMap then
|
||||
Func.sendmsg9(actor, "最多只能记录3个巡航地图!")
|
||||
self:sendSync(actor)
|
||||
return
|
||||
end
|
||||
|
||||
table.insert(maps, mapid)
|
||||
maps[idx] = mapid
|
||||
self:saveMaps(actor, maps)
|
||||
Func.sendmsg9(actor, string.format("眒暮翹挐瑤華芞:%s", tostring(mapid)))
|
||||
self:sendSync(actor)
|
||||
|
|
|
|||
|
|
@ -53,10 +53,10 @@ CreateTopIconOBJ.cfg = {
|
|||
name = "YueKa",
|
||||
open = "YueKaOBJ_main",
|
||||
},
|
||||
{
|
||||
name = "AutoXunHang",
|
||||
client_open = "AutoXunHangOBJ",
|
||||
},
|
||||
-- {
|
||||
-- name = "AutoXunHang",
|
||||
-- client_open = "AutoXunHangOBJ",
|
||||
-- },
|
||||
}
|
||||
|
||||
function CreateTopIconOBJ:checkShow(actor, cfg)
|
||||
|
|
|
|||
|
|
@ -1,182 +1,202 @@
|
|||
local ui = {}
|
||||
function ui.init(parent)
|
||||
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.00, 0.00)
|
||||
GUI:setAnchorPoint(Layer, 0.50, 0.50)
|
||||
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.00, 0.00, 1136.00, 640.00, false)
|
||||
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.00, 320.00)
|
||||
GUI:setAnchorPoint(nd_root, 0.50, 0.50)
|
||||
local nd_root = GUI:Node_Create(Layer, "nd_root", 568, 320)
|
||||
GUI:setTag(nd_root, -1)
|
||||
|
||||
-- Create img_bg
|
||||
local img_bg = GUI:Layout_Create(nd_root, "img_bg", -210.00, -150.00, 420.00, 300.00, false)
|
||||
GUI:Layout_setBackGroundColorType(img_bg, 1)
|
||||
GUI:Layout_setBackGroundColor(img_bg, "#1f1a14")
|
||||
GUI:Layout_setBackGroundColorOpacity(img_bg, 230)
|
||||
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, -1)
|
||||
|
||||
-- Create title
|
||||
local title = GUI:Text_Create(img_bg, "title", 168.00, 270.00, 20, "#fff000", "自动巡航")
|
||||
GUI:setTouchEnabled(title, false)
|
||||
GUI:setTag(title, -1)
|
||||
GUI:setTag(img_bg, 0)
|
||||
|
||||
-- Create btn_close
|
||||
local btn_close = GUI:Layout_Create(img_bg, "btn_close", 378.00, 266.00, 28.00, 24.00, false)
|
||||
GUI:Layout_setBackGroundColorType(btn_close, 1)
|
||||
GUI:Layout_setBackGroundColor(btn_close, "#6b1f1f")
|
||||
GUI:Layout_setBackGroundColorOpacity(btn_close, 210)
|
||||
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, -1)
|
||||
|
||||
-- Create btn_close_Text
|
||||
local btn_close_Text = GUI:Text_Create(btn_close, "btn_close_Text", 14.00, 12.00, 13, "#ffffff", "X")
|
||||
GUI:setAnchorPoint(btn_close_Text, 0.50, 0.50)
|
||||
GUI:setTouchEnabled(btn_close_Text, false)
|
||||
GUI:setTag(btn_close_Text, -1)
|
||||
GUI:setTag(btn_close, 0)
|
||||
|
||||
-- Create statusText
|
||||
local statusText = GUI:Text_Create(img_bg, "statusText", 24.00, 242.00, 14, "#c0c0c0", "状态: 未开启")
|
||||
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 mapTitle
|
||||
local mapTitle = GUI:Text_Create(img_bg, "mapTitle", 24.00, 216.00, 14, "#ffffff", "巡航地图")
|
||||
GUI:setTouchEnabled(mapTitle, false)
|
||||
GUI:setTag(mapTitle, -1)
|
||||
|
||||
-- Create recordBtn
|
||||
local recordBtn = GUI:Layout_Create(img_bg, "recordBtn", 300.00, 205.00, 86.00, 26.00, false)
|
||||
GUI:Layout_setBackGroundColorType(recordBtn, 1)
|
||||
GUI:Layout_setBackGroundColor(recordBtn, "#5a3a16")
|
||||
GUI:Layout_setBackGroundColorOpacity(recordBtn, 210)
|
||||
GUI:setTouchEnabled(recordBtn, true)
|
||||
GUI:setTag(recordBtn, -1)
|
||||
|
||||
-- Create recordBtn_Text
|
||||
local recordBtn_Text = GUI:Text_Create(recordBtn, "recordBtn_Text", 43.00, 13.00, 13, "#ffffff", "记录当前")
|
||||
GUI:setAnchorPoint(recordBtn_Text, 0.50, 0.50)
|
||||
GUI:setTouchEnabled(recordBtn_Text, false)
|
||||
GUI:setTag(recordBtn_Text, -1)
|
||||
|
||||
for i = 1, 3 do
|
||||
local y = 174.00 - (i - 1) * 34.00
|
||||
|
||||
local mapSlot = GUI:Layout_Create(img_bg, "mapSlot" .. i, 24.00, y, 260.00, 26.00, false)
|
||||
GUI:Layout_setBackGroundColorType(mapSlot, 1)
|
||||
GUI:Layout_setBackGroundColor(mapSlot, "#101010")
|
||||
GUI:Layout_setBackGroundColorOpacity(mapSlot, 150)
|
||||
GUI:setTouchEnabled(mapSlot, false)
|
||||
GUI:setTag(mapSlot, -1)
|
||||
|
||||
local mapText = GUI:Text_Create(mapSlot, "mapText" .. i, 8.00, 13.00, 13, "#d8d8d8", i .. ". 空")
|
||||
GUI:setAnchorPoint(mapText, 0.00, 0.50)
|
||||
GUI:setTouchEnabled(mapText, false)
|
||||
GUI:setTag(mapText, -1)
|
||||
|
||||
local delBtn = GUI:Layout_Create(img_bg, "delBtn" .. i, 300.00, y, 58.00, 26.00, false)
|
||||
GUI:Layout_setBackGroundColorType(delBtn, 1)
|
||||
GUI:Layout_setBackGroundColor(delBtn, "#6b1f1f")
|
||||
GUI:Layout_setBackGroundColorOpacity(delBtn, 210)
|
||||
GUI:setTouchEnabled(delBtn, true)
|
||||
GUI:setTag(delBtn, -1)
|
||||
|
||||
local delBtn_Text = GUI:Text_Create(delBtn, "delBtn" .. i .. "_Text", 29.00, 13.00, 13, "#ffffff", "删除")
|
||||
GUI:setAnchorPoint(delBtn_Text, 0.50, 0.50)
|
||||
GUI:setTouchEnabled(delBtn_Text, false)
|
||||
GUI:setTag(delBtn_Text, -1)
|
||||
end
|
||||
|
||||
-- Create autoKuangBao
|
||||
local autoKuangBao = GUI:CheckBox_Create(img_bg, "autoKuangBao", 24.00, 72.00, "res/private/gui_edit/CheckBox_Normal.png", "res/private/gui_edit/CheckBox_Press.png")
|
||||
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 autoKuangBaoText
|
||||
local autoKuangBaoText = GUI:Text_Create(img_bg, "autoKuangBaoText", 48.00, 78.00, 14, "#ffffff", "自动开启狂暴")
|
||||
GUI:setTouchEnabled(autoKuangBaoText, false)
|
||||
GUI:setTag(autoKuangBaoText, -1)
|
||||
|
||||
-- Create orderMode
|
||||
local orderMode = GUI:CheckBox_Create(img_bg, "orderMode", 188.00, 72.00, "res/private/gui_edit/CheckBox_Normal.png", "res/private/gui_edit/CheckBox_Press.png")
|
||||
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 orderModeText
|
||||
local orderModeText = GUI:Text_Create(img_bg, "orderModeText", 212.00, 78.00, 14, "#ffffff", "顺序下图")
|
||||
GUI:setTouchEnabled(orderModeText, false)
|
||||
GUI:setTag(orderModeText, -1)
|
||||
|
||||
-- Create dieText
|
||||
local dieText = GUI:Text_Create(img_bg, "dieText", 24.00, 46.00, 14, "#ffffff", "死亡停止")
|
||||
GUI:setTouchEnabled(dieText, false)
|
||||
GUI:setTag(dieText, -1)
|
||||
|
||||
-- Create dieInput
|
||||
local dieInput = GUI:TextInput_Create(img_bg, "dieInput", 92.00, 35.00, 44.00, 24.00, 14)
|
||||
GUI:TextInput_setFontColor(dieInput, "#fff000")
|
||||
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 dieText2
|
||||
local dieText2 = GUI:Text_Create(img_bg, "dieText2", 142.00, 46.00, 14, "#ffffff", "次")
|
||||
GUI:setTouchEnabled(dieText2, false)
|
||||
GUI:setTag(dieText2, -1)
|
||||
|
||||
-- Create noAtkText
|
||||
local noAtkText = GUI:Text_Create(img_bg, "noAtkText", 188.00, 46.00, 14, "#ffffff", "未攻击切图")
|
||||
GUI:setTouchEnabled(noAtkText, false)
|
||||
GUI:setTag(noAtkText, -1)
|
||||
|
||||
-- Create noAtkInput
|
||||
local noAtkInput = GUI:TextInput_Create(img_bg, "noAtkInput", 274.00, 35.00, 50.00, 24.00, 14)
|
||||
GUI:TextInput_setFontColor(noAtkInput, "#fff000")
|
||||
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 noAtkText2
|
||||
local noAtkText2 = GUI:Text_Create(img_bg, "noAtkText2", 330.00, 46.00, 14, "#ffffff", "秒")
|
||||
GUI:setTouchEnabled(noAtkText2, false)
|
||||
GUI:setTag(noAtkText2, -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:Layout_Create(img_bg, "toggleBtn", 76.00, 8.00, 112.00, 30.00, false)
|
||||
GUI:Layout_setBackGroundColorType(toggleBtn, 1)
|
||||
GUI:Layout_setBackGroundColor(toggleBtn, "#23531f")
|
||||
GUI:Layout_setBackGroundColorOpacity(toggleBtn, 210)
|
||||
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, -1)
|
||||
GUI:setTag(toggleBtn, 0)
|
||||
|
||||
-- Create toggleBtnText
|
||||
local toggleBtnText = GUI:Text_Create(toggleBtn, "toggleBtnText", 56.00, 15.00, 13, "#ffffff", "开启巡航")
|
||||
GUI:setAnchorPoint(toggleBtnText, 0.50, 0.50)
|
||||
GUI:setTouchEnabled(toggleBtnText, false)
|
||||
GUI:setTag(toggleBtnText, -1)
|
||||
-- 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 saveBtn
|
||||
local saveBtn = GUI:Layout_Create(img_bg, "saveBtn", 232.00, 8.00, 112.00, 30.00, false)
|
||||
GUI:Layout_setBackGroundColorType(saveBtn, 1)
|
||||
GUI:Layout_setBackGroundColor(saveBtn, "#5a3a16")
|
||||
GUI:Layout_setBackGroundColorOpacity(saveBtn, 210)
|
||||
GUI:setTouchEnabled(saveBtn, true)
|
||||
GUI:setTag(saveBtn, -1)
|
||||
-- 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 saveBtn_Text
|
||||
local saveBtn_Text = GUI:Text_Create(saveBtn, "saveBtn_Text", 56.00, 15.00, 13, "#ffffff", "保存设置")
|
||||
GUI:setAnchorPoint(saveBtn_Text, 0.50, 0.50)
|
||||
GUI:setTouchEnabled(saveBtn_Text, false)
|
||||
GUI:setTag(saveBtn_Text, -1)
|
||||
-- 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
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ function ui.init(parent, __data__, __update__)
|
|||
GUI:setTag(rank_btn, 0)
|
||||
|
||||
-- Create bossquery
|
||||
local bossquery = GUI:Button_Create(Image_4, "bossquery", 596, 89, "res/custom/43/icon.png")
|
||||
local bossquery = GUI:Button_Create(Image_4, "bossquery", 582, 99, "res/custom/43/icon.png")
|
||||
GUI:Button_setTitleText(bossquery, [[]])
|
||||
GUI:Button_setTitleColor(bossquery, "#ffffff")
|
||||
GUI:Button_setTitleFontSize(bossquery, 16)
|
||||
|
|
@ -73,6 +73,17 @@ function ui.init(parent, __data__, __update__)
|
|||
GUI:setTouchEnabled(bossquery, true)
|
||||
GUI:setTag(bossquery, 0)
|
||||
|
||||
-- Create btn_xunhang
|
||||
local btn_xunhang = GUI:Button_Create(Image_4, "btn_xunhang", 622, 59, "res/custom/37/iccon.png")
|
||||
GUI:Button_setTitleText(btn_xunhang, [[]])
|
||||
GUI:Button_setTitleColor(btn_xunhang, "#ffffff")
|
||||
GUI:Button_setTitleFontSize(btn_xunhang, 16)
|
||||
GUI:Button_titleEnableOutline(btn_xunhang, "#000000", 1)
|
||||
GUI:setAnchorPoint(btn_xunhang, 0.00, 0.00)
|
||||
GUI:setScale(btn_xunhang, 0.80)
|
||||
GUI:setTouchEnabled(btn_xunhang, true)
|
||||
GUI:setTag(btn_xunhang, 0)
|
||||
|
||||
-- Create Image_14
|
||||
local Image_14 = GUI:Image_Create(Panel_bg, "Image_14", 280, 11, "res/private/main/1900012006.png")
|
||||
GUI:setChineseName(Image_14, "主界面操作_Hp_背景图")
|
||||
|
|
|
|||
|
|
@ -1075,7 +1075,7 @@ function ui.init(parent, __data__, __update__)
|
|||
TAGOBJ["56"] = ListView_bubble_tips
|
||||
|
||||
-- Create bossquery
|
||||
local bossquery = GUI:Button_Create(Panel_bg, "bossquery", 245, 156, "res/custom/43/icon.png")
|
||||
local bossquery = GUI:Button_Create(Panel_bg, "bossquery", 245, 157, "res/custom/43/icon.png")
|
||||
GUI:Button_setTitleText(bossquery, [[]])
|
||||
GUI:Button_setTitleColor(bossquery, "#ffffff")
|
||||
GUI:Button_setTitleFontSize(bossquery, 16)
|
||||
|
|
@ -1085,6 +1085,17 @@ function ui.init(parent, __data__, __update__)
|
|||
GUI:setTouchEnabled(bossquery, true)
|
||||
GUI:setTag(bossquery, 0)
|
||||
|
||||
-- Create btn_xunhang
|
||||
local btn_xunhang = GUI:Button_Create(Panel_bg, "btn_xunhang", 195, 157, "res/custom/37/iccon.png")
|
||||
GUI:Button_setTitleText(btn_xunhang, [[]])
|
||||
GUI:Button_setTitleColor(btn_xunhang, "#ffffff")
|
||||
GUI:Button_setTitleFontSize(btn_xunhang, 16)
|
||||
GUI:Button_titleEnableOutline(btn_xunhang, "#000000", 1)
|
||||
GUI:setAnchorPoint(btn_xunhang, 0.00, 0.00)
|
||||
GUI:setScale(btn_xunhang, 0.80)
|
||||
GUI:setTouchEnabled(btn_xunhang, true)
|
||||
GUI:setTag(btn_xunhang, 0)
|
||||
|
||||
-- Create Panel_mid
|
||||
local Panel_mid = GUI:Layout_Create(Main_Property, "Panel_mid", 0, 4, 500, 300, false)
|
||||
GUI:setChineseName(Panel_mid, "主界面_内功_背景图")
|
||||
|
|
|
|||
|
|
@ -3,6 +3,16 @@ AutoXunHangOBJ = {}
|
|||
AutoXunHangOBJ.__cname = "AutoXunHangOBJ"
|
||||
AutoXunHangOBJ.data = {}
|
||||
|
||||
function AutoXunHangOBJ:isWidgetValid(widget)
|
||||
return widget and GUI:Win_IsNotNull(widget)
|
||||
end
|
||||
|
||||
function AutoXunHangOBJ:addClick(widget, callback)
|
||||
if self:isWidgetValid(widget) then
|
||||
GUI:addOnClickEvent(widget, callback)
|
||||
end
|
||||
end
|
||||
|
||||
function AutoXunHangOBJ:main()
|
||||
if self._parent and GUI:Win_IsNotNull(self._parent) then
|
||||
GUI:Win_Close(self._parent)
|
||||
|
|
@ -22,25 +32,26 @@ function AutoXunHangOBJ:main()
|
|||
end
|
||||
|
||||
function AutoXunHangOBJ:bindEvent()
|
||||
GUI:addOnClickEvent(self.ui.bg_close, function()
|
||||
self:addClick(self.ui.bg_close, function()
|
||||
GUI:Win_Close(self._parent)
|
||||
end)
|
||||
|
||||
GUI:addOnClickEvent(self.ui.btn_close, function()
|
||||
self:addClick(self.ui.btn_close, function()
|
||||
GUI:Win_Close(self._parent)
|
||||
end)
|
||||
|
||||
GUI:addOnClickEvent(self.ui.recordBtn, function()
|
||||
ssrMessage:SubLink(self.__cname .. "_recordMap")
|
||||
end)
|
||||
|
||||
|
||||
for i = 1, 3 do
|
||||
GUI:addOnClickEvent(self.ui["delBtn" .. i], function()
|
||||
self:addClick(self.ui["delBtn" .. i], function()
|
||||
ssrMessage:SubLink(self.__cname .. "_delMap", { index = i })
|
||||
end)
|
||||
self:addClick(self.ui["recordBtn" .. i], function()
|
||||
ssrMessage:SubLink(self.__cname .. "_recordMap", { index = i })
|
||||
end)
|
||||
end
|
||||
|
||||
GUI:addOnClickEvent(self.ui.toggleBtn, function()
|
||||
self:addClick(self.ui.toggleBtn, function()
|
||||
if tonumber(self.data.isOpen) == 1 then
|
||||
ssrMessage:SubLink(self.__cname .. "_stop")
|
||||
else
|
||||
|
|
@ -48,7 +59,7 @@ function AutoXunHangOBJ:bindEvent()
|
|||
end
|
||||
end)
|
||||
|
||||
GUI:addOnClickEvent(self.ui.saveBtn, function()
|
||||
self:addClick(self.ui.saveBtn, function()
|
||||
self:saveSetting()
|
||||
end)
|
||||
end
|
||||
|
|
@ -69,19 +80,38 @@ function AutoXunHangOBJ:refresh()
|
|||
end
|
||||
|
||||
local isOpen = tonumber(self.data.isOpen) == 1
|
||||
GUI:Text_setString(self.ui.statusText, isOpen and "状态: 巡航中" or "状态: 未开启")
|
||||
GUI:Text_setTextColor(self.ui.statusText, isOpen and "#00ff00" or "#c0c0c0")
|
||||
GUI:Text_setString(self.ui.toggleBtnText, isOpen and "停止巡航" or "开启巡航")
|
||||
if self:isWidgetValid(self.ui.statusText) then
|
||||
GUI:Text_setString(self.ui.statusText, isOpen and "巡航中" or "未开启")
|
||||
GUI:Text_setTextColor(self.ui.statusText, isOpen and "#00ff00" or "#c0c0c0")
|
||||
end
|
||||
|
||||
GUI:CheckBox_setSelected(self.ui.autoKuangBao, tonumber(self.data.autoKuangBao) == 1)
|
||||
GUI:CheckBox_setSelected(self.ui.orderMode, tonumber(self.data.orderMode) == 1)
|
||||
GUI:TextInput_setString(self.ui.dieInput, tostring(tonumber(self.data.dieStop) or 0))
|
||||
GUI:TextInput_setString(self.ui.noAtkInput, tostring(tonumber(self.data.noAttackSec) or 0))
|
||||
if self:isWidgetValid(self.ui.toggleBtn) then
|
||||
GUI:Button_loadTextureNormal(self.ui.toggleBtn, string.format("res/custom/37/btn_%d.png", isOpen and 5 or 1))
|
||||
end
|
||||
|
||||
if self:isWidgetValid(self.ui.autoKuangBao) then
|
||||
GUI:CheckBox_setSelected(self.ui.autoKuangBao, tonumber(self.data.autoKuangBao) == 1)
|
||||
end
|
||||
|
||||
if self:isWidgetValid(self.ui.orderMode) then
|
||||
GUI:CheckBox_setSelected(self.ui.orderMode, tonumber(self.data.orderMode) == 1)
|
||||
end
|
||||
|
||||
if self:isWidgetValid(self.ui.dieInput) then
|
||||
GUI:TextInput_setString(self.ui.dieInput, tostring(tonumber(self.data.dieStop) or 0))
|
||||
end
|
||||
|
||||
if self:isWidgetValid(self.ui.noAtkInput) then
|
||||
GUI:TextInput_setString(self.ui.noAtkInput, tostring(tonumber(self.data.noAttackSec) or 0))
|
||||
end
|
||||
|
||||
local maps = self.data.maps or {}
|
||||
for i = 1, 3 do
|
||||
local name = maps[i] and tostring(maps[i]) or "空"
|
||||
GUI:Text_setString(self.ui["mapText" .. i], i .. ". " .. name)
|
||||
local mapText = self.ui["mapText" .. i]
|
||||
if self:isWidgetValid(mapText) then
|
||||
GUI:Text_setString(mapText, i .. ". " .. name)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -134,6 +134,10 @@ function MainProperty.main()
|
|||
GUI:addOnClickEvent(MainProperty._ui["bossquery"], function()
|
||||
ssrMessage:SubLink("BOSSqueryOBJ_main")
|
||||
end)
|
||||
-- 巡航系统
|
||||
GUI:addOnClickEvent(MainProperty._ui["btn_xunhang"], function()
|
||||
AutoXunHangOBJ:main()
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -148,6 +148,10 @@ function MainProperty.main()
|
|||
ssrMessage:SubLink("BOSSqueryOBJ_main")
|
||||
SL:PlayBtnClickAudio()
|
||||
end)
|
||||
-- 巡航系统
|
||||
GUI:addOnClickEvent(MainProperty._ui["btn_xunhang"], function()
|
||||
AutoXunHangOBJ:main()
|
||||
end)
|
||||
|
||||
MainProperty.OnRefreshPropertyShow()
|
||||
MainProperty.OnUpdatePlayerPosition()
|
||||
|
|
|
|||
BIN
client/dev/res/custom/37/bg.png
Normal file
|
After Width: | Height: | Size: 313 KiB |
BIN
client/dev/res/custom/37/btn_1.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
client/dev/res/custom/37/btn_2.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
client/dev/res/custom/37/btn_3.png
Normal file
|
After Width: | Height: | Size: 8.4 KiB |
BIN
client/dev/res/custom/37/btn_4.png
Normal file
|
After Width: | Height: | Size: 9.6 KiB |
BIN
client/dev/res/custom/37/btn_5.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
client/dev/res/custom/37/iccon.png
Normal file
|
After Width: | Height: | Size: 12 KiB |