修复成员战绩,显示记录
|
|
@ -86,6 +86,13 @@ function M:InitTime()
|
||||||
return serverDayValues, serverDayItems
|
return serverDayValues, serverDayItems
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function M:ShouRanks()
|
||||||
|
self._lastTpe = self._father.familyType.selectedIndex
|
||||||
|
self._father.familyType.selectedIndex = 0
|
||||||
|
self._view.visible = true
|
||||||
|
self:SearchRank()
|
||||||
|
end
|
||||||
|
|
||||||
function M:RoundListRenderer(index, obj)
|
function M:RoundListRenderer(index, obj)
|
||||||
local rankTable = self.roundRanks
|
local rankTable = self.roundRanks
|
||||||
obj:GetChild('text_rank').text = index
|
obj:GetChild('text_rank').text = index
|
||||||
|
|
@ -116,7 +123,7 @@ end
|
||||||
function M:SearchRank()
|
function M:SearchRank()
|
||||||
local fgCtr = ControllerManager.GetController(NewGroupController)
|
local fgCtr = ControllerManager.GetController(NewGroupController)
|
||||||
local begin_time = math.min(self.leftTimes, self.rightTimes)
|
local begin_time = math.min(self.leftTimes, self.rightTimes)
|
||||||
local end_time = math.max(self.leftTimes, self.rightTimes)
|
local end_time = math.max(self.leftTimes, self.rightTimes) + 86399
|
||||||
self:ClearingTable()
|
self:ClearingTable()
|
||||||
self:RecursionSearchRank(fgCtr, 0, begin_time, end_time)
|
self:RecursionSearchRank(fgCtr, 0, begin_time, end_time)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
local FamilyChooseTimeView = import(".FamilyChooseTimeView")
|
|
||||||
|
|
||||||
local FamilyNumberRecord = {
|
local FamilyNumberRecord = {
|
||||||
military = { size = 0, list = {} },
|
military = { size = 0, list = {} },
|
||||||
rankNumber = {},
|
rankNumber = {},
|
||||||
|
|
@ -8,112 +6,103 @@ local FamilyNumberRecord = {
|
||||||
local M = FamilyNumberRecord
|
local M = FamilyNumberRecord
|
||||||
|
|
||||||
function FamilyNumberRecord.New(root)
|
function FamilyNumberRecord.New(root)
|
||||||
setmetatable(M, { __index = root })
|
|
||||||
local self = setmetatable({}, { __index = M })
|
local self = setmetatable({}, { __index = M })
|
||||||
|
|
||||||
-- print("lingmengFamilyNumberRecord")
|
self._father = root
|
||||||
-- for key, value in pairs(self._group) do
|
self._lastTpe = root.familyType.selectedIndex
|
||||||
-- if type(value) == "table" then
|
self.group_id = root._group.id
|
||||||
-- print(key)
|
root.familyType.selectedIndex = 0
|
||||||
-- pt(value)
|
local comp_numberRecord = UIPackage.CreateObjectFromURL("ui://Family/comp_numberRecord")
|
||||||
-- else
|
root._view:AddChild(comp_numberRecord)
|
||||||
-- print(key .. ":" .. tostring(value))
|
comp_numberRecord.width = root._view.width
|
||||||
-- end
|
comp_numberRecord.height = root._view.height
|
||||||
-- end
|
comp_numberRecord:Center()
|
||||||
local group_id = self._group.id
|
self._view = comp_numberRecord
|
||||||
|
|
||||||
|
local group_id = self.group_id
|
||||||
local MJScore = 0
|
local MJScore = 0
|
||||||
local PKScore = 0
|
local PKScore = 0
|
||||||
local fgCtr = ControllerManager.GetController(NewGroupController)
|
local fgCtr = ControllerManager.GetController(NewGroupController)
|
||||||
local comp_gameTypeList = self._view:GetChild('comp_gameTypeList'):GetChild('n0')
|
|
||||||
local input_IDSerach = self._view:GetChild('input_numberID')
|
local input_IDSerach = self._view:GetChild('input_numberID')
|
||||||
local text_recordGameType = self._view:GetChild('text_recordGameType')
|
|
||||||
local text_recordSortType = self._view:GetChild('text_recordSortType')
|
|
||||||
local text_allRound = self._view:GetChild('text_allRound')
|
local text_allRound = self._view:GetChild('text_allRound')
|
||||||
local text_winNum = self._view:GetChild('text_winNum')
|
local text_winNum = self._view:GetChild('text_winNum')
|
||||||
local text_useDiamond = self._view:GetChild('text_useDiamond')
|
local text_useDiamond = self._view:GetChild('text_useDiamond')
|
||||||
local btn_chooseTimeBegin = self._view:GetChild('btn_chooseTimeBegin')
|
|
||||||
local btn_chooseTimeEnd = self._view:GetChild('btn_chooseTimeEnd')
|
|
||||||
local text_score_poker = self._view:GetChild('text_score_poker')
|
local text_score_poker = self._view:GetChild('text_score_poker')
|
||||||
local text_score_majiang = self._view:GetChild('text_score_majiang')
|
local text_score_majiang = self._view:GetChild('text_score_majiang')
|
||||||
local ctr_numberRecordRank = self._view:GetController('numberRecordRank')
|
local box_type = self._view:GetChild('combBox_type')
|
||||||
local ctr_chooseTime = self._view:GetController('showChooseTime')
|
local ctr_day = self._view:GetController('day')
|
||||||
|
local ctr_sort = self._view:GetController('sort')
|
||||||
|
local ctr_limitDay = self._view:GetController('limitDay')
|
||||||
|
|
||||||
self.familyType.selectedIndex = 5
|
-- self.familyType.selectedIndex = 5
|
||||||
self.familyChooseTimeView = FamilyChooseTimeView.New(self, self._view:GetChild('comp_chooseTime'))
|
|
||||||
self._viewList_numberRankRead = self._view:GetChild('comp_numberRecordByGameTypelooked'):GetChild('n3')
|
self._viewList_numberRankRead = self._view:GetChild('comp_numberRecordByGameTypelooked'):GetChild('n3')
|
||||||
self._viewList_numberRankUnRead = self._view:GetChild('comp_numberRecordByGameType'):GetChild('n3')
|
self._viewList_numberRankUnRead = self._view:GetChild('comp_numberRecordByGameType'):GetChild('n3')
|
||||||
self._viewList_numverRecord = self._view:GetChild('list_numverRecord')
|
self._viewList_numverRecord = self._view:GetChild('list_numverRecord')
|
||||||
self._viewlist_numberRecordDetail = self._view:GetChild('list_numberRecordDetail')
|
self._viewlist_numberRecordDetail = self._view:GetChild('list_numberRecordDetail')
|
||||||
self._viewText_titleRecord = self._view:GetChild('text_titleRecord')
|
self._viewText_titleRecord = self._view:GetChild('text_titleRecord')
|
||||||
|
|
||||||
|
self.ctr_numberRecord = self._view:GetController('page')
|
||||||
|
self._cte_noPeople = self._view:GetController('noPeople')
|
||||||
|
|
||||||
self.ctr_numberRecord = self._view:GetController('numberRecord')
|
self._text_groupTitle = string.format("%s(%s)", root._group.name, group_id)
|
||||||
|
|
||||||
self._text_groupTitle = string.format("%s(%s)", self._group.name, group_id)
|
|
||||||
|
|
||||||
btn_chooseTimeBegin.text = os.date('%Y-%m-%d', os.time())
|
box_type.items, box_type.values = self:InitBoxType()
|
||||||
btn_chooseTimeEnd.text = os.date('%Y-%m-%d', os.time())
|
|
||||||
text_score_majiang.text = 0 - MJScore
|
text_score_majiang.text = 0 - MJScore
|
||||||
text_score_poker.text = 0 - PKScore
|
text_score_poker.text = 0 - PKScore
|
||||||
self._viewText_titleRecord.text = string.format("%s 成员记录", self._text_groupTitle)
|
self._viewText_titleRecord.text = string.format("%s 成员记录", self._text_groupTitle)
|
||||||
self._view:GetChild('text_residueDiamond').text = self._group.diamo
|
self._view:GetChild('text_residueDiamond').text = root._group.diamo
|
||||||
self._view:GetChild('text_timeRecord').text = os.date('%Y-%m-%d %H:%M', os.time())
|
self._view:GetChild('text_timeRecord').text = os.date('%Y-%m-%d %H:%M:%S', os.time())
|
||||||
|
|
||||||
|
self:InitTimeAndSord()
|
||||||
self:NumverRecordRenderer(group_id)
|
self:NumverRecordRenderer(group_id)
|
||||||
self:NumverRankRenderer(group_id)
|
self:NumverRankRenderer(group_id)
|
||||||
self:GameTypeListRenderer(comp_gameTypeList)
|
|
||||||
self:NumberRecordDetailRender()
|
self:NumberRecordDetailRender()
|
||||||
|
|
||||||
btn_chooseTimeBegin.onClick:Set(function()
|
ctr_day.onChanged:Set(function(context)
|
||||||
ctr_chooseTime.selectedIndex = 1
|
local timeTable = os.date("*t", os.time())
|
||||||
self.familyChooseTimeView:ChooseTime(0, function(type, text1, text2)
|
timeTable.hour = 0
|
||||||
ctr_chooseTime.selectedIndex = 0
|
timeTable.min = 0
|
||||||
if type == 0 then
|
timeTable.sec = 0
|
||||||
btn_chooseTimeBegin.text = text1
|
local index = context.sender.selectedIndex
|
||||||
else
|
self._data_leftTime = os.time(timeTable) - index * 86400
|
||||||
btn_chooseTimeBegin.text = text1
|
self._data_rightTime = os.time(timeTable) - index * 86400 + 86399
|
||||||
btn_chooseTimeEnd.text = text2
|
self:OnClickSortType()
|
||||||
end
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
ctr_sort.onChanged:Set(function()
|
||||||
|
local index = context.sender.selectedIndex
|
||||||
|
self._data_sortType = index
|
||||||
|
self:OnClickSortType()
|
||||||
end)
|
end)
|
||||||
btn_chooseTimeEnd.onClick:Set(function()
|
|
||||||
ctr_chooseTime.selectedIndex = 1
|
box_type.onChanged:Set(function()
|
||||||
self.familyChooseTimeView:ChooseTime(1, function(type, text1, text2)
|
-- self._data_seletedType = box_type.value
|
||||||
ctr_chooseTime.selectedIndex = 0
|
self._data_seletedType = 0
|
||||||
if type == 0 then
|
self:OnClickSortType()
|
||||||
btn_chooseTimeEnd.text = text1
|
|
||||||
else
|
|
||||||
btn_chooseTimeBegin.text = text1
|
|
||||||
btn_chooseTimeEnd.text = text2
|
|
||||||
end
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
ctr_limitDay.onChanged:Set(function()
|
||||||
|
--写限制分数
|
||||||
end)
|
end)
|
||||||
comp_gameTypeList.onClickItem:Set(function(context)
|
|
||||||
input_IDSerach.text = ""
|
|
||||||
self:OnClickSortType(group_id, context.data.data.id)
|
|
||||||
ctr_numberRecordRank.selectedIndex = 0
|
|
||||||
text_recordGameType.text = context.data.title
|
|
||||||
end)
|
|
||||||
self.btn_close.onClick:Set(function()
|
|
||||||
if self.ctr_numberRecord.selectedIndex > 0 then
|
|
||||||
self.ctr_numberRecord.selectedIndex = self.ctr_numberRecord.selectedIndex - 1
|
|
||||||
else
|
|
||||||
self:InitCloseClick()
|
|
||||||
self.familyType.selectedIndex = 1
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
self.ctr_numberRecord.onChanged:Set(function()
|
self.ctr_numberRecord.onChanged:Set(function()
|
||||||
if self.ctr_numberRecord.selectedIndex == 0 then
|
if self.ctr_numberRecord.selectedIndex == 0 then
|
||||||
self._viewText_titleRecord.text = string.format("%s 成员记录", self._text_groupTitle)
|
self._viewText_titleRecord.text = string.format("%s 成员记录", self._text_groupTitle)
|
||||||
self._view:GetChild('text_timeRecord').text = os.date('%Y-%m-%d %H:%M', os.time())
|
self._view:GetChild('text_timeRecord').text = os.date('%Y-%m-%d %H:%M:%S', os.time())
|
||||||
elseif self.ctr_numberRecord.selectedIndex == 1 then
|
elseif self.ctr_numberRecord.selectedIndex == 1 then
|
||||||
self._viewText_titleRecord.text = string.format("%s 个人记录", self._text_groupTitle)
|
self._viewText_titleRecord.text = string.format("%s 个人记录", self._text_groupTitle)
|
||||||
self._view:GetChild('text_numberRecordTime').text = os.date('%Y-%m-%d %H:%M', os.time())
|
self._view:GetChild('text_numberRecordTime').text = os.date('%Y-%m-%d %H:%M:%S', os.time())
|
||||||
elseif self.ctr_numberRecord.selectedIndex == 2 then
|
elseif self.ctr_numberRecord.selectedIndex == 2 then
|
||||||
self._viewText_titleRecord.text = string.format("%s %s", self._text_groupTitle,
|
self._viewText_titleRecord.text = string.format("%s %s", self._text_groupTitle,
|
||||||
self._flag_unReadDetail and "未读详情" or "已读详情")
|
self._flag_unReadDetail and "未读详情" or "已读详情")
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
self._view:GetChild('btn_close').onClick:Set(function()
|
||||||
|
root.familyType.selectedIndex = self._lastTpe
|
||||||
|
self._lastTpe = nil
|
||||||
|
self._view.visible = false
|
||||||
|
end)
|
||||||
self._view:GetChild('btn_clearInput').onClick:Set(function()
|
self._view:GetChild('btn_clearInput').onClick:Set(function()
|
||||||
input_IDSerach.text = ""
|
input_IDSerach.text = ""
|
||||||
end)
|
end)
|
||||||
|
|
@ -129,6 +118,7 @@ function FamilyNumberRecord.New(root)
|
||||||
else
|
else
|
||||||
self.showRank = tempRank
|
self.showRank = tempRank
|
||||||
self._viewList_numverRecord.numItems = #self.showRank
|
self._viewList_numverRecord.numItems = #self.showRank
|
||||||
|
self._cte_noPeople.selectedIndex = #self.showRank == 0
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
self._view:GetChild('btn_changeMJScore').onClick:Set(function()
|
self._view:GetChild('btn_changeMJScore').onClick:Set(function()
|
||||||
|
|
@ -179,54 +169,46 @@ function FamilyNumberRecord.New(root)
|
||||||
self._flag_allChooseReverse = self.records[self.gameTypeNum][self.readStatusNum].childNum
|
self._flag_allChooseReverse = self.records[self.gameTypeNum][self.readStatusNum].childNum
|
||||||
self._viewlist_numberRecordDetail:RefreshVirtualList()
|
self._viewlist_numberRecordDetail:RefreshVirtualList()
|
||||||
end)
|
end)
|
||||||
self._view:GetChild('comp_sortTypeList'):GetChild('n0').onClickItem:Set(function(context)
|
|
||||||
input_IDSerach.text = ""
|
|
||||||
local sortType = tonumber(context.data.text)
|
|
||||||
self:OnClickSortType(group_id, 0, sortType)
|
|
||||||
ctr_numberRecordRank.selectedIndex = 0
|
|
||||||
text_recordSortType.text = sortType == 1 and "正数榜" or "负数榜"
|
|
||||||
end)
|
|
||||||
|
|
||||||
self:OnClickSortType(group_id)
|
self:OnClickSortType()
|
||||||
|
|
||||||
fgCtr:FG_GetConsumeStat(group_id, self.familyChooseTimeView:GetBeginTime(), self.familyChooseTimeView:GetEndTime(),
|
-- fgCtr:FG_GetConsumeStat(group_id, self.familyChooseTimeView:GetBeginTime(), self.familyChooseTimeView:GetEndTime(),
|
||||||
function(res)
|
-- function(res)
|
||||||
pt(res)
|
-- pt(res)
|
||||||
if res.ReturnCode ~= 0 then
|
-- if res.ReturnCode ~= 0 then
|
||||||
ViewUtil.ShowOneChooose("获取总信息失败" .. res.ReturnCode)
|
-- ViewUtil.ShowOneChooose("获取总信息失败" .. res.ReturnCode)
|
||||||
else
|
-- else
|
||||||
MJScore = tonumber(res.Data.mj_score)
|
-- MJScore = tonumber(res.Data.mj_score)
|
||||||
PKScore = tonumber(res.Data.pk_score)
|
-- PKScore = tonumber(res.Data.pk_score)
|
||||||
text_score_majiang.text = 0 - MJScore
|
-- text_score_majiang.text = 0 - MJScore
|
||||||
text_score_poker.text = 0 - PKScore
|
-- text_score_poker.text = 0 - PKScore
|
||||||
end
|
-- end
|
||||||
end)
|
-- end)
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:GameTypeListRenderer(comp_gameTypeList)
|
function M:InitBoxType()
|
||||||
local games = DataManager.SelfUser.games
|
local items = { "扑克", "麻将" }
|
||||||
|
local values = { "1", "2" }
|
||||||
|
|
||||||
comp_gameTypeList:SetVirtual()
|
local games = DataManager.SelfUser.games
|
||||||
comp_gameTypeList.itemRenderer = function(index, obj)
|
for i = 1, #games do
|
||||||
if index == 0 then
|
table.insert(items, games[i].name)
|
||||||
obj.title = "麻将"
|
table.insert(values, tostring(games[i].game_id))
|
||||||
obj.data = {}
|
|
||||||
obj.data.index = index
|
|
||||||
obj.data.id = -1
|
|
||||||
elseif index == 1 then
|
|
||||||
obj.title = "扑克"
|
|
||||||
obj.data = {}
|
|
||||||
obj.data.index = index
|
|
||||||
obj.data.id = -2
|
|
||||||
else
|
|
||||||
obj.title = games[index - 1].name
|
|
||||||
obj.data = {}
|
|
||||||
obj.data.index = index
|
|
||||||
obj.data.id = games[index - 1].game_id
|
|
||||||
end
|
end
|
||||||
end
|
|
||||||
comp_gameTypeList.numItems = #games + 2
|
self._data_seletedType = 0
|
||||||
|
return items, values
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:InitTimeAndSord()
|
||||||
|
local timeTable = os.date("*t", os.time())
|
||||||
|
timeTable.hour = 0
|
||||||
|
timeTable.min = 0
|
||||||
|
timeTable.sec = 0
|
||||||
|
self._data_leftTime = os.time(timeTable)
|
||||||
|
self._data_rightTime = os.time(timeTable) + 86399
|
||||||
|
self._data_sortType = 0
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:NumverRecordRenderer()
|
function M:NumverRecordRenderer()
|
||||||
|
|
@ -329,7 +311,7 @@ function M:NumverRankRenderer(groupId)
|
||||||
self.ctr_numberRecord.selectedIndex = 1
|
self.ctr_numberRecord.selectedIndex = 1
|
||||||
self:OnClickNumberRank(groupId, info.uid, info.round)
|
self:OnClickNumberRank(groupId, info.uid, info.round)
|
||||||
self._view:GetChild('text_numberRecordName').text = info.nick
|
self._view:GetChild('text_numberRecordName').text = info.nick
|
||||||
self._view:GetChild('text_numberRecordID').text = info.uid
|
self._view:GetChild('text_numberRecordID').text = string.format("ID:%s", info.uid)
|
||||||
ImageLoad.Load(info.portrait, self._view:GetChild('btn_numberRecordHead')._iconObject)
|
ImageLoad.Load(info.portrait, self._view:GetChild('btn_numberRecordHead')._iconObject)
|
||||||
self.rankNumber.uid = info.uid
|
self.rankNumber.uid = info.uid
|
||||||
self.rankNumber.round = info.round
|
self.rankNumber.round = info.round
|
||||||
|
|
@ -337,29 +319,34 @@ function M:NumverRankRenderer(groupId)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:OnClickSortType(groupId, pid, sortType)
|
function M:OnClickSortType()
|
||||||
print("lingmengOnClickSortType")
|
print("lingmengOnClickSortType")
|
||||||
|
self.rank = {}
|
||||||
local fgCtr = ControllerManager.GetController(NewGroupController)
|
local fgCtr = ControllerManager.GetController(NewGroupController)
|
||||||
local numberRecordList = self._viewList_numverRecord
|
self:RecursionGetNumberRank(fgCtr, 0, 0, 0, 0)
|
||||||
fgCtr:FG_GetMemberRank(groupId, 0, 0, 10, self.familyChooseTimeView:GetBeginTime(),
|
end
|
||||||
self.familyChooseTimeView:GetEndTime(), sortType, function(res)
|
|
||||||
pt(res)
|
function M:RecursionGetNumberRank(fgCtr, index, round, win, cost)
|
||||||
|
fgCtr:FG_GetMemberRank(self.group_id, 0, index * 2, 2, self._data_leftTime, self._data_rightTime, nil, function(res)
|
||||||
if res.ReturnCode ~= 0 then
|
if res.ReturnCode ~= 0 then
|
||||||
ViewUtil.ShowOneChooose("获取排行榜失败" .. res.ReturnCode)
|
ViewUtil.ErrorTip(res.ReturnCode, "获取排行榜失败")
|
||||||
|
return
|
||||||
else
|
else
|
||||||
self.rank = res.Data.ranks
|
local info = res.Data
|
||||||
self.showRank = self.rank
|
if info.ranks and #info.ranks > 0 then
|
||||||
local round = 0
|
for i = 1, #info.ranks do
|
||||||
local win = 0
|
table.insert(self.rank, info.ranks[i])
|
||||||
local cost = 0
|
|
||||||
for i = 1, #self.rank do
|
|
||||||
round = round + self.rank[i].round
|
round = round + self.rank[i].round
|
||||||
win = win + self.rank[i].win
|
win = win + self.rank[i].win
|
||||||
end
|
end
|
||||||
|
self:RecursionGetNumberRank(fgCtr, index + 1, round, win, cost)
|
||||||
|
else
|
||||||
round = math.floor(round / 2)
|
round = math.floor(round / 2)
|
||||||
self._view:GetChild('text_allRound').text = round
|
self._view:GetChild('text_allRound').text = round
|
||||||
self._view:GetChild('text_winNum').text = win
|
self._view:GetChild('text_winNum').text = win
|
||||||
numberRecordList.numItems = #self.showRank
|
self.showRank = self.rank
|
||||||
|
self._viewList_numverRecord.numItems = #self.showRank
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
@ -369,8 +356,7 @@ function M:OnClickNumberRank(groupId, uid, round)
|
||||||
local fgCtr = ControllerManager.GetController(NewGroupController)
|
local fgCtr = ControllerManager.GetController(NewGroupController)
|
||||||
local numberRankListRead = self._viewList_numberRankRead
|
local numberRankListRead = self._viewList_numberRankRead
|
||||||
local numberRankListUnRead = self._viewList_numberRankUnRead
|
local numberRankListUnRead = self._viewList_numberRankUnRead
|
||||||
fgCtr:FG_GetGroupRecordSpe(groupId, GetPlatform(), uid, 0, 0, round, self.familyChooseTimeView:GetBeginTime(),
|
fgCtr:FG_GetGroupRecordSpe(groupId, GetPlatform(), uid, 0, 0, round, self._data_leftTime, self._data_rightTime, 3,
|
||||||
self.familyChooseTimeView:GetEndTime(), 3,
|
|
||||||
function(res)
|
function(res)
|
||||||
pt(res)
|
pt(res)
|
||||||
if res.ReturnCode ~= 0 then
|
if res.ReturnCode ~= 0 then
|
||||||
|
|
@ -402,6 +388,10 @@ function M:OnClickNumberRank(groupId, uid, round)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function M:RecursionGetNumberRecord()
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
function M:ResetRecords()
|
function M:ResetRecords()
|
||||||
self.records = {}
|
self.records = {}
|
||||||
for i = 1, 2 do
|
for i = 1, 2 do
|
||||||
|
|
|
||||||
|
|
@ -1,34 +1,25 @@
|
||||||
local FamilyRecord = {}
|
local FamilAllRank = {}
|
||||||
|
|
||||||
function FamilyRecord:TryShow(r)
|
local M = FamilAllRank
|
||||||
if not self._view then
|
|
||||||
self:Init()
|
|
||||||
root = r
|
|
||||||
end
|
|
||||||
|
|
||||||
self:Show()
|
function FamilAllRank.New(root, groupId)
|
||||||
|
local self = setmetatable({}, { __index = M })
|
||||||
|
self._father = root
|
||||||
|
self.group_id = groupId
|
||||||
|
self:init()
|
||||||
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
function FamilyRecord:Show()
|
function M:init()
|
||||||
BaseView.Show(self)
|
local root = self._father
|
||||||
|
self._lastTpe = root.familyType.selectedIndex
|
||||||
|
root.familyType.selectedIndex = 0
|
||||||
|
local com_Record = UIPackage.CreateObjectFromURL("ui://Family/com_Record")
|
||||||
|
root._view:AddChild(com_Record)
|
||||||
|
com_Record.width = root._view.width
|
||||||
|
com_Record.height = root._view.height
|
||||||
|
com_Record:Center()
|
||||||
|
self._view = com_Record
|
||||||
end
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
function FamilyRecord:Init()
|
|
||||||
setmetatable(FamilyRecord, {__index = BaseView})
|
|
||||||
|
|
||||||
self:InitView("ui://Family/com_Record")
|
|
||||||
|
|
||||||
local loader_test = self._view:GetChild("loader_test")
|
|
||||||
|
|
||||||
local btn_close = self._view:GetChild("btn_close")
|
|
||||||
|
|
||||||
btn_close.onClick:Set(function()
|
|
||||||
self:Close()
|
|
||||||
end)
|
|
||||||
|
|
||||||
ImageLoad.Load()
|
|
||||||
--self
|
|
||||||
end
|
|
||||||
|
|
||||||
return FamilyRecord
|
|
||||||
|
|
|
||||||
|
|
@ -3,16 +3,16 @@ local CreatePlayView = import('.Family.CreatePlayView')
|
||||||
local GroupGameSettingView = import(".NewGroup.MngView.GroupGameSettingView_jaingxi")
|
local GroupGameSettingView = import(".NewGroup.MngView.GroupGameSettingView_jaingxi")
|
||||||
local LobbyShopView = import(".Lobby.LobbyShopView")
|
local LobbyShopView = import(".Lobby.LobbyShopView")
|
||||||
local FamilAllRank = import(".Family.FamilAllRank")
|
local FamilAllRank = import(".Family.FamilAllRank")
|
||||||
|
local FamilyNumberRecord = import(".Family.FamilyNumberRecord")
|
||||||
|
local FamilyRecord = import(".Family.FamilyRecord")
|
||||||
|
|
||||||
---无窗口
|
---无窗口
|
||||||
local FamilyAllNumbers = import(".Family.FamilyAllNumbers")
|
local FamilyAllNumbers = import(".Family.FamilyAllNumbers")
|
||||||
local FamilyNumberRecord = import(".Family.FamilyNumberRecord")
|
|
||||||
local FamilyAuditNumber = import(".Family.FamilyAuditNumber")
|
local FamilyAuditNumber = import(".Family.FamilyAuditNumber")
|
||||||
local FamilyJoinAndCreate = import(".Family.FamilyJoinAndCreate")
|
local FamilyJoinAndCreate = import(".Family.FamilyJoinAndCreate")
|
||||||
local FamilyEventView = import(".Family.FamilyEventView")
|
local FamilyEventView = import(".Family.FamilyEventView")
|
||||||
local FamilyBanDesk = import(".Family.FamilyBanDesk")
|
local FamilyBanDesk = import(".Family.FamilyBanDesk")
|
||||||
local FamilyMyFamily = import(".Family.FamilyMyFamily")
|
local FamilyMyFamily = import(".Family.FamilyMyFamily")
|
||||||
local FamilyRecord = import(".Family.FamilyRecord")
|
|
||||||
local FamilyRoomCard = import(".Family.FamilyRoomCard")
|
local FamilyRoomCard = import(".Family.FamilyRoomCard")
|
||||||
---
|
---
|
||||||
FamilyView = {}
|
FamilyView = {}
|
||||||
|
|
@ -90,7 +90,11 @@ function M:ShareWx()
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:FamilyRecord()
|
function M:FamilyRecord()
|
||||||
FamilyRecord:TryShow(self)
|
if not self._ViewChild_Record or not self._ViewChild_Record.ShouRanks then
|
||||||
|
self._ViewChild_Record = FamilyRecord.New(self, self._group.id)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
self._ViewChild_Record:ShouRanks()
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:CreateFamily(frist)
|
function M:CreateFamily(frist)
|
||||||
|
|
@ -134,9 +138,11 @@ function M:ShowShop()
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:ShowAllRank()
|
function M:ShowAllRank()
|
||||||
if not self._ViewChild_AllRank then
|
if not self._ViewChild_AllRank or not self._ViewChild_AllRank.ShouRanks then
|
||||||
self._ViewChild_AllRank = FamilAllRank.New(self, self._group.id)
|
self._ViewChild_AllRank = FamilAllRank.New(self, self._group.id)
|
||||||
|
return
|
||||||
end
|
end
|
||||||
|
self._ViewChild_AllRank:ShouRanks()
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:MoreBtn()
|
function M:MoreBtn()
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
local debugger_reLoadFile =nil
|
local debugger_reLoadFile = nil
|
||||||
xpcall(function()
|
xpcall(function()
|
||||||
debugger_reLoadFile = require("luaideReLoadFile")
|
debugger_reLoadFile = require("luaideReLoadFile")
|
||||||
end,function()
|
end, function()
|
||||||
debugger_reLoadFile = function() print("未实现代码重载") end
|
debugger_reLoadFile = function() print("未实现代码重载") end
|
||||||
end)
|
end)
|
||||||
local debugger_stackInfo = nil
|
local debugger_stackInfo = nil
|
||||||
|
|
@ -392,6 +392,7 @@ local function createJson()
|
||||||
function json.null()
|
function json.null()
|
||||||
return json.null -- so json.null() will also return null ;-)
|
return json.null -- so json.null() will also return null ;-)
|
||||||
end
|
end
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
-- Internal, PRIVATE functions.
|
-- Internal, PRIVATE functions.
|
||||||
-- Following a Python-like convention, I have prefixed all these 'PRIVATE'
|
-- Following a Python-like convention, I have prefixed all these 'PRIVATE'
|
||||||
|
|
@ -449,8 +450,8 @@ local function createJson()
|
||||||
-- @return object, int The object (true, false or nil) and the position at which the next character should be
|
-- @return object, int The object (true, false or nil) and the position at which the next character should be
|
||||||
-- scanned.
|
-- scanned.
|
||||||
function decode_scanConstant(s, startPos)
|
function decode_scanConstant(s, startPos)
|
||||||
local consts = {["true"] = true, ["false"] = false, ["null"] = nil}
|
local consts = { ["true"] = true, ["false"] = false, ["null"] = nil }
|
||||||
local constNames = {"true", "false", "null"}
|
local constNames = { "true", "false", "null" }
|
||||||
|
|
||||||
for i, k in pairs(constNames) do
|
for i, k in pairs(constNames) do
|
||||||
if string.sub(s, startPos, startPos + string.len(k) - 1) == k then
|
if string.sub(s, startPos, startPos + string.len(k) - 1) == k then
|
||||||
|
|
@ -776,17 +777,17 @@ function print(...)
|
||||||
end
|
end
|
||||||
if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then
|
if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then
|
||||||
if (debug_server) then
|
if (debug_server) then
|
||||||
local arg = {...} --这里的...和{}符号中间需要有空格号,否则会出错
|
local arg = { ... } --这里的...和{}符号中间需要有空格号,否则会出错
|
||||||
local str = ""
|
local str = ""
|
||||||
if (#arg == 0) then
|
if (#arg == 0) then
|
||||||
arg = {"nil"}
|
arg = { "nil" }
|
||||||
end
|
end
|
||||||
for k, v in pairs(arg) do
|
for k, v in pairs(arg) do
|
||||||
str = str .. tostring(v) .. "\t"
|
str = str .. tostring(v) .. "\t"
|
||||||
end
|
end
|
||||||
local sendMsg = {
|
local sendMsg = {
|
||||||
event = LuaDebugger.event.C2S_LuaPrint,
|
event = LuaDebugger.event.C2S_LuaPrint,
|
||||||
data = {msg = ZZBase64.encode(str), type = 1}
|
data = { msg = ZZBase64.encode(str), type = 1 }
|
||||||
}
|
}
|
||||||
local sendStr = json.encode(sendMsg)
|
local sendStr = json.encode(sendMsg)
|
||||||
debug_server:send(sendStr .. "__debugger_k0204__")
|
debug_server:send(sendStr .. "__debugger_k0204__")
|
||||||
|
|
@ -800,46 +801,48 @@ function luaIdePrintWarn(...)
|
||||||
end
|
end
|
||||||
if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then
|
if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then
|
||||||
if (debug_server) then
|
if (debug_server) then
|
||||||
local arg = {...} --这里的...和{}符号中间需要有空格号,否则会出错
|
local arg = { ... } --这里的...和{}符号中间需要有空格号,否则会出错
|
||||||
local str = ""
|
local str = ""
|
||||||
if (#arg == 0) then
|
if (#arg == 0) then
|
||||||
arg = {"nil"}
|
arg = { "nil" }
|
||||||
end
|
end
|
||||||
for k, v in pairs(arg) do
|
for k, v in pairs(arg) do
|
||||||
str = str .. tostring(v) .. "\t"
|
str = str .. tostring(v) .. "\t"
|
||||||
end
|
end
|
||||||
local sendMsg = {
|
local sendMsg = {
|
||||||
event = LuaDebugger.event.C2S_LuaPrint,
|
event = LuaDebugger.event.C2S_LuaPrint,
|
||||||
data = {msg = ZZBase64.encode(str), type = 2}
|
data = { msg = ZZBase64.encode(str), type = 2 }
|
||||||
}
|
}
|
||||||
local sendStr = json.encode(sendMsg)
|
local sendStr = json.encode(sendMsg)
|
||||||
debug_server:send(sendStr .. "__debugger_k0204__")
|
debug_server:send(sendStr .. "__debugger_k0204__")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function luaIdePrintErr(...)
|
function luaIdePrintErr(...)
|
||||||
if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 3) then
|
if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 3) then
|
||||||
debugger_print(...)
|
debugger_print(...)
|
||||||
end
|
end
|
||||||
if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then
|
if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then
|
||||||
if (debug_server) then
|
if (debug_server) then
|
||||||
local arg = {...} --这里的...和{}符号中间需要有空格号,否则会出错
|
local arg = { ... } --这里的...和{}符号中间需要有空格号,否则会出错
|
||||||
local str = ""
|
local str = ""
|
||||||
if (#arg == 0) then
|
if (#arg == 0) then
|
||||||
arg = {"nil"}
|
arg = { "nil" }
|
||||||
end
|
end
|
||||||
for k, v in pairs(arg) do
|
for k, v in pairs(arg) do
|
||||||
str = str .. tostring(v) .. "\t"
|
str = str .. tostring(v) .. "\t"
|
||||||
end
|
end
|
||||||
local sendMsg = {
|
local sendMsg = {
|
||||||
event = LuaDebugger.event.C2S_LuaPrint,
|
event = LuaDebugger.event.C2S_LuaPrint,
|
||||||
data = {msg = ZZBase64.encode(str), type = 3}
|
data = { msg = ZZBase64.encode(str), type = 3 }
|
||||||
}
|
}
|
||||||
local sendStr = json.encode(sendMsg)
|
local sendStr = json.encode(sendMsg)
|
||||||
debug_server:send(sendStr .. "__debugger_k0204__")
|
debug_server:send(sendStr .. "__debugger_k0204__")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--@endregion
|
--@endregion
|
||||||
|
|
||||||
--@region 辅助方法
|
--@region 辅助方法
|
||||||
|
|
@ -1035,9 +1038,7 @@ local function debugger_valueToString(v)
|
||||||
local vstr = nil
|
local vstr = nil
|
||||||
if (vtype == "userdata") then
|
if (vtype == "userdata") then
|
||||||
if (LuaDebugger.isFoxGloryProject) then
|
if (LuaDebugger.isFoxGloryProject) then
|
||||||
|
return "userdata", vtype
|
||||||
return "userdata",vtype
|
|
||||||
|
|
||||||
else
|
else
|
||||||
return tostring(v), vtype
|
return tostring(v), vtype
|
||||||
end
|
end
|
||||||
|
|
@ -1045,11 +1046,11 @@ local function debugger_valueToString(v)
|
||||||
local value = vtype
|
local value = vtype
|
||||||
xpcall(function()
|
xpcall(function()
|
||||||
value = tostring(v)
|
value = tostring(v)
|
||||||
end,function()
|
end, function()
|
||||||
value = vtype
|
value = vtype
|
||||||
end)
|
end)
|
||||||
return value, vtype
|
return value, vtype
|
||||||
elseif (vtype == "number" or vtype == "string" ) then
|
elseif (vtype == "number" or vtype == "string") then
|
||||||
return v, vtype
|
return v, vtype
|
||||||
else
|
else
|
||||||
return tostring(v), vtype
|
return tostring(v), vtype
|
||||||
|
|
@ -1057,12 +1058,12 @@ local function debugger_valueToString(v)
|
||||||
end
|
end
|
||||||
local function debugger_setVarInfo(name, value)
|
local function debugger_setVarInfo(name, value)
|
||||||
local valueStr, valueType = debugger_valueToString(value)
|
local valueStr, valueType = debugger_valueToString(value)
|
||||||
local nameStr,nameType = debugger_valueToString(name)
|
local nameStr, nameType = debugger_valueToString(name)
|
||||||
if(valueStr == nil) then
|
if (valueStr == nil) then
|
||||||
valueStr = valueType
|
valueStr = valueType
|
||||||
end
|
end
|
||||||
local valueInfo = {
|
local valueInfo = {
|
||||||
name =nameStr,
|
name = nameStr,
|
||||||
valueType = valueType,
|
valueType = valueType,
|
||||||
valueStr = ZZBase64.encode(valueStr)
|
valueStr = ZZBase64.encode(valueStr)
|
||||||
}
|
}
|
||||||
|
|
@ -1100,7 +1101,7 @@ local function debugger_getvalue(f)
|
||||||
i = i + 1
|
i = i + 1
|
||||||
end
|
end
|
||||||
|
|
||||||
return {locals = locals, ups = ups}
|
return { locals = locals, ups = ups }
|
||||||
end
|
end
|
||||||
--获取堆栈
|
--获取堆栈
|
||||||
debugger_stackInfo =
|
debugger_stackInfo =
|
||||||
|
|
@ -1146,7 +1147,7 @@ debugger_stackInfo =
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local stackInfo = {stack = stack, vars = varInfos, funcs = funcs}
|
local stackInfo = { stack = stack, vars = varInfos, funcs = funcs }
|
||||||
local data = {
|
local data = {
|
||||||
stack = stackInfo.stack,
|
stack = stackInfo.stack,
|
||||||
vars = stackInfo.vars,
|
vars = stackInfo.vars,
|
||||||
|
|
@ -1157,7 +1158,7 @@ debugger_stackInfo =
|
||||||
}
|
}
|
||||||
LuaDebugger.currentTempFunc = data.funcs[1]
|
LuaDebugger.currentTempFunc = data.funcs[1]
|
||||||
return data
|
return data
|
||||||
end
|
end
|
||||||
|
|
||||||
--===========================点断信息==================================================
|
--===========================点断信息==================================================
|
||||||
--根据不同的游戏引擎进行定时获取断点信息
|
--根据不同的游戏引擎进行定时获取断点信息
|
||||||
|
|
@ -1172,7 +1173,7 @@ local function debugger_receiveDebugBreakInfo()
|
||||||
end
|
end
|
||||||
if (breakInfoSocket) then
|
if (breakInfoSocket) then
|
||||||
local msg, status = breakInfoSocket:receive()
|
local msg, status = breakInfoSocket:receive()
|
||||||
if(LuaDebugger.isLaunch and status == "closed") then
|
if (LuaDebugger.isLaunch and status == "closed") then
|
||||||
os.exit()
|
os.exit()
|
||||||
end
|
end
|
||||||
if (msg) then
|
if (msg) then
|
||||||
|
|
@ -1182,12 +1183,12 @@ local function debugger_receiveDebugBreakInfo()
|
||||||
elseif netData.event == LuaDebugger.event.S2C_LoadLuaScript then
|
elseif netData.event == LuaDebugger.event.S2C_LoadLuaScript then
|
||||||
LuaDebugger.loadScriptBody = netData.data
|
LuaDebugger.loadScriptBody = netData.data
|
||||||
debugger_exeLuaString()
|
debugger_exeLuaString()
|
||||||
debugger_sendMsg(breakInfoSocket,LuaDebugger.event.C2S_LoadLuaScript,LuaDebugger.loadScriptBody)
|
debugger_sendMsg(breakInfoSocket, LuaDebugger.event.C2S_LoadLuaScript, LuaDebugger.loadScriptBody)
|
||||||
elseif netData.event == LuaDebugger.event.S2C_ReLoadFile then
|
elseif netData.event == LuaDebugger.event.S2C_ReLoadFile then
|
||||||
LuaDebugger.reLoadFileBody = netData.data
|
LuaDebugger.reLoadFileBody = netData.data
|
||||||
LuaDebugger.isReLoadFile = false
|
LuaDebugger.isReLoadFile = false
|
||||||
LuaDebugger.reLoadFileBody.isReLoad = debugger_reLoadFile(LuaDebugger.reLoadFileBody)
|
LuaDebugger.reLoadFileBody.isReLoad = debugger_reLoadFile(LuaDebugger.reLoadFileBody)
|
||||||
print("重载结果:",LuaDebugger.reLoadFileBody.isReLoad)
|
print("重载结果:", LuaDebugger.reLoadFileBody.isReLoad)
|
||||||
LuaDebugger.reLoadFileBody.script = nil
|
LuaDebugger.reLoadFileBody.script = nil
|
||||||
debugger_sendMsg(
|
debugger_sendMsg(
|
||||||
breakInfoSocket,
|
breakInfoSocket,
|
||||||
|
|
@ -1290,7 +1291,7 @@ debugger_setBreak =
|
||||||
end
|
end
|
||||||
LuaDebugger.isHook = false
|
LuaDebugger.isHook = false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local function debugger_checkFileIsBreak(fileName)
|
local function debugger_checkFileIsBreak(fileName)
|
||||||
return LuaDebugger.breakInfos[fileName]
|
return LuaDebugger.breakInfos[fileName]
|
||||||
end
|
end
|
||||||
|
|
@ -1322,7 +1323,7 @@ function debugger_conditionStr(condition, vars, callBack)
|
||||||
currentTabble[k] = v
|
currentTabble[k] = v
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
setmetatable(currentTabble, {__index = _G})
|
setmetatable(currentTabble, { __index = _G })
|
||||||
local fun = loadstring("return " .. condition)
|
local fun = loadstring("return " .. condition)
|
||||||
setfenv(fun, currentTabble)
|
setfenv(fun, currentTabble)
|
||||||
return fun()
|
return fun()
|
||||||
|
|
@ -1339,14 +1340,13 @@ function debugger_conditionStr(condition, vars, callBack)
|
||||||
callBack()
|
callBack()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--执行lua字符串
|
--执行lua字符串
|
||||||
debugger_exeLuaString = function()
|
debugger_exeLuaString = function()
|
||||||
|
|
||||||
local function loadScript()
|
local function loadScript()
|
||||||
|
|
||||||
local script = LuaDebugger.loadScriptBody.script
|
local script = LuaDebugger.loadScriptBody.script
|
||||||
if (LuaDebugger.loadScriptBody.isBreak) then
|
if (LuaDebugger.loadScriptBody.isBreak) then
|
||||||
local currentTabble = {_G = _G}
|
local currentTabble = { _G = _G }
|
||||||
local frameId = LuaDebugger.loadScriptBody.frameId
|
local frameId = LuaDebugger.loadScriptBody.frameId
|
||||||
frameId = frameId
|
frameId = frameId
|
||||||
local func = LuaDebugger.currentDebuggerData.funcs[frameId]
|
local func = LuaDebugger.currentDebuggerData.funcs[frameId]
|
||||||
|
|
@ -1359,7 +1359,7 @@ debugger_exeLuaString = function()
|
||||||
for k, v in pairs(locals) do
|
for k, v in pairs(locals) do
|
||||||
currentTabble[k] = v
|
currentTabble[k] = v
|
||||||
end
|
end
|
||||||
setmetatable(currentTabble, {__index = _G})
|
setmetatable(currentTabble, { __index = _G })
|
||||||
|
|
||||||
local fun = loadstring(script)
|
local fun = loadstring(script)
|
||||||
setfenv(fun, currentTabble)
|
setfenv(fun, currentTabble)
|
||||||
|
|
@ -1374,50 +1374,47 @@ debugger_exeLuaString = function()
|
||||||
xpcall(
|
xpcall(
|
||||||
loadScript,
|
loadScript,
|
||||||
function(error)
|
function(error)
|
||||||
|
|
||||||
-- debugger_sendMsg(debug_server, LuaDebugger.event.C2S_LoadLuaScript, LuaDebugger.loadScriptBody)
|
-- debugger_sendMsg(debug_server, LuaDebugger.event.C2S_LoadLuaScript, LuaDebugger.loadScriptBody)
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
LuaDebugger.loadScriptBody.script = nil
|
LuaDebugger.loadScriptBody.script = nil
|
||||||
if (LuaDebugger.loadScriptBody.isBreak) then
|
if (LuaDebugger.loadScriptBody.isBreak) then
|
||||||
LuaDebugger.serVarLevel = LuaDebugger.serVarLevel+1
|
LuaDebugger.serVarLevel = LuaDebugger.serVarLevel + 1
|
||||||
LuaDebugger.currentDebuggerData = debugger_stackInfo(LuaDebugger.serVarLevel, LuaDebugger.event.C2S_HITBreakPoint)
|
LuaDebugger.currentDebuggerData = debugger_stackInfo(LuaDebugger.serVarLevel, LuaDebugger.event
|
||||||
|
.C2S_HITBreakPoint)
|
||||||
LuaDebugger.loadScriptBody.stack = LuaDebugger.currentDebuggerData.stack
|
LuaDebugger.loadScriptBody.stack = LuaDebugger.currentDebuggerData.stack
|
||||||
end
|
end
|
||||||
LuaDebugger.loadScriptBody.complete = true
|
LuaDebugger.loadScriptBody.complete = true
|
||||||
|
|
||||||
end
|
end
|
||||||
--@region 调试中修改变量值
|
--@region 调试中修改变量值
|
||||||
|
|
||||||
|
|
||||||
--根据key 值在 value 查找
|
--根据key 值在 value 查找
|
||||||
local function debugger_getTablekey(key,keyType,value)
|
local function debugger_getTablekey(key, keyType, value)
|
||||||
if(keyType == -1) then
|
if (keyType == -1) then
|
||||||
return key
|
return key
|
||||||
elseif(keyType == 1) then
|
elseif (keyType == 1) then
|
||||||
return tonumber(key)
|
return tonumber(key)
|
||||||
elseif(keyType == 2) then
|
elseif (keyType == 2) then
|
||||||
local valueKey = nil
|
local valueKey = nil
|
||||||
for k,v in pairs(value) do
|
for k, v in pairs(value) do
|
||||||
local nameType = type(k)
|
local nameType = type(k)
|
||||||
if(nameType == "userdata" or nameType == "table") then
|
if (nameType == "userdata" or nameType == "table") then
|
||||||
if (not LuaDebugger.isFoxGloryProject) then
|
if (not LuaDebugger.isFoxGloryProject) then
|
||||||
valueKey = tostring(k)
|
valueKey = tostring(k)
|
||||||
if(key == valueKey) then
|
if (key == valueKey) then
|
||||||
return k
|
return k
|
||||||
end
|
end
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function debugger_setVarValue(server, data)
|
local function debugger_setVarValue(server, data)
|
||||||
|
|
||||||
local newValue = nil
|
local newValue = nil
|
||||||
local level = LuaDebugger.serVarLevel+LuaDebugger.setVarBody.frameId
|
local level = LuaDebugger.serVarLevel + LuaDebugger.setVarBody.frameId
|
||||||
local firstKeyName = data.keys[1]
|
local firstKeyName = data.keys[1]
|
||||||
--@region vars check
|
--@region vars check
|
||||||
local localValueChangeIndex = -1
|
local localValueChangeIndex = -1
|
||||||
|
|
@ -1432,7 +1429,7 @@ local function debugger_setVarValue(server, data)
|
||||||
if not name then
|
if not name then
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
if(firstKeyName == name) then
|
if (firstKeyName == name) then
|
||||||
localValueChangeIndex = i
|
localValueChangeIndex = i
|
||||||
oldValue = value
|
oldValue = value
|
||||||
end
|
end
|
||||||
|
|
@ -1450,7 +1447,7 @@ local function debugger_setVarValue(server, data)
|
||||||
if not name then
|
if not name then
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
if(localValueChangeIndex == -1 and firstKeyName == name) then
|
if (localValueChangeIndex == -1 and firstKeyName == name) then
|
||||||
upValueFun = func
|
upValueFun = func
|
||||||
oldValue = value
|
oldValue = value
|
||||||
upValueChangeIndex = i
|
upValueChangeIndex = i
|
||||||
|
|
@ -1462,8 +1459,8 @@ local function debugger_setVarValue(server, data)
|
||||||
end
|
end
|
||||||
i = i + 1
|
i = i + 1
|
||||||
end
|
end
|
||||||
--@endregion
|
--@endregion
|
||||||
local vars = {locals = locals, ups = ups}
|
local vars = { locals = locals, ups = ups }
|
||||||
|
|
||||||
local function loadScript()
|
local function loadScript()
|
||||||
local currentTabble = {}
|
local currentTabble = {}
|
||||||
|
|
@ -1480,7 +1477,7 @@ local function debugger_setVarValue(server, data)
|
||||||
currentTabble[k] = v
|
currentTabble[k] = v
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
setmetatable(currentTabble, {__index = _G})
|
setmetatable(currentTabble, { __index = _G })
|
||||||
local fun = loadstring("return " .. data.value)
|
local fun = loadstring("return " .. data.value)
|
||||||
setfenv(fun, currentTabble)
|
setfenv(fun, currentTabble)
|
||||||
newValue = fun()
|
newValue = fun()
|
||||||
|
|
@ -1499,39 +1496,37 @@ local function debugger_setVarValue(server, data)
|
||||||
-- local 查找并替换
|
-- local 查找并替换
|
||||||
local keyLength = #data.keys
|
local keyLength = #data.keys
|
||||||
|
|
||||||
if(keyLength == 1) then
|
if (keyLength == 1) then
|
||||||
if(localValueChangeIndex ~= -1) then
|
if (localValueChangeIndex ~= -1) then
|
||||||
|
|
||||||
debug.setlocal(level, localValueChangeIndex, newValue)
|
debug.setlocal(level, localValueChangeIndex, newValue)
|
||||||
elseif(upValueFun ~= nil) then
|
elseif (upValueFun ~= nil) then
|
||||||
debug.setupvalue( upValueFun, upValueChangeIndex, newValue )
|
debug.setupvalue(upValueFun, upValueChangeIndex, newValue)
|
||||||
else
|
else
|
||||||
--全局变量查找
|
--全局变量查找
|
||||||
if(_G[firstKeyName]) then
|
if (_G[firstKeyName]) then
|
||||||
_G[firstKeyName] = newValue
|
_G[firstKeyName] = newValue
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if(not oldValue) then
|
if (not oldValue) then
|
||||||
if(_G[firstKeyName]) then
|
if (_G[firstKeyName]) then
|
||||||
oldValue = _G[firstKeyName]
|
oldValue = _G[firstKeyName]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local tempValue = oldValue
|
local tempValue = oldValue
|
||||||
for i=2,keyLength-1 do
|
for i = 2, keyLength - 1 do
|
||||||
if(tempValue) then
|
if (tempValue) then
|
||||||
oldValue = oldValue[debugger_getTablekey(data.keys[i],data.numberTypes[i],oldValue)]
|
oldValue = oldValue[debugger_getTablekey(data.keys[i], data.numberTypes[i], oldValue)]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if(tempValue) then
|
if (tempValue) then
|
||||||
oldValue[debugger_getTablekey(data.keys[keyLength],data.numberTypes[keyLength],oldValue)] = newValue
|
oldValue[debugger_getTablekey(data.keys[keyLength], data.numberTypes[keyLength], oldValue)] = newValue
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local varInfo = debugger_setVarInfo(data.varName, newValue)
|
local varInfo = debugger_setVarInfo(data.varName, newValue)
|
||||||
data.varInfo = varInfo
|
data.varInfo = varInfo
|
||||||
LuaDebugger.serVarLevel = LuaDebugger.serVarLevel+1
|
LuaDebugger.serVarLevel = LuaDebugger.serVarLevel + 1
|
||||||
LuaDebugger.currentDebuggerData = debugger_stackInfo(LuaDebugger.serVarLevel, LuaDebugger.event.C2S_HITBreakPoint)
|
LuaDebugger.currentDebuggerData = debugger_stackInfo(LuaDebugger.serVarLevel, LuaDebugger.event.C2S_HITBreakPoint)
|
||||||
|
|
||||||
end
|
end
|
||||||
--@endregion
|
--@endregion
|
||||||
|
|
||||||
|
|
@ -1543,8 +1538,8 @@ checkSetVar =
|
||||||
function()
|
function()
|
||||||
if (LuaDebugger.isSetVar) then
|
if (LuaDebugger.isSetVar) then
|
||||||
LuaDebugger.isSetVar = false
|
LuaDebugger.isSetVar = false
|
||||||
debugger_setVarValue(debug_server,LuaDebugger.setVarBody)
|
debugger_setVarValue(debug_server, LuaDebugger.setVarBody)
|
||||||
LuaDebugger.serVarLevel = LuaDebugger.serVarLevel+1
|
LuaDebugger.serVarLevel = LuaDebugger.serVarLevel + 1
|
||||||
_resume(coro_debugger, LuaDebugger.setVarBody)
|
_resume(coro_debugger, LuaDebugger.setVarBody)
|
||||||
xpcall(
|
xpcall(
|
||||||
checkSetVar,
|
checkSetVar,
|
||||||
|
|
@ -1552,10 +1547,10 @@ checkSetVar =
|
||||||
print("设置变量", error)
|
print("设置变量", error)
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
elseif(LuaDebugger.isLoadLuaScript) then
|
elseif (LuaDebugger.isLoadLuaScript) then
|
||||||
LuaDebugger.isLoadLuaScript = false
|
LuaDebugger.isLoadLuaScript = false
|
||||||
debugger_exeLuaString()
|
debugger_exeLuaString()
|
||||||
LuaDebugger.serVarLevel = LuaDebugger.serVarLevel+1
|
LuaDebugger.serVarLevel = LuaDebugger.serVarLevel + 1
|
||||||
_resume(coro_debugger, LuaDebugger.reLoadFileBody)
|
_resume(coro_debugger, LuaDebugger.reLoadFileBody)
|
||||||
xpcall(
|
xpcall(
|
||||||
checkSetVar,
|
checkSetVar,
|
||||||
|
|
@ -1563,12 +1558,12 @@ checkSetVar =
|
||||||
print("执行代码", error)
|
print("执行代码", error)
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
elseif(LuaDebugger.isReLoadFile) then
|
elseif (LuaDebugger.isReLoadFile) then
|
||||||
LuaDebugger.isReLoadFile = false
|
LuaDebugger.isReLoadFile = false
|
||||||
LuaDebugger.reLoadFileBody.isReLoad = debugger_reLoadFile(LuaDebugger.reLoadFileBody)
|
LuaDebugger.reLoadFileBody.isReLoad = debugger_reLoadFile(LuaDebugger.reLoadFileBody)
|
||||||
print("重载结果:",LuaDebugger.reLoadFileBody.isReLoad)
|
print("重载结果:", LuaDebugger.reLoadFileBody.isReLoad)
|
||||||
LuaDebugger.reLoadFileBody.script = nil
|
LuaDebugger.reLoadFileBody.script = nil
|
||||||
LuaDebugger.serVarLevel = LuaDebugger.serVarLevel+1
|
LuaDebugger.serVarLevel = LuaDebugger.serVarLevel + 1
|
||||||
_resume(coro_debugger, LuaDebugger.reLoadFileBody)
|
_resume(coro_debugger, LuaDebugger.reLoadFileBody)
|
||||||
xpcall(
|
xpcall(
|
||||||
checkSetVar,
|
checkSetVar,
|
||||||
|
|
@ -1577,7 +1572,7 @@ checkSetVar =
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1894,7 +1889,6 @@ local function debugger_sendTableValues(value, server, variablesReference, debug
|
||||||
vinfos = {}
|
vinfos = {}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
m = getmetatable(value)
|
m = getmetatable(value)
|
||||||
|
|
@ -1944,7 +1938,6 @@ local function debugger_getBreakVar(body, server)
|
||||||
if (value) then
|
if (value) then
|
||||||
local valueType = type(value)
|
local valueType = type(value)
|
||||||
if (valueType == "table" or valueType == "userdata") then
|
if (valueType == "table" or valueType == "userdata") then
|
||||||
|
|
||||||
debugger_sendTableValues(value, server, variablesReference, debugSpeedIndex)
|
debugger_sendTableValues(value, server, variablesReference, debugSpeedIndex)
|
||||||
else
|
else
|
||||||
if (valueType == "function") then
|
if (valueType == "function") then
|
||||||
|
|
@ -2018,7 +2011,7 @@ local function debugger_loop(server)
|
||||||
while true do
|
while true do
|
||||||
local line, status = server:receive()
|
local line, status = server:receive()
|
||||||
if (status == "closed") then
|
if (status == "closed") then
|
||||||
if(LuaDebugger.isLaunch) then
|
if (LuaDebugger.isLaunch) then
|
||||||
os.exit()
|
os.exit()
|
||||||
else
|
else
|
||||||
debug.sethook()
|
debug.sethook()
|
||||||
|
|
@ -2030,13 +2023,12 @@ local function debugger_loop(server)
|
||||||
local event = netData.event
|
local event = netData.event
|
||||||
local body = netData.data
|
local body = netData.data
|
||||||
if (event == LuaDebugger.event.S2C_DebugClose) then
|
if (event == LuaDebugger.event.S2C_DebugClose) then
|
||||||
if(LuaDebugger.isLaunch) then
|
if (LuaDebugger.isLaunch) then
|
||||||
os.exit()
|
os.exit()
|
||||||
else
|
else
|
||||||
debug.sethook()
|
debug.sethook()
|
||||||
coroutine.yield()
|
coroutine.yield()
|
||||||
end
|
end
|
||||||
|
|
||||||
elseif event == LuaDebugger.event.S2C_SetBreakPoints then
|
elseif event == LuaDebugger.event.S2C_SetBreakPoints then
|
||||||
--设置断点信息
|
--设置断点信息
|
||||||
local function setB()
|
local function setB()
|
||||||
|
|
@ -2156,29 +2148,26 @@ local function debugger_loop(server)
|
||||||
end
|
end
|
||||||
coro_debugger = coroutine.create(debugger_loop)
|
coro_debugger = coroutine.create(debugger_loop)
|
||||||
debug_hook = function(event, line)
|
debug_hook = function(event, line)
|
||||||
|
if (not LuaDebugger.isHook) then
|
||||||
if(not LuaDebugger.isHook) then
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if(LuaDebugger.Run) then
|
if (LuaDebugger.Run) then
|
||||||
if(event == "line") then
|
if (event == "line") then
|
||||||
local isCheck = false
|
local isCheck = false
|
||||||
for k, breakInfo in pairs(LuaDebugger.breakInfos) do
|
for k, breakInfo in pairs(LuaDebugger.breakInfos) do
|
||||||
|
|
||||||
for bk, linesInfo in pairs(breakInfo) do
|
for bk, linesInfo in pairs(breakInfo) do
|
||||||
|
if (linesInfo.lines and linesInfo.lines[line]) then
|
||||||
if(linesInfo.lines and linesInfo.lines[line]) then
|
|
||||||
isCheck = true
|
isCheck = true
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if(isCheck) then
|
if (isCheck) then
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if(not isCheck) then
|
if (not isCheck) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|
@ -2259,7 +2248,6 @@ debug_hook = function(event, line)
|
||||||
local breakInfo = LuaDebugger.breakInfos[file]
|
local breakInfo = LuaDebugger.breakInfos[file]
|
||||||
local breakData = nil
|
local breakData = nil
|
||||||
if (breakInfo) then
|
if (breakInfo) then
|
||||||
|
|
||||||
local ischeck = false
|
local ischeck = false
|
||||||
for k, lineInfo in pairs(breakInfo) do
|
for k, lineInfo in pairs(breakInfo) do
|
||||||
local lines = lineInfo.lines
|
local lines = lineInfo.lines
|
||||||
|
|
@ -2299,13 +2287,13 @@ debug_hook = function(event, line)
|
||||||
end
|
end
|
||||||
pathNamesCount = pathNamesCount - 1
|
pathNamesCount = pathNamesCount - 1
|
||||||
hitPathNamesCount = hitPathNamesCount - 1
|
hitPathNamesCount = hitPathNamesCount - 1
|
||||||
checkCount = checkCount+1
|
checkCount = checkCount + 1
|
||||||
|
|
||||||
if (pathNamesCount <= 0 or hitPathNamesCount <= 0) then
|
if (pathNamesCount <= 0 or hitPathNamesCount <= 0) then
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if(checkCount>0) then
|
if (checkCount > 0) then
|
||||||
break;
|
break;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|
@ -2384,7 +2372,7 @@ end
|
||||||
local function debugger_xpcall()
|
local function debugger_xpcall()
|
||||||
--调用 coro_debugger 并传入 参数
|
--调用 coro_debugger 并传入 参数
|
||||||
local data = debugger_stackInfo(4, LuaDebugger.event.C2S_HITBreakPoint)
|
local data = debugger_stackInfo(4, LuaDebugger.event.C2S_HITBreakPoint)
|
||||||
if(data.stack and data.stack[1]) then
|
if (data.stack and data.stack[1]) then
|
||||||
data.stack[1].isXpCall = true
|
data.stack[1].isXpCall = true
|
||||||
end
|
end
|
||||||
--挂起等待调试器作出反应
|
--挂起等待调试器作出反应
|
||||||
|
|
@ -2478,8 +2466,8 @@ ZZBase64.__code = {
|
||||||
'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/',
|
'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/',
|
||||||
};
|
};
|
||||||
ZZBase64.__decode = {}
|
ZZBase64.__decode = {}
|
||||||
for k,v in pairs(ZZBase64.__code) do
|
for k, v in pairs(ZZBase64.__code) do
|
||||||
ZZBase64.__decode[string.byte(v,1)] = k - 1
|
ZZBase64.__decode[string.byte(v, 1)] = k - 1
|
||||||
end
|
end
|
||||||
|
|
||||||
function ZZBase64.encode(text)
|
function ZZBase64.encode(text)
|
||||||
|
|
@ -2489,14 +2477,14 @@ function ZZBase64.encode(text)
|
||||||
local res = {}
|
local res = {}
|
||||||
local index = 1
|
local index = 1
|
||||||
for i = 1, len, 3 do
|
for i = 1, len, 3 do
|
||||||
local a = string.byte(text, i )
|
local a = string.byte(text, i)
|
||||||
local b = string.byte(text, i + 1)
|
local b = string.byte(text, i + 1)
|
||||||
local c = string.byte(text, i + 2)
|
local c = string.byte(text, i + 2)
|
||||||
-- num = a<<16 + b<<8 + c
|
-- num = a<<16 + b<<8 + c
|
||||||
local num = a * 65536 + b * 256 + c
|
local num = a * 65536 + b * 256 + c
|
||||||
for j = 1, 4 do
|
for j = 1, 4 do
|
||||||
--tmp = num >> ((4 -j) * 6)
|
--tmp = num >> ((4 -j) * 6)
|
||||||
local tmp = math.floor(num / (2 ^ ((4-j) * 6)))
|
local tmp = math.floor(num / (2 ^ ((4 - j) * 6)))
|
||||||
--curPos = tmp&0x3f
|
--curPos = tmp&0x3f
|
||||||
local curPos = tmp % 64 + 1
|
local curPos = tmp % 64 + 1
|
||||||
res[index] = ZZBase64.__code[curPos]
|
res[index] = ZZBase64.__code[curPos]
|
||||||
|
|
@ -2533,13 +2521,13 @@ function ZZBase64.__left2(res, index, text, len)
|
||||||
res[index + 3] = "="
|
res[index + 3] = "="
|
||||||
end
|
end
|
||||||
|
|
||||||
function ZZBase64.__left1(res, index,text, len)
|
function ZZBase64.__left1(res, index, text, len)
|
||||||
local num = string.byte(text, len + 1)
|
local num = string.byte(text, len + 1)
|
||||||
num = num * 16
|
num = num * 16
|
||||||
|
|
||||||
local tmp = math.floor(num / 64)
|
local tmp = math.floor(num / 64)
|
||||||
local curPos = tmp % 64 + 1
|
local curPos = tmp % 64 + 1
|
||||||
res[index ] = ZZBase64.__code[curPos]
|
res[index] = ZZBase64.__code[curPos]
|
||||||
|
|
||||||
curPos = num % 64 + 1
|
curPos = num % 64 + 1
|
||||||
res[index + 1] = ZZBase64.__code[curPos]
|
res[index + 1] = ZZBase64.__code[curPos]
|
||||||
|
|
@ -2562,11 +2550,11 @@ function ZZBase64.decode(text)
|
||||||
local res = {}
|
local res = {}
|
||||||
local index = 1
|
local index = 1
|
||||||
local decode = ZZBase64.__decode
|
local decode = ZZBase64.__decode
|
||||||
for i =1, len, 4 do
|
for i = 1, len, 4 do
|
||||||
local a = decode[string.byte(text,i )]
|
local a = decode[string.byte(text, i)]
|
||||||
local b = decode[string.byte(text,i + 1)]
|
local b = decode[string.byte(text, i + 1)]
|
||||||
local c = decode[string.byte(text,i + 2)]
|
local c = decode[string.byte(text, i + 2)]
|
||||||
local d = decode[string.byte(text,i + 3)]
|
local d = decode[string.byte(text, i + 3)]
|
||||||
|
|
||||||
--num = a<<18 + b<<12 + c<<6 + d
|
--num = a<<18 + b<<12 + c<<6 + d
|
||||||
local num = a * 262144 + b * 4096 + c * 64 + d
|
local num = a * 262144 + b * 4096 + c * 64 + d
|
||||||
|
|
@ -2575,7 +2563,7 @@ function ZZBase64.decode(text)
|
||||||
num = math.floor(num / 256)
|
num = math.floor(num / 256)
|
||||||
local f = string.char(num % 256)
|
local f = string.char(num % 256)
|
||||||
num = math.floor(num / 256)
|
num = math.floor(num / 256)
|
||||||
res[index ] = string.char(num % 256)
|
res[index] = string.char(num % 256)
|
||||||
res[index + 1] = f
|
res[index + 1] = f
|
||||||
res[index + 2] = e
|
res[index + 2] = e
|
||||||
index = index + 3
|
index = index + 3
|
||||||
|
|
@ -2611,7 +2599,4 @@ function ZZBase64.__decodeLeft2(res, index, text, len)
|
||||||
res[index] = string.char(num)
|
res[index] = string.char(num)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return StartDebug
|
return StartDebug
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
local debugger_reLoadFile =nil
|
local debugger_reLoadFile = nil
|
||||||
xpcall(function()
|
xpcall(function()
|
||||||
debugger_reLoadFile = require("luaideReLoadFile")
|
debugger_reLoadFile = require("luaideReLoadFile")
|
||||||
end,function()
|
end, function()
|
||||||
debugger_reLoadFile = function() print("未实现代码重载") end
|
debugger_reLoadFile = function() print("未实现代码重载") end
|
||||||
end)
|
end)
|
||||||
local sethook = debug.sethook
|
local sethook = debug.sethook
|
||||||
|
|
@ -13,9 +13,9 @@ local checkSetVar = nil
|
||||||
local loadstring_ = nil
|
local loadstring_ = nil
|
||||||
local debugger_sendMsg = nil
|
local debugger_sendMsg = nil
|
||||||
if (loadstring) then
|
if (loadstring) then
|
||||||
loadstring_ = loadstring
|
loadstring_ = loadstring
|
||||||
else
|
else
|
||||||
loadstring_ = load
|
loadstring_ = load
|
||||||
end
|
end
|
||||||
local ZZBase64 = {}
|
local ZZBase64 = {}
|
||||||
local LuaDebugTool_ = nil
|
local LuaDebugTool_ = nil
|
||||||
|
|
@ -366,6 +366,7 @@ local function createJson()
|
||||||
function json.null()
|
function json.null()
|
||||||
return json.null -- so json.null() will also return null ;-)
|
return json.null -- so json.null() will also return null ;-)
|
||||||
end
|
end
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
-- Internal, PRIVATE functions.
|
-- Internal, PRIVATE functions.
|
||||||
-- Following a Python-like convention, I have prefixed all these 'PRIVATE'
|
-- Following a Python-like convention, I have prefixed all these 'PRIVATE'
|
||||||
|
|
@ -423,8 +424,8 @@ local function createJson()
|
||||||
-- @return object, int The object (true, false or nil) and the position at which the next character should be
|
-- @return object, int The object (true, false or nil) and the position at which the next character should be
|
||||||
-- scanned.
|
-- scanned.
|
||||||
function decode_scanConstant(s, startPos)
|
function decode_scanConstant(s, startPos)
|
||||||
local consts = {["true"] = true, ["false"] = false, ["null"] = nil}
|
local consts = { ["true"] = true, ["false"] = false, ["null"] = nil }
|
||||||
local constNames = {"true", "false", "null"}
|
local constNames = { "true", "false", "null" }
|
||||||
|
|
||||||
for i, k in pairs(constNames) do
|
for i, k in pairs(constNames) do
|
||||||
if string.sub(s, startPos, startPos + string.len(k) - 1) == k then
|
if string.sub(s, startPos, startPos + string.len(k) - 1) == k then
|
||||||
|
|
@ -694,7 +695,7 @@ local LuaDebugger = {
|
||||||
runLineCount = 0,
|
runLineCount = 0,
|
||||||
--分割字符串缓存
|
--分割字符串缓存
|
||||||
splitFilePaths = {},
|
splitFilePaths = {},
|
||||||
version="0.9.3",
|
version = "0.9.3",
|
||||||
serVarLevel = 4
|
serVarLevel = 4
|
||||||
}
|
}
|
||||||
local debug_hook = nil
|
local debug_hook = nil
|
||||||
|
|
@ -747,17 +748,17 @@ function print(...)
|
||||||
end
|
end
|
||||||
if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then
|
if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then
|
||||||
if (debug_server) then
|
if (debug_server) then
|
||||||
local arg = {...} --这里的...和{}符号中间需要有空格号,否则会出错
|
local arg = { ... } --这里的...和{}符号中间需要有空格号,否则会出错
|
||||||
local str = ""
|
local str = ""
|
||||||
if (#arg == 0) then
|
if (#arg == 0) then
|
||||||
arg = {"nil"}
|
arg = { "nil" }
|
||||||
end
|
end
|
||||||
for k, v in pairs(arg) do
|
for k, v in pairs(arg) do
|
||||||
str = str .. tostring(v) .. "\t"
|
str = str .. tostring(v) .. "\t"
|
||||||
end
|
end
|
||||||
local sendMsg = {
|
local sendMsg = {
|
||||||
event = LuaDebugger.event.C2S_LuaPrint,
|
event = LuaDebugger.event.C2S_LuaPrint,
|
||||||
data = {msg = ZZBase64.encode(str), type = 1}
|
data = { msg = ZZBase64.encode(str), type = 1 }
|
||||||
}
|
}
|
||||||
local sendStr = json.encode(sendMsg)
|
local sendStr = json.encode(sendMsg)
|
||||||
debug_server:send(sendStr .. "__debugger_k0204__")
|
debug_server:send(sendStr .. "__debugger_k0204__")
|
||||||
|
|
@ -771,46 +772,48 @@ function luaIdePrintWarn(...)
|
||||||
end
|
end
|
||||||
if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then
|
if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then
|
||||||
if (debug_server) then
|
if (debug_server) then
|
||||||
local arg = {...} --这里的...和{}符号中间需要有空格号,否则会出错
|
local arg = { ... } --这里的...和{}符号中间需要有空格号,否则会出错
|
||||||
local str = ""
|
local str = ""
|
||||||
if (#arg == 0) then
|
if (#arg == 0) then
|
||||||
arg = {"nil"}
|
arg = { "nil" }
|
||||||
end
|
end
|
||||||
for k, v in pairs(arg) do
|
for k, v in pairs(arg) do
|
||||||
str = str .. tostring(v) .. "\t"
|
str = str .. tostring(v) .. "\t"
|
||||||
end
|
end
|
||||||
local sendMsg = {
|
local sendMsg = {
|
||||||
event = LuaDebugger.event.C2S_LuaPrint,
|
event = LuaDebugger.event.C2S_LuaPrint,
|
||||||
data = {msg = ZZBase64.encode(str), type = 2}
|
data = { msg = ZZBase64.encode(str), type = 2 }
|
||||||
}
|
}
|
||||||
local sendStr = json.encode(sendMsg)
|
local sendStr = json.encode(sendMsg)
|
||||||
debug_server:send(sendStr .. "__debugger_k0204__")
|
debug_server:send(sendStr .. "__debugger_k0204__")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function luaIdePrintErr(...)
|
function luaIdePrintErr(...)
|
||||||
if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 3) then
|
if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 3) then
|
||||||
debugger_print(...)
|
debugger_print(...)
|
||||||
end
|
end
|
||||||
if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then
|
if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then
|
||||||
if (debug_server) then
|
if (debug_server) then
|
||||||
local arg = {...} --这里的...和{}符号中间需要有空格号,否则会出错
|
local arg = { ... } --这里的...和{}符号中间需要有空格号,否则会出错
|
||||||
local str = ""
|
local str = ""
|
||||||
if (#arg == 0) then
|
if (#arg == 0) then
|
||||||
arg = {"nil"}
|
arg = { "nil" }
|
||||||
end
|
end
|
||||||
for k, v in pairs(arg) do
|
for k, v in pairs(arg) do
|
||||||
str = str .. tostring(v) .. "\t"
|
str = str .. tostring(v) .. "\t"
|
||||||
end
|
end
|
||||||
local sendMsg = {
|
local sendMsg = {
|
||||||
event = LuaDebugger.event.C2S_LuaPrint,
|
event = LuaDebugger.event.C2S_LuaPrint,
|
||||||
data = {msg = ZZBase64.encode(str), type = 3}
|
data = { msg = ZZBase64.encode(str), type = 3 }
|
||||||
}
|
}
|
||||||
local sendStr = json.encode(sendMsg)
|
local sendStr = json.encode(sendMsg)
|
||||||
debug_server:send(sendStr .. "__debugger_k0204__")
|
debug_server:send(sendStr .. "__debugger_k0204__")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--@endregion
|
--@endregion
|
||||||
|
|
||||||
--@region 辅助方法
|
--@region 辅助方法
|
||||||
|
|
@ -1005,27 +1008,24 @@ local function debugger_valueToString(v)
|
||||||
local vtype = type(v)
|
local vtype = type(v)
|
||||||
local vstr = nil
|
local vstr = nil
|
||||||
if (vtype == "userdata") then
|
if (vtype == "userdata") then
|
||||||
if (LuaDebugger.isFoxGloryProject ) then
|
if (LuaDebugger.isFoxGloryProject) then
|
||||||
|
return "userdata", vtype
|
||||||
return "userdata",vtype
|
|
||||||
|
|
||||||
else
|
else
|
||||||
return tostring(v), vtype
|
return tostring(v), vtype
|
||||||
end
|
end
|
||||||
elseif (vtype == "table" or vtype == "function" or vtype == "boolean") then
|
elseif (vtype == "table" or vtype == "function" or vtype == "boolean") then
|
||||||
local value = vtype
|
local value = vtype
|
||||||
xpcall(function()
|
xpcall(function()
|
||||||
if(LuaDebugger.isFoxGloryProject) then
|
if (LuaDebugger.isFoxGloryProject) then
|
||||||
value = vtype
|
value = vtype
|
||||||
else
|
else
|
||||||
value = tostring(v)
|
value = tostring(v)
|
||||||
end
|
end
|
||||||
|
end, function()
|
||||||
end,function()
|
|
||||||
value = vtype
|
value = vtype
|
||||||
end)
|
end)
|
||||||
return value, vtype
|
return value, vtype
|
||||||
elseif (vtype == "number" or vtype == "string" ) then
|
elseif (vtype == "number" or vtype == "string") then
|
||||||
return v, vtype
|
return v, vtype
|
||||||
else
|
else
|
||||||
return tostring(v), vtype
|
return tostring(v), vtype
|
||||||
|
|
@ -1033,12 +1033,12 @@ local function debugger_valueToString(v)
|
||||||
end
|
end
|
||||||
local function debugger_setVarInfo(name, value)
|
local function debugger_setVarInfo(name, value)
|
||||||
local valueStr, valueType = debugger_valueToString(value)
|
local valueStr, valueType = debugger_valueToString(value)
|
||||||
local nameStr,nameType = debugger_valueToString(name)
|
local nameStr, nameType = debugger_valueToString(name)
|
||||||
if(valueStr == nil) then
|
if (valueStr == nil) then
|
||||||
valueStr = valueType
|
valueStr = valueType
|
||||||
end
|
end
|
||||||
local valueInfo = {
|
local valueInfo = {
|
||||||
name =nameStr,
|
name = nameStr,
|
||||||
valueType = valueType,
|
valueType = valueType,
|
||||||
valueStr = ZZBase64.encode(valueStr)
|
valueStr = ZZBase64.encode(valueStr)
|
||||||
}
|
}
|
||||||
|
|
@ -1076,7 +1076,7 @@ local function debugger_getvalue(f)
|
||||||
i = i + 1
|
i = i + 1
|
||||||
end
|
end
|
||||||
|
|
||||||
return {locals = locals, ups = ups}
|
return { locals = locals, ups = ups }
|
||||||
end
|
end
|
||||||
--获取堆栈
|
--获取堆栈
|
||||||
debugger_stackInfo =
|
debugger_stackInfo =
|
||||||
|
|
@ -1122,7 +1122,7 @@ debugger_stackInfo =
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local stackInfo = {stack = stack, vars = varInfos, funcs = funcs}
|
local stackInfo = { stack = stack, vars = varInfos, funcs = funcs }
|
||||||
local data = {
|
local data = {
|
||||||
stack = stackInfo.stack,
|
stack = stackInfo.stack,
|
||||||
vars = stackInfo.vars,
|
vars = stackInfo.vars,
|
||||||
|
|
@ -1133,23 +1133,23 @@ debugger_stackInfo =
|
||||||
}
|
}
|
||||||
|
|
||||||
return data
|
return data
|
||||||
end
|
end
|
||||||
--==============================工具方法 end======================================================
|
--==============================工具方法 end======================================================
|
||||||
--===========================点断信息==================================================
|
--===========================点断信息==================================================
|
||||||
--根据不同的游戏引擎进行定时获取断点信息
|
--根据不同的游戏引擎进行定时获取断点信息
|
||||||
--CCDirector:sharedDirector():getScheduler()
|
--CCDirector:sharedDirector():getScheduler()
|
||||||
local debugger_setBreak = nil
|
local debugger_setBreak = nil
|
||||||
local function debugger_receiveDebugBreakInfo()
|
local function debugger_receiveDebugBreakInfo()
|
||||||
if(not jit) then
|
if (not jit) then
|
||||||
if(_VERSION)then
|
if (_VERSION) then
|
||||||
print("当前lua版本为: ".._VERSION.." 请使用 -----LuaDebug.lua----- 进行调试!")
|
print("当前lua版本为: " .. _VERSION .. " 请使用 -----LuaDebug.lua----- 进行调试!")
|
||||||
else
|
else
|
||||||
print("当前为lua版本,请使用-----LuaDebug.lua-----进行调试!")
|
print("当前为lua版本,请使用-----LuaDebug.lua-----进行调试!")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if (breakInfoSocket) then
|
if (breakInfoSocket) then
|
||||||
local msg, status = breakInfoSocket:receive()
|
local msg, status = breakInfoSocket:receive()
|
||||||
if(LuaDebugger.isLaunch == true and status == "closed") then
|
if (LuaDebugger.isLaunch == true and status == "closed") then
|
||||||
os.exit()
|
os.exit()
|
||||||
end
|
end
|
||||||
if (msg) then
|
if (msg) then
|
||||||
|
|
@ -1159,7 +1159,7 @@ local function debugger_receiveDebugBreakInfo()
|
||||||
elseif netData.event == LuaDebugger.event.S2C_LoadLuaScript then
|
elseif netData.event == LuaDebugger.event.S2C_LoadLuaScript then
|
||||||
LuaDebugger.loadScriptBody = netData.data
|
LuaDebugger.loadScriptBody = netData.data
|
||||||
debugger_exeLuaString()
|
debugger_exeLuaString()
|
||||||
debugger_sendMsg(breakInfoSocket,LuaDebugger.event.C2S_LoadLuaScript,LuaDebugger.loadScriptBody)
|
debugger_sendMsg(breakInfoSocket, LuaDebugger.event.C2S_LoadLuaScript, LuaDebugger.loadScriptBody)
|
||||||
elseif netData.event == LuaDebugger.event.S2C_ReLoadFile then
|
elseif netData.event == LuaDebugger.event.S2C_ReLoadFile then
|
||||||
LuaDebugger.reLoadFileBody = netData.data
|
LuaDebugger.reLoadFileBody = netData.data
|
||||||
LuaDebugger.isReLoadFile = false
|
LuaDebugger.isReLoadFile = false
|
||||||
|
|
@ -1267,7 +1267,7 @@ debugger_setBreak =
|
||||||
end
|
end
|
||||||
LuaDebugger.isHook = false
|
LuaDebugger.isHook = false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local function debugger_checkFileIsBreak(fileName)
|
local function debugger_checkFileIsBreak(fileName)
|
||||||
return LuaDebugger.breakInfos[fileName]
|
return LuaDebugger.breakInfos[fileName]
|
||||||
end
|
end
|
||||||
|
|
@ -1299,7 +1299,7 @@ function debugger_conditionStr(condition, vars, callBack)
|
||||||
currentTabble[k] = v
|
currentTabble[k] = v
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
setmetatable(currentTabble, {__index = _G})
|
setmetatable(currentTabble, { __index = _G })
|
||||||
local fun = loadstring("return " .. condition)
|
local fun = loadstring("return " .. condition)
|
||||||
setfenv(fun, currentTabble)
|
setfenv(fun, currentTabble)
|
||||||
return fun()
|
return fun()
|
||||||
|
|
@ -1316,14 +1316,13 @@ function debugger_conditionStr(condition, vars, callBack)
|
||||||
callBack()
|
callBack()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--执行lua字符串
|
--执行lua字符串
|
||||||
debugger_exeLuaString = function()
|
debugger_exeLuaString = function()
|
||||||
|
|
||||||
local function loadScript()
|
local function loadScript()
|
||||||
|
|
||||||
local script = LuaDebugger.loadScriptBody.script
|
local script = LuaDebugger.loadScriptBody.script
|
||||||
if (LuaDebugger.loadScriptBody.isBreak) then
|
if (LuaDebugger.loadScriptBody.isBreak) then
|
||||||
local currentTabble = {_G = _G}
|
local currentTabble = { _G = _G }
|
||||||
local frameId = LuaDebugger.loadScriptBody.frameId
|
local frameId = LuaDebugger.loadScriptBody.frameId
|
||||||
frameId = frameId
|
frameId = frameId
|
||||||
local func = LuaDebugger.currentDebuggerData.funcs[frameId]
|
local func = LuaDebugger.currentDebuggerData.funcs[frameId]
|
||||||
|
|
@ -1336,7 +1335,7 @@ debugger_exeLuaString = function()
|
||||||
for k, v in pairs(locals) do
|
for k, v in pairs(locals) do
|
||||||
currentTabble[k] = v
|
currentTabble[k] = v
|
||||||
end
|
end
|
||||||
setmetatable(currentTabble, {__index = _G})
|
setmetatable(currentTabble, { __index = _G })
|
||||||
|
|
||||||
local fun = loadstring(script)
|
local fun = loadstring(script)
|
||||||
setfenv(fun, currentTabble)
|
setfenv(fun, currentTabble)
|
||||||
|
|
@ -1351,50 +1350,47 @@ debugger_exeLuaString = function()
|
||||||
xpcall(
|
xpcall(
|
||||||
loadScript,
|
loadScript,
|
||||||
function(error)
|
function(error)
|
||||||
|
|
||||||
-- debugger_sendMsg(debug_server, LuaDebugger.event.C2S_LoadLuaScript, LuaDebugger.loadScriptBody)
|
-- debugger_sendMsg(debug_server, LuaDebugger.event.C2S_LoadLuaScript, LuaDebugger.loadScriptBody)
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
LuaDebugger.loadScriptBody.script = nil
|
LuaDebugger.loadScriptBody.script = nil
|
||||||
if (LuaDebugger.loadScriptBody.isBreak) then
|
if (LuaDebugger.loadScriptBody.isBreak) then
|
||||||
LuaDebugger.serVarLevel = LuaDebugger.serVarLevel+1
|
LuaDebugger.serVarLevel = LuaDebugger.serVarLevel + 1
|
||||||
LuaDebugger.currentDebuggerData = debugger_stackInfo(LuaDebugger.serVarLevel, LuaDebugger.event.C2S_HITBreakPoint)
|
LuaDebugger.currentDebuggerData = debugger_stackInfo(LuaDebugger.serVarLevel, LuaDebugger.event
|
||||||
|
.C2S_HITBreakPoint)
|
||||||
LuaDebugger.loadScriptBody.stack = LuaDebugger.currentDebuggerData.stack
|
LuaDebugger.loadScriptBody.stack = LuaDebugger.currentDebuggerData.stack
|
||||||
end
|
end
|
||||||
LuaDebugger.loadScriptBody.complete = true
|
LuaDebugger.loadScriptBody.complete = true
|
||||||
|
|
||||||
end
|
end
|
||||||
--@region 调试中修改变量值
|
--@region 调试中修改变量值
|
||||||
|
|
||||||
|
|
||||||
--根据key 值在 value 查找
|
--根据key 值在 value 查找
|
||||||
local function debugger_getTablekey(key,keyType,value)
|
local function debugger_getTablekey(key, keyType, value)
|
||||||
if(keyType == -1) then
|
if (keyType == -1) then
|
||||||
return key
|
return key
|
||||||
elseif(keyType == 1) then
|
elseif (keyType == 1) then
|
||||||
return tonumber(key)
|
return tonumber(key)
|
||||||
elseif(keyType == 2) then
|
elseif (keyType == 2) then
|
||||||
local valueKey = nil
|
local valueKey = nil
|
||||||
for k,v in pairs(value) do
|
for k, v in pairs(value) do
|
||||||
local nameType = type(k)
|
local nameType = type(k)
|
||||||
if(nameType == "userdata" or nameType == "table") then
|
if (nameType == "userdata" or nameType == "table") then
|
||||||
if (not LuaDebugger.isFoxGloryProject) then
|
if (not LuaDebugger.isFoxGloryProject) then
|
||||||
valueKey = tostring(k)
|
valueKey = tostring(k)
|
||||||
if(key == valueKey) then
|
if (key == valueKey) then
|
||||||
return k
|
return k
|
||||||
end
|
end
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function debugger_setVarValue(server, data)
|
local function debugger_setVarValue(server, data)
|
||||||
|
|
||||||
local newValue = nil
|
local newValue = nil
|
||||||
local level = LuaDebugger.serVarLevel+LuaDebugger.setVarBody.frameId
|
local level = LuaDebugger.serVarLevel + LuaDebugger.setVarBody.frameId
|
||||||
local firstKeyName = data.keys[1]
|
local firstKeyName = data.keys[1]
|
||||||
--@region vars check
|
--@region vars check
|
||||||
local localValueChangeIndex = -1
|
local localValueChangeIndex = -1
|
||||||
|
|
@ -1409,7 +1405,7 @@ local function debugger_setVarValue(server, data)
|
||||||
if not name then
|
if not name then
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
if(firstKeyName == name) then
|
if (firstKeyName == name) then
|
||||||
localValueChangeIndex = i
|
localValueChangeIndex = i
|
||||||
oldValue = value
|
oldValue = value
|
||||||
end
|
end
|
||||||
|
|
@ -1427,7 +1423,7 @@ local function debugger_setVarValue(server, data)
|
||||||
if not name then
|
if not name then
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
if(localValueChangeIndex == -1 and firstKeyName == name) then
|
if (localValueChangeIndex == -1 and firstKeyName == name) then
|
||||||
upValueFun = func
|
upValueFun = func
|
||||||
oldValue = value
|
oldValue = value
|
||||||
upValueChangeIndex = i
|
upValueChangeIndex = i
|
||||||
|
|
@ -1439,8 +1435,8 @@ local function debugger_setVarValue(server, data)
|
||||||
end
|
end
|
||||||
i = i + 1
|
i = i + 1
|
||||||
end
|
end
|
||||||
--@endregion
|
--@endregion
|
||||||
local vars = {locals = locals, ups = ups}
|
local vars = { locals = locals, ups = ups }
|
||||||
|
|
||||||
local function loadScript()
|
local function loadScript()
|
||||||
local currentTabble = {}
|
local currentTabble = {}
|
||||||
|
|
@ -1457,7 +1453,7 @@ local function debugger_setVarValue(server, data)
|
||||||
currentTabble[k] = v
|
currentTabble[k] = v
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
setmetatable(currentTabble, {__index = _G})
|
setmetatable(currentTabble, { __index = _G })
|
||||||
local fun = loadstring("return " .. data.value)
|
local fun = loadstring("return " .. data.value)
|
||||||
setfenv(fun, currentTabble)
|
setfenv(fun, currentTabble)
|
||||||
newValue = fun()
|
newValue = fun()
|
||||||
|
|
@ -1476,39 +1472,37 @@ local function debugger_setVarValue(server, data)
|
||||||
-- local 查找并替换
|
-- local 查找并替换
|
||||||
local keyLength = #data.keys
|
local keyLength = #data.keys
|
||||||
|
|
||||||
if(keyLength == 1) then
|
if (keyLength == 1) then
|
||||||
if(localValueChangeIndex ~= -1) then
|
if (localValueChangeIndex ~= -1) then
|
||||||
|
|
||||||
debug.setlocal(level, localValueChangeIndex, newValue)
|
debug.setlocal(level, localValueChangeIndex, newValue)
|
||||||
elseif(upValueFun ~= nil) then
|
elseif (upValueFun ~= nil) then
|
||||||
debug.setupvalue( upValueFun, upValueChangeIndex, newValue )
|
debug.setupvalue(upValueFun, upValueChangeIndex, newValue)
|
||||||
else
|
else
|
||||||
--全局变量查找
|
--全局变量查找
|
||||||
if(_G[firstKeyName]) then
|
if (_G[firstKeyName]) then
|
||||||
_G[firstKeyName] = newValue
|
_G[firstKeyName] = newValue
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if(not oldValue) then
|
if (not oldValue) then
|
||||||
if(_G[firstKeyName]) then
|
if (_G[firstKeyName]) then
|
||||||
oldValue = _G[firstKeyName]
|
oldValue = _G[firstKeyName]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local tempValue = oldValue
|
local tempValue = oldValue
|
||||||
for i=2,keyLength-1 do
|
for i = 2, keyLength - 1 do
|
||||||
if(tempValue) then
|
if (tempValue) then
|
||||||
oldValue = oldValue[debugger_getTablekey(data.keys[i],data.numberTypes[i],oldValue)]
|
oldValue = oldValue[debugger_getTablekey(data.keys[i], data.numberTypes[i], oldValue)]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if(tempValue) then
|
if (tempValue) then
|
||||||
oldValue[debugger_getTablekey(data.keys[keyLength],data.numberTypes[keyLength],oldValue)] = newValue
|
oldValue[debugger_getTablekey(data.keys[keyLength], data.numberTypes[keyLength], oldValue)] = newValue
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local varInfo = debugger_setVarInfo(data.varName, newValue)
|
local varInfo = debugger_setVarInfo(data.varName, newValue)
|
||||||
data.varInfo = varInfo
|
data.varInfo = varInfo
|
||||||
LuaDebugger.serVarLevel = LuaDebugger.serVarLevel+1
|
LuaDebugger.serVarLevel = LuaDebugger.serVarLevel + 1
|
||||||
LuaDebugger.currentDebuggerData = debugger_stackInfo(LuaDebugger.serVarLevel, LuaDebugger.event.C2S_HITBreakPoint)
|
LuaDebugger.currentDebuggerData = debugger_stackInfo(LuaDebugger.serVarLevel, LuaDebugger.event.C2S_HITBreakPoint)
|
||||||
|
|
||||||
end
|
end
|
||||||
--@endregion
|
--@endregion
|
||||||
|
|
||||||
|
|
@ -1520,8 +1514,8 @@ checkSetVar =
|
||||||
function()
|
function()
|
||||||
if (LuaDebugger.isSetVar) then
|
if (LuaDebugger.isSetVar) then
|
||||||
LuaDebugger.isSetVar = false
|
LuaDebugger.isSetVar = false
|
||||||
debugger_setVarValue(debug_server,LuaDebugger.setVarBody)
|
debugger_setVarValue(debug_server, LuaDebugger.setVarBody)
|
||||||
LuaDebugger.serVarLevel = LuaDebugger.serVarLevel+1
|
LuaDebugger.serVarLevel = LuaDebugger.serVarLevel + 1
|
||||||
_resume(coro_debugger, LuaDebugger.setVarBody)
|
_resume(coro_debugger, LuaDebugger.setVarBody)
|
||||||
xpcall(
|
xpcall(
|
||||||
checkSetVar,
|
checkSetVar,
|
||||||
|
|
@ -1529,10 +1523,10 @@ checkSetVar =
|
||||||
print("设置变量", error)
|
print("设置变量", error)
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
elseif(LuaDebugger.isLoadLuaScript) then
|
elseif (LuaDebugger.isLoadLuaScript) then
|
||||||
LuaDebugger.isLoadLuaScript = false
|
LuaDebugger.isLoadLuaScript = false
|
||||||
debugger_exeLuaString()
|
debugger_exeLuaString()
|
||||||
LuaDebugger.serVarLevel = LuaDebugger.serVarLevel+1
|
LuaDebugger.serVarLevel = LuaDebugger.serVarLevel + 1
|
||||||
_resume(coro_debugger, LuaDebugger.reLoadFileBody)
|
_resume(coro_debugger, LuaDebugger.reLoadFileBody)
|
||||||
xpcall(
|
xpcall(
|
||||||
checkSetVar,
|
checkSetVar,
|
||||||
|
|
@ -1540,12 +1534,12 @@ checkSetVar =
|
||||||
print("执行代码", error)
|
print("执行代码", error)
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
elseif(LuaDebugger.isReLoadFile) then
|
elseif (LuaDebugger.isReLoadFile) then
|
||||||
LuaDebugger.isReLoadFile = false
|
LuaDebugger.isReLoadFile = false
|
||||||
LuaDebugger.reLoadFileBody.isReLoad = debugger_reLoadFile(LuaDebugger.reLoadFileBody)
|
LuaDebugger.reLoadFileBody.isReLoad = debugger_reLoadFile(LuaDebugger.reLoadFileBody)
|
||||||
print("重载结果:",LuaDebugger.reLoadFileBody.isReLoad)
|
print("重载结果:", LuaDebugger.reLoadFileBody.isReLoad)
|
||||||
LuaDebugger.reLoadFileBody.script = nil
|
LuaDebugger.reLoadFileBody.script = nil
|
||||||
LuaDebugger.serVarLevel = LuaDebugger.serVarLevel+1
|
LuaDebugger.serVarLevel = LuaDebugger.serVarLevel + 1
|
||||||
_resume(coro_debugger, LuaDebugger.reLoadFileBody)
|
_resume(coro_debugger, LuaDebugger.reLoadFileBody)
|
||||||
xpcall(
|
xpcall(
|
||||||
checkSetVar,
|
checkSetVar,
|
||||||
|
|
@ -1554,7 +1548,7 @@ checkSetVar =
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1745,7 +1739,6 @@ end
|
||||||
return
|
return
|
||||||
]]
|
]]
|
||||||
local function debugger_getmetatable(value, metatable, vinfos, server, variablesReference, debugSpeedIndex, metatables)
|
local function debugger_getmetatable(value, metatable, vinfos, server, variablesReference, debugSpeedIndex, metatables)
|
||||||
|
|
||||||
for i, mtable in ipairs(metatables) do
|
for i, mtable in ipairs(metatables) do
|
||||||
if (metatable == mtable) then
|
if (metatable == mtable) then
|
||||||
return vinfos
|
return vinfos
|
||||||
|
|
@ -1801,7 +1794,6 @@ local function debugger_getmetatable(value, metatable, vinfos, server, variables
|
||||||
else
|
else
|
||||||
return vinfos
|
return vinfos
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
local function debugger_sendTableField(luatable, vinfos, server, variablesReference, debugSpeedIndex, valueType)
|
local function debugger_sendTableField(luatable, vinfos, server, variablesReference, debugSpeedIndex, valueType)
|
||||||
if (valueType == "userdata") then
|
if (valueType == "userdata") then
|
||||||
|
|
@ -1874,7 +1866,6 @@ local function debugger_sendTableValues(value, server, variablesReference, debug
|
||||||
vinfos = {}
|
vinfos = {}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
m = getmetatable(value)
|
m = getmetatable(value)
|
||||||
|
|
@ -1924,11 +1915,10 @@ local function debugger_getBreakVar(body, server)
|
||||||
if (value) then
|
if (value) then
|
||||||
local valueType = type(value)
|
local valueType = type(value)
|
||||||
if (valueType == "table" or valueType == "userdata") then
|
if (valueType == "table" or valueType == "userdata") then
|
||||||
|
|
||||||
debugger_sendTableValues(value, server, variablesReference, debugSpeedIndex)
|
debugger_sendTableValues(value, server, variablesReference, debugSpeedIndex)
|
||||||
else
|
else
|
||||||
if (valueType == "function") then
|
if (valueType == "function") then
|
||||||
if(LuaDebugger.isFoxGloryProject) then
|
if (LuaDebugger.isFoxGloryProject) then
|
||||||
value = "function"
|
value = "function"
|
||||||
else
|
else
|
||||||
value = tostring(value)
|
value = tostring(value)
|
||||||
|
|
@ -1991,7 +1981,6 @@ local function ResetDebugInfo()
|
||||||
LuaDebugger.StepIn = false
|
LuaDebugger.StepIn = false
|
||||||
LuaDebugger.StepNext = false
|
LuaDebugger.StepNext = false
|
||||||
LuaDebugger.StepOut = false
|
LuaDebugger.StepOut = false
|
||||||
|
|
||||||
end
|
end
|
||||||
local function debugger_loop(server)
|
local function debugger_loop(server)
|
||||||
server = debug_server
|
server = debug_server
|
||||||
|
|
@ -2002,7 +1991,7 @@ local function debugger_loop(server)
|
||||||
while true do
|
while true do
|
||||||
local line, status = server:receive()
|
local line, status = server:receive()
|
||||||
if (status == "closed") then
|
if (status == "closed") then
|
||||||
if(LuaDebugger.isLaunch) then
|
if (LuaDebugger.isLaunch) then
|
||||||
os.exit()
|
os.exit()
|
||||||
else
|
else
|
||||||
debug.sethook()
|
debug.sethook()
|
||||||
|
|
@ -2014,13 +2003,12 @@ local function debugger_loop(server)
|
||||||
local event = netData.event
|
local event = netData.event
|
||||||
local body = netData.data
|
local body = netData.data
|
||||||
if (event == LuaDebugger.event.S2C_DebugClose) then
|
if (event == LuaDebugger.event.S2C_DebugClose) then
|
||||||
if(LuaDebugger.isLaunch) then
|
if (LuaDebugger.isLaunch) then
|
||||||
os.exit()
|
os.exit()
|
||||||
else
|
else
|
||||||
debug.sethook()
|
debug.sethook()
|
||||||
coroutine.yield()
|
coroutine.yield()
|
||||||
end
|
end
|
||||||
|
|
||||||
elseif event == LuaDebugger.event.S2C_SetBreakPoints then
|
elseif event == LuaDebugger.event.S2C_SetBreakPoints then
|
||||||
--设置断点信息
|
--设置断点信息
|
||||||
local function setB()
|
local function setB()
|
||||||
|
|
@ -2041,7 +2029,7 @@ local function debugger_loop(server)
|
||||||
LuaDebugger.currentDebuggerData = nil
|
LuaDebugger.currentDebuggerData = nil
|
||||||
LuaDebugger.Run = true
|
LuaDebugger.Run = true
|
||||||
LuaDebugger.tempRunFlag = true
|
LuaDebugger.tempRunFlag = true
|
||||||
LuaDebugger.currentLine= nil
|
LuaDebugger.currentLine = nil
|
||||||
local data = coroutine.yield()
|
local data = coroutine.yield()
|
||||||
LuaDebugger.serVarLevel = 4
|
LuaDebugger.serVarLevel = 4
|
||||||
LuaDebugger.currentDebuggerData = data
|
LuaDebugger.currentDebuggerData = data
|
||||||
|
|
@ -2142,42 +2130,37 @@ local function debugger_loop(server)
|
||||||
end
|
end
|
||||||
coro_debugger = coroutine.create(debugger_loop)
|
coro_debugger = coroutine.create(debugger_loop)
|
||||||
debug_hook = function(event, line)
|
debug_hook = function(event, line)
|
||||||
|
if (not LuaDebugger.isHook) then
|
||||||
if(not LuaDebugger.isHook) then
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if(LuaDebugger.Run) then
|
if (LuaDebugger.Run) then
|
||||||
if(event == "line") then
|
if (event == "line") then
|
||||||
local isCheck = false
|
local isCheck = false
|
||||||
for k, breakInfo in pairs(LuaDebugger.breakInfos) do
|
for k, breakInfo in pairs(LuaDebugger.breakInfos) do
|
||||||
|
|
||||||
for bk, linesInfo in pairs(breakInfo) do
|
for bk, linesInfo in pairs(breakInfo) do
|
||||||
|
if (linesInfo.lines and linesInfo.lines[line]) then
|
||||||
if(linesInfo.lines and linesInfo.lines[line]) then
|
|
||||||
isCheck = true
|
isCheck = true
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if(isCheck) then
|
if (isCheck) then
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if(not isCheck) then
|
if (not isCheck) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local file = nil
|
local file = nil
|
||||||
if(event == "line") then
|
if (event == "line") then
|
||||||
|
|
||||||
local funs = nil
|
local funs = nil
|
||||||
local funlength =0
|
local funlength = 0
|
||||||
if(LuaDebugger.currentDebuggerData) then
|
if (LuaDebugger.currentDebuggerData) then
|
||||||
funs = LuaDebugger.currentDebuggerData.funcs
|
funs = LuaDebugger.currentDebuggerData.funcs
|
||||||
funlength = #funs
|
funlength = #funs
|
||||||
end
|
end
|
||||||
|
|
@ -2185,47 +2168,44 @@ debug_hook = function(event, line)
|
||||||
local tempFunc = stepInfo.func
|
local tempFunc = stepInfo.func
|
||||||
local source = stepInfo.source
|
local source = stepInfo.source
|
||||||
file = getSource(source);
|
file = getSource(source);
|
||||||
if(source == "=[C]" or source:find(LuaDebugger.DebugLuaFie)) then return end
|
if (source == "=[C]" or source:find(LuaDebugger.DebugLuaFie)) then return end
|
||||||
if(funlength > 0 and funs[1] == tempFunc and LuaDebugger.currentLine ~= line) then
|
if (funlength > 0 and funs[1] == tempFunc and LuaDebugger.currentLine ~= line) then
|
||||||
LuaDebugger.runLineCount = LuaDebugger.runLineCount+1
|
LuaDebugger.runLineCount = LuaDebugger.runLineCount + 1
|
||||||
end
|
end
|
||||||
local breakInfo = LuaDebugger.breakInfos[file]
|
local breakInfo = LuaDebugger.breakInfos[file]
|
||||||
local breakData = nil
|
local breakData = nil
|
||||||
local ischeck = false
|
local ischeck = false
|
||||||
if(breakInfo) then
|
if (breakInfo) then
|
||||||
|
|
||||||
for k, lineInfo in pairs(breakInfo) do
|
for k, lineInfo in pairs(breakInfo) do
|
||||||
local lines = lineInfo.lines
|
local lines = lineInfo.lines
|
||||||
if(lines and lines[line]) then
|
if (lines and lines[line]) then
|
||||||
ischeck = true
|
ischeck = true
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local isHit = false
|
local isHit = false
|
||||||
if(ischeck) then
|
if (ischeck) then
|
||||||
|
|
||||||
--并且在断点中
|
--并且在断点中
|
||||||
local info = stepInfo
|
local info = stepInfo
|
||||||
local source = string.lower( info.source )
|
local source = string.lower(info.source)
|
||||||
local fullName,dir,fileName = debugger_getFilePathInfo(source)
|
local fullName, dir, fileName = debugger_getFilePathInfo(source)
|
||||||
local hitPathNames = splitFilePath(fullName)
|
local hitPathNames = splitFilePath(fullName)
|
||||||
|
|
||||||
local hitCounts = {}
|
local hitCounts = {}
|
||||||
local debugHitCounts = nil
|
local debugHitCounts = nil
|
||||||
for k, lineInfo in pairs(breakInfo) do
|
for k, lineInfo in pairs(breakInfo) do
|
||||||
|
|
||||||
local lines = lineInfo.lines
|
local lines = lineInfo.lines
|
||||||
local pathNames = lineInfo.pathNames
|
local pathNames = lineInfo.pathNames
|
||||||
debugHitCounts = lineInfo.hitCounts
|
debugHitCounts = lineInfo.hitCounts
|
||||||
if(lines and lines[line]) then
|
if (lines and lines[line]) then
|
||||||
breakData = lines[line]
|
breakData = lines[line]
|
||||||
--判断路径
|
--判断路径
|
||||||
hitCounts[k] = 0
|
hitCounts[k] = 0
|
||||||
local hitPathNamesCount = #hitPathNames
|
local hitPathNamesCount = #hitPathNames
|
||||||
local pathNamesCount = #pathNames
|
local pathNamesCount = #pathNames
|
||||||
local checkCount = 0;
|
local checkCount = 0;
|
||||||
while(true) do
|
while (true) do
|
||||||
if (pathNames[pathNamesCount] ~= hitPathNames[hitPathNamesCount]) then
|
if (pathNames[pathNamesCount] ~= hitPathNames[hitPathNamesCount]) then
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
|
|
@ -2233,55 +2213,53 @@ debug_hook = function(event, line)
|
||||||
end
|
end
|
||||||
pathNamesCount = pathNamesCount - 1
|
pathNamesCount = pathNamesCount - 1
|
||||||
hitPathNamesCount = hitPathNamesCount - 1
|
hitPathNamesCount = hitPathNamesCount - 1
|
||||||
checkCount = checkCount+1
|
checkCount = checkCount + 1
|
||||||
if(pathNamesCount <= 0 or hitPathNamesCount <= 0) then
|
if (pathNamesCount <= 0 or hitPathNamesCount <= 0) then
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if(checkCount>0) then
|
if (checkCount > 0) then
|
||||||
break;
|
break;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
breakData = nil
|
breakData = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if(breakData) then
|
if (breakData) then
|
||||||
local hitFieName = ""
|
local hitFieName = ""
|
||||||
local maxCount = 0
|
local maxCount = 0
|
||||||
for k, v in pairs(hitCounts) do
|
for k, v in pairs(hitCounts) do
|
||||||
if(v > maxCount) then
|
if (v > maxCount) then
|
||||||
maxCount = v
|
maxCount = v
|
||||||
hitFieName = k;
|
hitFieName = k;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local hitPathNamesLength = #hitPathNames
|
local hitPathNamesLength = #hitPathNames
|
||||||
if (hitPathNamesLength == 1 or (hitPathNamesLength > 1 and maxCount > 1)) then
|
if (hitPathNamesLength == 1 or (hitPathNamesLength > 1 and maxCount > 1)) then
|
||||||
if(hitFieName ~= "") then
|
if (hitFieName ~= "") then
|
||||||
|
|
||||||
local hitCount = breakData.hitCondition
|
local hitCount = breakData.hitCondition
|
||||||
local clientHitCount = debugHitCounts[breakData.line]
|
local clientHitCount = debugHitCounts[breakData.line]
|
||||||
clientHitCount = clientHitCount + 1
|
clientHitCount = clientHitCount + 1
|
||||||
debugHitCounts[breakData.line] = clientHitCount
|
debugHitCounts[breakData.line] = clientHitCount
|
||||||
if(funs and funs[1] == tempFunc and LuaDebugger.runLineCount == 0) then
|
if (funs and funs[1] == tempFunc and LuaDebugger.runLineCount == 0) then
|
||||||
LuaDebugger.runLineCount = 0
|
LuaDebugger.runLineCount = 0
|
||||||
elseif(LuaDebugger.tempRunFlag and LuaDebugger.currentLine == line) then
|
elseif (LuaDebugger.tempRunFlag and LuaDebugger.currentLine == line) then
|
||||||
LuaDebugger.runLineCount = 0
|
LuaDebugger.runLineCount = 0
|
||||||
LuaDebugger.tempRunFlag = nil
|
LuaDebugger.tempRunFlag = nil
|
||||||
elseif(clientHitCount >= hitCount) then
|
elseif (clientHitCount >= hitCount) then
|
||||||
isHit = true
|
isHit = true
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if(LuaDebugger.StepOut) then
|
if (LuaDebugger.StepOut) then
|
||||||
if(funlength == 1) then
|
if (funlength == 1) then
|
||||||
ResetDebugInfo();
|
ResetDebugInfo();
|
||||||
LuaDebugger.Run = true
|
LuaDebugger.Run = true
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
if(funs[2] == tempFunc) then
|
if (funs[2] == tempFunc) then
|
||||||
local data = debugger_stackInfo(3, LuaDebugger.event.C2S_StepInResponse)
|
local data = debugger_stackInfo(3, LuaDebugger.event.C2S_StepInResponse)
|
||||||
-- print("StepIn 挂起")
|
-- print("StepIn 挂起")
|
||||||
--挂起等待调试器作出反应
|
--挂起等待调试器作出反应
|
||||||
|
|
@ -2292,8 +2270,8 @@ debug_hook = function(event, line)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if(LuaDebugger.StepIn) then
|
if (LuaDebugger.StepIn) then
|
||||||
if(funs[1] == tempFunc and LuaDebugger.runLineCount == 0) then
|
if (funs[1] == tempFunc and LuaDebugger.runLineCount == 0) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local data = debugger_stackInfo(3, LuaDebugger.event.C2S_StepInResponse)
|
local data = debugger_stackInfo(3, LuaDebugger.event.C2S_StepInResponse)
|
||||||
|
|
@ -2304,23 +2282,22 @@ debug_hook = function(event, line)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if(LuaDebugger.StepNext ) then
|
if (LuaDebugger.StepNext) then
|
||||||
local isNext = false
|
local isNext = false
|
||||||
if(funs) then
|
if (funs) then
|
||||||
for i,f in ipairs(funs) do
|
for i, f in ipairs(funs) do
|
||||||
if(tempFunc == f) then
|
if (tempFunc == f) then
|
||||||
if(LuaDebugger.currentLine == line) then
|
if (LuaDebugger.currentLine == line) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
isNext =true
|
isNext = true
|
||||||
break;
|
break;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
isNext = true
|
||||||
isNext =true
|
|
||||||
end
|
end
|
||||||
if(isNext) then
|
if (isNext) then
|
||||||
local data = debugger_stackInfo(3, LuaDebugger.event.C2S_NextResponse)
|
local data = debugger_stackInfo(3, LuaDebugger.event.C2S_NextResponse)
|
||||||
LuaDebugger.runLineCount = 0
|
LuaDebugger.runLineCount = 0
|
||||||
LuaDebugger.currentLine = line
|
LuaDebugger.currentLine = line
|
||||||
|
|
@ -2335,17 +2312,15 @@ debug_hook = function(event, line)
|
||||||
|
|
||||||
|
|
||||||
--断点判断
|
--断点判断
|
||||||
if(isHit) then
|
if (isHit) then
|
||||||
|
|
||||||
|
|
||||||
LuaDebugger.runLineCount = 0
|
LuaDebugger.runLineCount = 0
|
||||||
LuaDebugger.currentLine = line
|
LuaDebugger.currentLine = line
|
||||||
sevent = LuaDebugger.event.C2S_HITBreakPoint
|
sevent = LuaDebugger.event.C2S_HITBreakPoint
|
||||||
--调用 coro_debugger 并传入 参数
|
--调用 coro_debugger 并传入 参数
|
||||||
local data = debugger_stackInfo(3, sevent)
|
local data = debugger_stackInfo(3, sevent)
|
||||||
--挂起等待调试器作出反应
|
--挂起等待调试器作出反应
|
||||||
if(breakData and breakData.condition) then
|
if (breakData and breakData.condition) then
|
||||||
debugger_conditionStr(breakData.condition,data.vars,function()
|
debugger_conditionStr(breakData.condition, data.vars, function()
|
||||||
_resume(coro_debugger, data)
|
_resume(coro_debugger, data)
|
||||||
checkSetVar()
|
checkSetVar()
|
||||||
end)
|
end)
|
||||||
|
|
@ -2362,7 +2337,7 @@ end
|
||||||
local function debugger_xpcall()
|
local function debugger_xpcall()
|
||||||
--调用 coro_debugger 并传入 参数
|
--调用 coro_debugger 并传入 参数
|
||||||
local data = debugger_stackInfo(4, LuaDebugger.event.C2S_HITBreakPoint)
|
local data = debugger_stackInfo(4, LuaDebugger.event.C2S_HITBreakPoint)
|
||||||
if(data.stack and data.stack[1]) then
|
if (data.stack and data.stack[1]) then
|
||||||
data.stack[1].isXpCall = true
|
data.stack[1].isXpCall = true
|
||||||
end
|
end
|
||||||
--挂起等待调试器作出反应
|
--挂起等待调试器作出反应
|
||||||
|
|
@ -2371,12 +2346,11 @@ local function debugger_xpcall()
|
||||||
end
|
end
|
||||||
--调试开始
|
--调试开始
|
||||||
local function start()
|
local function start()
|
||||||
|
|
||||||
local socket = createSocket()
|
local socket = createSocket()
|
||||||
print(controller_host)
|
print(controller_host)
|
||||||
print(controller_port)
|
print(controller_port)
|
||||||
|
|
||||||
local fullName,dirName,fileName = debugger_getFilePathInfo(getinfo(1).source)
|
local fullName, dirName, fileName = debugger_getFilePathInfo(getinfo(1).source)
|
||||||
LuaDebugger.DebugLuaFie = fileName
|
LuaDebugger.DebugLuaFie = fileName
|
||||||
local server = socket.connect(controller_host, controller_port)
|
local server = socket.connect(controller_host, controller_port)
|
||||||
debug_server = server;
|
debug_server = server;
|
||||||
|
|
@ -2384,7 +2358,7 @@ local function start()
|
||||||
--创建breakInfo socket
|
--创建breakInfo socket
|
||||||
socket = createSocket()
|
socket = createSocket()
|
||||||
breakInfoSocket = socket.connect(controller_host, controller_port)
|
breakInfoSocket = socket.connect(controller_host, controller_port)
|
||||||
if(breakInfoSocket) then
|
if (breakInfoSocket) then
|
||||||
breakInfoSocket:settimeout(0)
|
breakInfoSocket:settimeout(0)
|
||||||
debugger_sendMsg(breakInfoSocket, LuaDebugger.event.C2S_SetSocketName, {
|
debugger_sendMsg(breakInfoSocket, LuaDebugger.event.C2S_SetSocketName, {
|
||||||
name = "breakPointSocket"
|
name = "breakPointSocket"
|
||||||
|
|
@ -2401,31 +2375,28 @@ local function start()
|
||||||
end, function(error)
|
end, function(error)
|
||||||
print("error:", error)
|
print("error:", error)
|
||||||
end)
|
end)
|
||||||
if(not jit) then
|
if (not jit) then
|
||||||
if(_VERSION)then
|
if (_VERSION) then
|
||||||
print("当前lua版本为: ".._VERSION.." 请使用LuaDebug 进行调试!")
|
print("当前lua版本为: " .. _VERSION .. " 请使用LuaDebug 进行调试!")
|
||||||
else
|
else
|
||||||
print("当前为lua版本,请使用LuaDebug 进行调试!")
|
print("当前为lua版本,请使用LuaDebug 进行调试!")
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
_resume(coro_debugger, server)
|
_resume(coro_debugger, server)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function StartDebug(host, port)
|
function StartDebug(host, port)
|
||||||
|
if (not host) then
|
||||||
|
|
||||||
if(not host) then
|
|
||||||
print("error host nil")
|
print("error host nil")
|
||||||
end
|
end
|
||||||
if(not port) then
|
if (not port) then
|
||||||
print("error prot nil")
|
print("error prot nil")
|
||||||
end
|
end
|
||||||
if(type(host) ~= "string") then
|
if (type(host) ~= "string") then
|
||||||
print("error host not string")
|
print("error host not string")
|
||||||
end
|
end
|
||||||
if(type(port) ~= "number") then
|
if (type(port) ~= "number") then
|
||||||
print("error host not number")
|
print("error host not number")
|
||||||
end
|
end
|
||||||
controller_host = host
|
controller_host = host
|
||||||
|
|
@ -2437,8 +2408,6 @@ function StartDebug(host, port)
|
||||||
return debugger_receiveDebugBreakInfo, debugger_xpcall
|
return debugger_receiveDebugBreakInfo, debugger_xpcall
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--base64
|
--base64
|
||||||
|
|
||||||
local string = string
|
local string = string
|
||||||
|
|
@ -2448,10 +2417,10 @@ ZZBase64.__code = {
|
||||||
'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',
|
'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',
|
||||||
'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
|
'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
|
||||||
'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/',
|
'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/',
|
||||||
};
|
};
|
||||||
ZZBase64.__decode = {}
|
ZZBase64.__decode = {}
|
||||||
for k,v in pairs(ZZBase64.__code) do
|
for k, v in pairs(ZZBase64.__code) do
|
||||||
ZZBase64.__decode[string.byte(v,1)] = k - 1
|
ZZBase64.__decode[string.byte(v, 1)] = k - 1
|
||||||
end
|
end
|
||||||
|
|
||||||
function ZZBase64.encode(text)
|
function ZZBase64.encode(text)
|
||||||
|
|
@ -2461,14 +2430,14 @@ function ZZBase64.encode(text)
|
||||||
local res = {}
|
local res = {}
|
||||||
local index = 1
|
local index = 1
|
||||||
for i = 1, len, 3 do
|
for i = 1, len, 3 do
|
||||||
local a = string.byte(text, i )
|
local a = string.byte(text, i)
|
||||||
local b = string.byte(text, i + 1)
|
local b = string.byte(text, i + 1)
|
||||||
local c = string.byte(text, i + 2)
|
local c = string.byte(text, i + 2)
|
||||||
-- num = a<<16 + b<<8 + c
|
-- num = a<<16 + b<<8 + c
|
||||||
local num = a * 65536 + b * 256 + c
|
local num = a * 65536 + b * 256 + c
|
||||||
for j = 1, 4 do
|
for j = 1, 4 do
|
||||||
--tmp = num >> ((4 -j) * 6)
|
--tmp = num >> ((4 -j) * 6)
|
||||||
local tmp = math.floor(num / (2 ^ ((4-j) * 6)))
|
local tmp = math.floor(num / (2 ^ ((4 - j) * 6)))
|
||||||
--curPos = tmp&0x3f
|
--curPos = tmp&0x3f
|
||||||
local curPos = tmp % 64 + 1
|
local curPos = tmp % 64 + 1
|
||||||
res[index] = ZZBase64.__code[curPos]
|
res[index] = ZZBase64.__code[curPos]
|
||||||
|
|
@ -2505,13 +2474,13 @@ function ZZBase64.__left2(res, index, text, len)
|
||||||
res[index + 3] = "="
|
res[index + 3] = "="
|
||||||
end
|
end
|
||||||
|
|
||||||
function ZZBase64.__left1(res, index,text, len)
|
function ZZBase64.__left1(res, index, text, len)
|
||||||
local num = string.byte(text, len + 1)
|
local num = string.byte(text, len + 1)
|
||||||
num = num * 16
|
num = num * 16
|
||||||
|
|
||||||
local tmp = math.floor(num / 64)
|
local tmp = math.floor(num / 64)
|
||||||
local curPos = tmp % 64 + 1
|
local curPos = tmp % 64 + 1
|
||||||
res[index ] = ZZBase64.__code[curPos]
|
res[index] = ZZBase64.__code[curPos]
|
||||||
|
|
||||||
curPos = num % 64 + 1
|
curPos = num % 64 + 1
|
||||||
res[index + 1] = ZZBase64.__code[curPos]
|
res[index + 1] = ZZBase64.__code[curPos]
|
||||||
|
|
@ -2534,11 +2503,11 @@ function ZZBase64.decode(text)
|
||||||
local res = {}
|
local res = {}
|
||||||
local index = 1
|
local index = 1
|
||||||
local decode = ZZBase64.__decode
|
local decode = ZZBase64.__decode
|
||||||
for i =1, len, 4 do
|
for i = 1, len, 4 do
|
||||||
local a = decode[string.byte(text,i )]
|
local a = decode[string.byte(text, i)]
|
||||||
local b = decode[string.byte(text,i + 1)]
|
local b = decode[string.byte(text, i + 1)]
|
||||||
local c = decode[string.byte(text,i + 2)]
|
local c = decode[string.byte(text, i + 2)]
|
||||||
local d = decode[string.byte(text,i + 3)]
|
local d = decode[string.byte(text, i + 3)]
|
||||||
|
|
||||||
--num = a<<18 + b<<12 + c<<6 + d
|
--num = a<<18 + b<<12 + c<<6 + d
|
||||||
local num = a * 262144 + b * 4096 + c * 64 + d
|
local num = a * 262144 + b * 4096 + c * 64 + d
|
||||||
|
|
@ -2547,7 +2516,7 @@ function ZZBase64.decode(text)
|
||||||
num = math.floor(num / 256)
|
num = math.floor(num / 256)
|
||||||
local f = string.char(num % 256)
|
local f = string.char(num % 256)
|
||||||
num = math.floor(num / 256)
|
num = math.floor(num / 256)
|
||||||
res[index ] = string.char(num % 256)
|
res[index] = string.char(num % 256)
|
||||||
res[index + 1] = f
|
res[index + 1] = f
|
||||||
res[index + 2] = e
|
res[index + 2] = e
|
||||||
index = index + 3
|
index = index + 3
|
||||||
|
|
@ -2583,7 +2552,4 @@ function ZZBase64.__decodeLeft2(res, index, text, len)
|
||||||
res[index] = string.char(num)
|
res[index] = string.char(num)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return StartDebug
|
return StartDebug
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
local debugger_reLoadFile =nil
|
local debugger_reLoadFile = nil
|
||||||
xpcall(function()
|
xpcall(function()
|
||||||
debugger_reLoadFile = require("luaideReLoadFile")
|
debugger_reLoadFile = require("luaideReLoadFile")
|
||||||
end,function()
|
end, function()
|
||||||
debugger_reLoadFile = function() print("未实现代码重载") end
|
debugger_reLoadFile = function() print("未实现代码重载") end
|
||||||
end)
|
end)
|
||||||
local debugger_stackInfo = nil
|
local debugger_stackInfo = nil
|
||||||
|
|
@ -392,6 +392,7 @@ local function createJson()
|
||||||
function json.null()
|
function json.null()
|
||||||
return json.null -- so json.null() will also return null ;-)
|
return json.null -- so json.null() will also return null ;-)
|
||||||
end
|
end
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
-- Internal, PRIVATE functions.
|
-- Internal, PRIVATE functions.
|
||||||
-- Following a Python-like convention, I have prefixed all these 'PRIVATE'
|
-- Following a Python-like convention, I have prefixed all these 'PRIVATE'
|
||||||
|
|
@ -449,8 +450,8 @@ local function createJson()
|
||||||
-- @return object, int The object (true, false or nil) and the position at which the next character should be
|
-- @return object, int The object (true, false or nil) and the position at which the next character should be
|
||||||
-- scanned.
|
-- scanned.
|
||||||
function decode_scanConstant(s, startPos)
|
function decode_scanConstant(s, startPos)
|
||||||
local consts = {["true"] = true, ["false"] = false, ["null"] = nil}
|
local consts = { ["true"] = true, ["false"] = false, ["null"] = nil }
|
||||||
local constNames = {"true", "false", "null"}
|
local constNames = { "true", "false", "null" }
|
||||||
|
|
||||||
for i, k in pairs(constNames) do
|
for i, k in pairs(constNames) do
|
||||||
if string.sub(s, startPos, startPos + string.len(k) - 1) == k then
|
if string.sub(s, startPos, startPos + string.len(k) - 1) == k then
|
||||||
|
|
@ -776,17 +777,17 @@ function print(...)
|
||||||
end
|
end
|
||||||
if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then
|
if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then
|
||||||
if (debug_server) then
|
if (debug_server) then
|
||||||
local arg = {...} --这里的...和{}符号中间需要有空格号,否则会出错
|
local arg = { ... } --这里的...和{}符号中间需要有空格号,否则会出错
|
||||||
local str = ""
|
local str = ""
|
||||||
if (#arg == 0) then
|
if (#arg == 0) then
|
||||||
arg = {"nil"}
|
arg = { "nil" }
|
||||||
end
|
end
|
||||||
for k, v in pairs(arg) do
|
for k, v in pairs(arg) do
|
||||||
str = str .. tostring(v) .. "\t"
|
str = str .. tostring(v) .. "\t"
|
||||||
end
|
end
|
||||||
local sendMsg = {
|
local sendMsg = {
|
||||||
event = LuaDebugger.event.C2S_LuaPrint,
|
event = LuaDebugger.event.C2S_LuaPrint,
|
||||||
data = {msg = ZZBase64.encode(str), type = 1}
|
data = { msg = ZZBase64.encode(str), type = 1 }
|
||||||
}
|
}
|
||||||
local sendStr = json.encode(sendMsg)
|
local sendStr = json.encode(sendMsg)
|
||||||
debug_server:send(sendStr .. "__debugger_k0204__")
|
debug_server:send(sendStr .. "__debugger_k0204__")
|
||||||
|
|
@ -800,46 +801,48 @@ function luaIdePrintWarn(...)
|
||||||
end
|
end
|
||||||
if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then
|
if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then
|
||||||
if (debug_server) then
|
if (debug_server) then
|
||||||
local arg = {...} --这里的...和{}符号中间需要有空格号,否则会出错
|
local arg = { ... } --这里的...和{}符号中间需要有空格号,否则会出错
|
||||||
local str = ""
|
local str = ""
|
||||||
if (#arg == 0) then
|
if (#arg == 0) then
|
||||||
arg = {"nil"}
|
arg = { "nil" }
|
||||||
end
|
end
|
||||||
for k, v in pairs(arg) do
|
for k, v in pairs(arg) do
|
||||||
str = str .. tostring(v) .. "\t"
|
str = str .. tostring(v) .. "\t"
|
||||||
end
|
end
|
||||||
local sendMsg = {
|
local sendMsg = {
|
||||||
event = LuaDebugger.event.C2S_LuaPrint,
|
event = LuaDebugger.event.C2S_LuaPrint,
|
||||||
data = {msg = ZZBase64.encode(str), type = 2}
|
data = { msg = ZZBase64.encode(str), type = 2 }
|
||||||
}
|
}
|
||||||
local sendStr = json.encode(sendMsg)
|
local sendStr = json.encode(sendMsg)
|
||||||
debug_server:send(sendStr .. "__debugger_k0204__")
|
debug_server:send(sendStr .. "__debugger_k0204__")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function luaIdePrintErr(...)
|
function luaIdePrintErr(...)
|
||||||
if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 3) then
|
if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 3) then
|
||||||
debugger_print(...)
|
debugger_print(...)
|
||||||
end
|
end
|
||||||
if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then
|
if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then
|
||||||
if (debug_server) then
|
if (debug_server) then
|
||||||
local arg = {...} --这里的...和{}符号中间需要有空格号,否则会出错
|
local arg = { ... } --这里的...和{}符号中间需要有空格号,否则会出错
|
||||||
local str = ""
|
local str = ""
|
||||||
if (#arg == 0) then
|
if (#arg == 0) then
|
||||||
arg = {"nil"}
|
arg = { "nil" }
|
||||||
end
|
end
|
||||||
for k, v in pairs(arg) do
|
for k, v in pairs(arg) do
|
||||||
str = str .. tostring(v) .. "\t"
|
str = str .. tostring(v) .. "\t"
|
||||||
end
|
end
|
||||||
local sendMsg = {
|
local sendMsg = {
|
||||||
event = LuaDebugger.event.C2S_LuaPrint,
|
event = LuaDebugger.event.C2S_LuaPrint,
|
||||||
data = {msg = ZZBase64.encode(str), type = 3}
|
data = { msg = ZZBase64.encode(str), type = 3 }
|
||||||
}
|
}
|
||||||
local sendStr = json.encode(sendMsg)
|
local sendStr = json.encode(sendMsg)
|
||||||
debug_server:send(sendStr .. "__debugger_k0204__")
|
debug_server:send(sendStr .. "__debugger_k0204__")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--@endregion
|
--@endregion
|
||||||
|
|
||||||
--@region 辅助方法
|
--@region 辅助方法
|
||||||
|
|
@ -1035,9 +1038,7 @@ local function debugger_valueToString(v)
|
||||||
local vstr = nil
|
local vstr = nil
|
||||||
if (vtype == "userdata") then
|
if (vtype == "userdata") then
|
||||||
if (LuaDebugger.isFoxGloryProject) then
|
if (LuaDebugger.isFoxGloryProject) then
|
||||||
|
return "userdata", vtype
|
||||||
return "userdata",vtype
|
|
||||||
|
|
||||||
else
|
else
|
||||||
return tostring(v), vtype
|
return tostring(v), vtype
|
||||||
end
|
end
|
||||||
|
|
@ -1045,11 +1046,11 @@ local function debugger_valueToString(v)
|
||||||
local value = vtype
|
local value = vtype
|
||||||
xpcall(function()
|
xpcall(function()
|
||||||
value = tostring(v)
|
value = tostring(v)
|
||||||
end,function()
|
end, function()
|
||||||
value = vtype
|
value = vtype
|
||||||
end)
|
end)
|
||||||
return value, vtype
|
return value, vtype
|
||||||
elseif (vtype == "number" or vtype == "string" ) then
|
elseif (vtype == "number" or vtype == "string") then
|
||||||
return v, vtype
|
return v, vtype
|
||||||
else
|
else
|
||||||
return tostring(v), vtype
|
return tostring(v), vtype
|
||||||
|
|
@ -1057,12 +1058,12 @@ local function debugger_valueToString(v)
|
||||||
end
|
end
|
||||||
local function debugger_setVarInfo(name, value)
|
local function debugger_setVarInfo(name, value)
|
||||||
local valueStr, valueType = debugger_valueToString(value)
|
local valueStr, valueType = debugger_valueToString(value)
|
||||||
local nameStr,nameType = debugger_valueToString(name)
|
local nameStr, nameType = debugger_valueToString(name)
|
||||||
if(valueStr == nil) then
|
if (valueStr == nil) then
|
||||||
valueStr = valueType
|
valueStr = valueType
|
||||||
end
|
end
|
||||||
local valueInfo = {
|
local valueInfo = {
|
||||||
name =nameStr,
|
name = nameStr,
|
||||||
valueType = valueType,
|
valueType = valueType,
|
||||||
valueStr = ZZBase64.encode(valueStr)
|
valueStr = ZZBase64.encode(valueStr)
|
||||||
}
|
}
|
||||||
|
|
@ -1100,7 +1101,7 @@ local function debugger_getvalue(f)
|
||||||
i = i + 1
|
i = i + 1
|
||||||
end
|
end
|
||||||
|
|
||||||
return {locals = locals, ups = ups}
|
return { locals = locals, ups = ups }
|
||||||
end
|
end
|
||||||
--获取堆栈
|
--获取堆栈
|
||||||
debugger_stackInfo =
|
debugger_stackInfo =
|
||||||
|
|
@ -1146,7 +1147,7 @@ debugger_stackInfo =
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local stackInfo = {stack = stack, vars = varInfos, funcs = funcs}
|
local stackInfo = { stack = stack, vars = varInfos, funcs = funcs }
|
||||||
local data = {
|
local data = {
|
||||||
stack = stackInfo.stack,
|
stack = stackInfo.stack,
|
||||||
vars = stackInfo.vars,
|
vars = stackInfo.vars,
|
||||||
|
|
@ -1157,7 +1158,7 @@ debugger_stackInfo =
|
||||||
}
|
}
|
||||||
LuaDebugger.currentTempFunc = data.funcs[1]
|
LuaDebugger.currentTempFunc = data.funcs[1]
|
||||||
return data
|
return data
|
||||||
end
|
end
|
||||||
|
|
||||||
--===========================点断信息==================================================
|
--===========================点断信息==================================================
|
||||||
--根据不同的游戏引擎进行定时获取断点信息
|
--根据不同的游戏引擎进行定时获取断点信息
|
||||||
|
|
@ -1172,7 +1173,7 @@ local function debugger_receiveDebugBreakInfo()
|
||||||
end
|
end
|
||||||
if (breakInfoSocket) then
|
if (breakInfoSocket) then
|
||||||
local msg, status = breakInfoSocket:receive()
|
local msg, status = breakInfoSocket:receive()
|
||||||
if(LuaDebugger.isLaunch and status == "closed") then
|
if (LuaDebugger.isLaunch and status == "closed") then
|
||||||
os.exit()
|
os.exit()
|
||||||
end
|
end
|
||||||
if (msg) then
|
if (msg) then
|
||||||
|
|
@ -1182,12 +1183,12 @@ local function debugger_receiveDebugBreakInfo()
|
||||||
elseif netData.event == LuaDebugger.event.S2C_LoadLuaScript then
|
elseif netData.event == LuaDebugger.event.S2C_LoadLuaScript then
|
||||||
LuaDebugger.loadScriptBody = netData.data
|
LuaDebugger.loadScriptBody = netData.data
|
||||||
debugger_exeLuaString()
|
debugger_exeLuaString()
|
||||||
debugger_sendMsg(breakInfoSocket,LuaDebugger.event.C2S_LoadLuaScript,LuaDebugger.loadScriptBody)
|
debugger_sendMsg(breakInfoSocket, LuaDebugger.event.C2S_LoadLuaScript, LuaDebugger.loadScriptBody)
|
||||||
elseif netData.event == LuaDebugger.event.S2C_ReLoadFile then
|
elseif netData.event == LuaDebugger.event.S2C_ReLoadFile then
|
||||||
LuaDebugger.reLoadFileBody = netData.data
|
LuaDebugger.reLoadFileBody = netData.data
|
||||||
LuaDebugger.isReLoadFile = false
|
LuaDebugger.isReLoadFile = false
|
||||||
LuaDebugger.reLoadFileBody.isReLoad = debugger_reLoadFile(LuaDebugger.reLoadFileBody)
|
LuaDebugger.reLoadFileBody.isReLoad = debugger_reLoadFile(LuaDebugger.reLoadFileBody)
|
||||||
print("重载结果:",LuaDebugger.reLoadFileBody.isReLoad)
|
print("重载结果:", LuaDebugger.reLoadFileBody.isReLoad)
|
||||||
LuaDebugger.reLoadFileBody.script = nil
|
LuaDebugger.reLoadFileBody.script = nil
|
||||||
debugger_sendMsg(
|
debugger_sendMsg(
|
||||||
breakInfoSocket,
|
breakInfoSocket,
|
||||||
|
|
@ -1290,7 +1291,7 @@ debugger_setBreak =
|
||||||
end
|
end
|
||||||
LuaDebugger.isHook = false
|
LuaDebugger.isHook = false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local function debugger_checkFileIsBreak(fileName)
|
local function debugger_checkFileIsBreak(fileName)
|
||||||
return LuaDebugger.breakInfos[fileName]
|
return LuaDebugger.breakInfos[fileName]
|
||||||
end
|
end
|
||||||
|
|
@ -1322,7 +1323,7 @@ function debugger_conditionStr(condition, vars, callBack)
|
||||||
currentTabble[k] = v
|
currentTabble[k] = v
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
setmetatable(currentTabble, {__index = _G})
|
setmetatable(currentTabble, { __index = _G })
|
||||||
local fun = loadstring("return " .. condition)
|
local fun = loadstring("return " .. condition)
|
||||||
setfenv(fun, currentTabble)
|
setfenv(fun, currentTabble)
|
||||||
return fun()
|
return fun()
|
||||||
|
|
@ -1339,14 +1340,13 @@ function debugger_conditionStr(condition, vars, callBack)
|
||||||
callBack()
|
callBack()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--执行lua字符串
|
--执行lua字符串
|
||||||
debugger_exeLuaString = function()
|
debugger_exeLuaString = function()
|
||||||
|
|
||||||
local function loadScript()
|
local function loadScript()
|
||||||
|
|
||||||
local script = LuaDebugger.loadScriptBody.script
|
local script = LuaDebugger.loadScriptBody.script
|
||||||
if (LuaDebugger.loadScriptBody.isBreak) then
|
if (LuaDebugger.loadScriptBody.isBreak) then
|
||||||
local currentTabble = {_G = _G}
|
local currentTabble = { _G = _G }
|
||||||
local frameId = LuaDebugger.loadScriptBody.frameId
|
local frameId = LuaDebugger.loadScriptBody.frameId
|
||||||
frameId = frameId
|
frameId = frameId
|
||||||
local func = LuaDebugger.currentDebuggerData.funcs[frameId]
|
local func = LuaDebugger.currentDebuggerData.funcs[frameId]
|
||||||
|
|
@ -1359,7 +1359,7 @@ debugger_exeLuaString = function()
|
||||||
for k, v in pairs(locals) do
|
for k, v in pairs(locals) do
|
||||||
currentTabble[k] = v
|
currentTabble[k] = v
|
||||||
end
|
end
|
||||||
setmetatable(currentTabble, {__index = _G})
|
setmetatable(currentTabble, { __index = _G })
|
||||||
|
|
||||||
local fun = loadstring(script)
|
local fun = loadstring(script)
|
||||||
setfenv(fun, currentTabble)
|
setfenv(fun, currentTabble)
|
||||||
|
|
@ -1374,50 +1374,47 @@ debugger_exeLuaString = function()
|
||||||
xpcall(
|
xpcall(
|
||||||
loadScript,
|
loadScript,
|
||||||
function(error)
|
function(error)
|
||||||
|
|
||||||
-- debugger_sendMsg(debug_server, LuaDebugger.event.C2S_LoadLuaScript, LuaDebugger.loadScriptBody)
|
-- debugger_sendMsg(debug_server, LuaDebugger.event.C2S_LoadLuaScript, LuaDebugger.loadScriptBody)
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
LuaDebugger.loadScriptBody.script = nil
|
LuaDebugger.loadScriptBody.script = nil
|
||||||
if (LuaDebugger.loadScriptBody.isBreak) then
|
if (LuaDebugger.loadScriptBody.isBreak) then
|
||||||
LuaDebugger.serVarLevel = LuaDebugger.serVarLevel+1
|
LuaDebugger.serVarLevel = LuaDebugger.serVarLevel + 1
|
||||||
LuaDebugger.currentDebuggerData = debugger_stackInfo(LuaDebugger.serVarLevel, LuaDebugger.event.C2S_HITBreakPoint)
|
LuaDebugger.currentDebuggerData = debugger_stackInfo(LuaDebugger.serVarLevel, LuaDebugger.event
|
||||||
|
.C2S_HITBreakPoint)
|
||||||
LuaDebugger.loadScriptBody.stack = LuaDebugger.currentDebuggerData.stack
|
LuaDebugger.loadScriptBody.stack = LuaDebugger.currentDebuggerData.stack
|
||||||
end
|
end
|
||||||
LuaDebugger.loadScriptBody.complete = true
|
LuaDebugger.loadScriptBody.complete = true
|
||||||
|
|
||||||
end
|
end
|
||||||
--@region 调试中修改变量值
|
--@region 调试中修改变量值
|
||||||
|
|
||||||
|
|
||||||
--根据key 值在 value 查找
|
--根据key 值在 value 查找
|
||||||
local function debugger_getTablekey(key,keyType,value)
|
local function debugger_getTablekey(key, keyType, value)
|
||||||
if(keyType == -1) then
|
if (keyType == -1) then
|
||||||
return key
|
return key
|
||||||
elseif(keyType == 1) then
|
elseif (keyType == 1) then
|
||||||
return tonumber(key)
|
return tonumber(key)
|
||||||
elseif(keyType == 2) then
|
elseif (keyType == 2) then
|
||||||
local valueKey = nil
|
local valueKey = nil
|
||||||
for k,v in pairs(value) do
|
for k, v in pairs(value) do
|
||||||
local nameType = type(k)
|
local nameType = type(k)
|
||||||
if(nameType == "userdata" or nameType == "table") then
|
if (nameType == "userdata" or nameType == "table") then
|
||||||
if (not LuaDebugger.isFoxGloryProject) then
|
if (not LuaDebugger.isFoxGloryProject) then
|
||||||
valueKey = tostring(k)
|
valueKey = tostring(k)
|
||||||
if(key == valueKey) then
|
if (key == valueKey) then
|
||||||
return k
|
return k
|
||||||
end
|
end
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function debugger_setVarValue(server, data)
|
local function debugger_setVarValue(server, data)
|
||||||
|
|
||||||
local newValue = nil
|
local newValue = nil
|
||||||
local level = LuaDebugger.serVarLevel+LuaDebugger.setVarBody.frameId
|
local level = LuaDebugger.serVarLevel + LuaDebugger.setVarBody.frameId
|
||||||
local firstKeyName = data.keys[1]
|
local firstKeyName = data.keys[1]
|
||||||
--@region vars check
|
--@region vars check
|
||||||
local localValueChangeIndex = -1
|
local localValueChangeIndex = -1
|
||||||
|
|
@ -1432,7 +1429,7 @@ local function debugger_setVarValue(server, data)
|
||||||
if not name then
|
if not name then
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
if(firstKeyName == name) then
|
if (firstKeyName == name) then
|
||||||
localValueChangeIndex = i
|
localValueChangeIndex = i
|
||||||
oldValue = value
|
oldValue = value
|
||||||
end
|
end
|
||||||
|
|
@ -1450,7 +1447,7 @@ local function debugger_setVarValue(server, data)
|
||||||
if not name then
|
if not name then
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
if(localValueChangeIndex == -1 and firstKeyName == name) then
|
if (localValueChangeIndex == -1 and firstKeyName == name) then
|
||||||
upValueFun = func
|
upValueFun = func
|
||||||
oldValue = value
|
oldValue = value
|
||||||
upValueChangeIndex = i
|
upValueChangeIndex = i
|
||||||
|
|
@ -1462,8 +1459,8 @@ local function debugger_setVarValue(server, data)
|
||||||
end
|
end
|
||||||
i = i + 1
|
i = i + 1
|
||||||
end
|
end
|
||||||
--@endregion
|
--@endregion
|
||||||
local vars = {locals = locals, ups = ups}
|
local vars = { locals = locals, ups = ups }
|
||||||
|
|
||||||
local function loadScript()
|
local function loadScript()
|
||||||
local currentTabble = {}
|
local currentTabble = {}
|
||||||
|
|
@ -1480,7 +1477,7 @@ local function debugger_setVarValue(server, data)
|
||||||
currentTabble[k] = v
|
currentTabble[k] = v
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
setmetatable(currentTabble, {__index = _G})
|
setmetatable(currentTabble, { __index = _G })
|
||||||
local fun = loadstring("return " .. data.value)
|
local fun = loadstring("return " .. data.value)
|
||||||
setfenv(fun, currentTabble)
|
setfenv(fun, currentTabble)
|
||||||
newValue = fun()
|
newValue = fun()
|
||||||
|
|
@ -1499,39 +1496,37 @@ local function debugger_setVarValue(server, data)
|
||||||
-- local 查找并替换
|
-- local 查找并替换
|
||||||
local keyLength = #data.keys
|
local keyLength = #data.keys
|
||||||
|
|
||||||
if(keyLength == 1) then
|
if (keyLength == 1) then
|
||||||
if(localValueChangeIndex ~= -1) then
|
if (localValueChangeIndex ~= -1) then
|
||||||
|
|
||||||
debug.setlocal(level, localValueChangeIndex, newValue)
|
debug.setlocal(level, localValueChangeIndex, newValue)
|
||||||
elseif(upValueFun ~= nil) then
|
elseif (upValueFun ~= nil) then
|
||||||
debug.setupvalue( upValueFun, upValueChangeIndex, newValue )
|
debug.setupvalue(upValueFun, upValueChangeIndex, newValue)
|
||||||
else
|
else
|
||||||
--全局变量查找
|
--全局变量查找
|
||||||
if(_G[firstKeyName]) then
|
if (_G[firstKeyName]) then
|
||||||
_G[firstKeyName] = newValue
|
_G[firstKeyName] = newValue
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if(not oldValue) then
|
if (not oldValue) then
|
||||||
if(_G[firstKeyName]) then
|
if (_G[firstKeyName]) then
|
||||||
oldValue = _G[firstKeyName]
|
oldValue = _G[firstKeyName]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local tempValue = oldValue
|
local tempValue = oldValue
|
||||||
for i=2,keyLength-1 do
|
for i = 2, keyLength - 1 do
|
||||||
if(tempValue) then
|
if (tempValue) then
|
||||||
oldValue = oldValue[debugger_getTablekey(data.keys[i],data.numberTypes[i],oldValue)]
|
oldValue = oldValue[debugger_getTablekey(data.keys[i], data.numberTypes[i], oldValue)]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if(tempValue) then
|
if (tempValue) then
|
||||||
oldValue[debugger_getTablekey(data.keys[keyLength],data.numberTypes[keyLength],oldValue)] = newValue
|
oldValue[debugger_getTablekey(data.keys[keyLength], data.numberTypes[keyLength], oldValue)] = newValue
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local varInfo = debugger_setVarInfo(data.varName, newValue)
|
local varInfo = debugger_setVarInfo(data.varName, newValue)
|
||||||
data.varInfo = varInfo
|
data.varInfo = varInfo
|
||||||
LuaDebugger.serVarLevel = LuaDebugger.serVarLevel+1
|
LuaDebugger.serVarLevel = LuaDebugger.serVarLevel + 1
|
||||||
LuaDebugger.currentDebuggerData = debugger_stackInfo(LuaDebugger.serVarLevel, LuaDebugger.event.C2S_HITBreakPoint)
|
LuaDebugger.currentDebuggerData = debugger_stackInfo(LuaDebugger.serVarLevel, LuaDebugger.event.C2S_HITBreakPoint)
|
||||||
|
|
||||||
end
|
end
|
||||||
--@endregion
|
--@endregion
|
||||||
|
|
||||||
|
|
@ -1543,8 +1538,8 @@ checkSetVar =
|
||||||
function()
|
function()
|
||||||
if (LuaDebugger.isSetVar) then
|
if (LuaDebugger.isSetVar) then
|
||||||
LuaDebugger.isSetVar = false
|
LuaDebugger.isSetVar = false
|
||||||
debugger_setVarValue(debug_server,LuaDebugger.setVarBody)
|
debugger_setVarValue(debug_server, LuaDebugger.setVarBody)
|
||||||
LuaDebugger.serVarLevel = LuaDebugger.serVarLevel+1
|
LuaDebugger.serVarLevel = LuaDebugger.serVarLevel + 1
|
||||||
_resume(coro_debugger, LuaDebugger.setVarBody)
|
_resume(coro_debugger, LuaDebugger.setVarBody)
|
||||||
xpcall(
|
xpcall(
|
||||||
checkSetVar,
|
checkSetVar,
|
||||||
|
|
@ -1552,10 +1547,10 @@ checkSetVar =
|
||||||
print("设置变量", error)
|
print("设置变量", error)
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
elseif(LuaDebugger.isLoadLuaScript) then
|
elseif (LuaDebugger.isLoadLuaScript) then
|
||||||
LuaDebugger.isLoadLuaScript = false
|
LuaDebugger.isLoadLuaScript = false
|
||||||
debugger_exeLuaString()
|
debugger_exeLuaString()
|
||||||
LuaDebugger.serVarLevel = LuaDebugger.serVarLevel+1
|
LuaDebugger.serVarLevel = LuaDebugger.serVarLevel + 1
|
||||||
_resume(coro_debugger, LuaDebugger.reLoadFileBody)
|
_resume(coro_debugger, LuaDebugger.reLoadFileBody)
|
||||||
xpcall(
|
xpcall(
|
||||||
checkSetVar,
|
checkSetVar,
|
||||||
|
|
@ -1563,12 +1558,12 @@ checkSetVar =
|
||||||
print("执行代码", error)
|
print("执行代码", error)
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
elseif(LuaDebugger.isReLoadFile) then
|
elseif (LuaDebugger.isReLoadFile) then
|
||||||
LuaDebugger.isReLoadFile = false
|
LuaDebugger.isReLoadFile = false
|
||||||
LuaDebugger.reLoadFileBody.isReLoad = debugger_reLoadFile(LuaDebugger.reLoadFileBody)
|
LuaDebugger.reLoadFileBody.isReLoad = debugger_reLoadFile(LuaDebugger.reLoadFileBody)
|
||||||
print("重载结果:",LuaDebugger.reLoadFileBody.isReLoad)
|
print("重载结果:", LuaDebugger.reLoadFileBody.isReLoad)
|
||||||
LuaDebugger.reLoadFileBody.script = nil
|
LuaDebugger.reLoadFileBody.script = nil
|
||||||
LuaDebugger.serVarLevel = LuaDebugger.serVarLevel+1
|
LuaDebugger.serVarLevel = LuaDebugger.serVarLevel + 1
|
||||||
_resume(coro_debugger, LuaDebugger.reLoadFileBody)
|
_resume(coro_debugger, LuaDebugger.reLoadFileBody)
|
||||||
xpcall(
|
xpcall(
|
||||||
checkSetVar,
|
checkSetVar,
|
||||||
|
|
@ -1577,7 +1572,7 @@ checkSetVar =
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1894,7 +1889,6 @@ local function debugger_sendTableValues(value, server, variablesReference, debug
|
||||||
vinfos = {}
|
vinfos = {}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
m = getmetatable(value)
|
m = getmetatable(value)
|
||||||
|
|
@ -1944,7 +1938,6 @@ local function debugger_getBreakVar(body, server)
|
||||||
if (value) then
|
if (value) then
|
||||||
local valueType = type(value)
|
local valueType = type(value)
|
||||||
if (valueType == "table" or valueType == "userdata") then
|
if (valueType == "table" or valueType == "userdata") then
|
||||||
|
|
||||||
debugger_sendTableValues(value, server, variablesReference, debugSpeedIndex)
|
debugger_sendTableValues(value, server, variablesReference, debugSpeedIndex)
|
||||||
else
|
else
|
||||||
if (valueType == "function") then
|
if (valueType == "function") then
|
||||||
|
|
@ -2018,7 +2011,7 @@ local function debugger_loop(server)
|
||||||
while true do
|
while true do
|
||||||
local line, status = server:receive()
|
local line, status = server:receive()
|
||||||
if (status == "closed") then
|
if (status == "closed") then
|
||||||
if(LuaDebugger.isLaunch) then
|
if (LuaDebugger.isLaunch) then
|
||||||
os.exit()
|
os.exit()
|
||||||
else
|
else
|
||||||
debug.sethook()
|
debug.sethook()
|
||||||
|
|
@ -2030,13 +2023,12 @@ local function debugger_loop(server)
|
||||||
local event = netData.event
|
local event = netData.event
|
||||||
local body = netData.data
|
local body = netData.data
|
||||||
if (event == LuaDebugger.event.S2C_DebugClose) then
|
if (event == LuaDebugger.event.S2C_DebugClose) then
|
||||||
if(LuaDebugger.isLaunch) then
|
if (LuaDebugger.isLaunch) then
|
||||||
os.exit()
|
os.exit()
|
||||||
else
|
else
|
||||||
debug.sethook()
|
debug.sethook()
|
||||||
coroutine.yield()
|
coroutine.yield()
|
||||||
end
|
end
|
||||||
|
|
||||||
elseif event == LuaDebugger.event.S2C_SetBreakPoints then
|
elseif event == LuaDebugger.event.S2C_SetBreakPoints then
|
||||||
--设置断点信息
|
--设置断点信息
|
||||||
local function setB()
|
local function setB()
|
||||||
|
|
@ -2156,29 +2148,26 @@ local function debugger_loop(server)
|
||||||
end
|
end
|
||||||
coro_debugger = coroutine.create(debugger_loop)
|
coro_debugger = coroutine.create(debugger_loop)
|
||||||
debug_hook = function(event, line)
|
debug_hook = function(event, line)
|
||||||
|
if (not LuaDebugger.isHook) then
|
||||||
if(not LuaDebugger.isHook) then
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if(LuaDebugger.Run) then
|
if (LuaDebugger.Run) then
|
||||||
if(event == "line") then
|
if (event == "line") then
|
||||||
local isCheck = false
|
local isCheck = false
|
||||||
for k, breakInfo in pairs(LuaDebugger.breakInfos) do
|
for k, breakInfo in pairs(LuaDebugger.breakInfos) do
|
||||||
|
|
||||||
for bk, linesInfo in pairs(breakInfo) do
|
for bk, linesInfo in pairs(breakInfo) do
|
||||||
|
if (linesInfo.lines and linesInfo.lines[line]) then
|
||||||
if(linesInfo.lines and linesInfo.lines[line]) then
|
|
||||||
isCheck = true
|
isCheck = true
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if(isCheck) then
|
if (isCheck) then
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if(not isCheck) then
|
if (not isCheck) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|
@ -2259,7 +2248,6 @@ debug_hook = function(event, line)
|
||||||
local breakInfo = LuaDebugger.breakInfos[file]
|
local breakInfo = LuaDebugger.breakInfos[file]
|
||||||
local breakData = nil
|
local breakData = nil
|
||||||
if (breakInfo) then
|
if (breakInfo) then
|
||||||
|
|
||||||
local ischeck = false
|
local ischeck = false
|
||||||
for k, lineInfo in pairs(breakInfo) do
|
for k, lineInfo in pairs(breakInfo) do
|
||||||
local lines = lineInfo.lines
|
local lines = lineInfo.lines
|
||||||
|
|
@ -2299,13 +2287,13 @@ debug_hook = function(event, line)
|
||||||
end
|
end
|
||||||
pathNamesCount = pathNamesCount - 1
|
pathNamesCount = pathNamesCount - 1
|
||||||
hitPathNamesCount = hitPathNamesCount - 1
|
hitPathNamesCount = hitPathNamesCount - 1
|
||||||
checkCount = checkCount+1
|
checkCount = checkCount + 1
|
||||||
|
|
||||||
if (pathNamesCount <= 0 or hitPathNamesCount <= 0) then
|
if (pathNamesCount <= 0 or hitPathNamesCount <= 0) then
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if(checkCount>0) then
|
if (checkCount > 0) then
|
||||||
break;
|
break;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|
@ -2384,7 +2372,7 @@ end
|
||||||
local function debugger_xpcall()
|
local function debugger_xpcall()
|
||||||
--调用 coro_debugger 并传入 参数
|
--调用 coro_debugger 并传入 参数
|
||||||
local data = debugger_stackInfo(4, LuaDebugger.event.C2S_HITBreakPoint)
|
local data = debugger_stackInfo(4, LuaDebugger.event.C2S_HITBreakPoint)
|
||||||
if(data.stack and data.stack[1]) then
|
if (data.stack and data.stack[1]) then
|
||||||
data.stack[1].isXpCall = true
|
data.stack[1].isXpCall = true
|
||||||
end
|
end
|
||||||
--挂起等待调试器作出反应
|
--挂起等待调试器作出反应
|
||||||
|
|
@ -2478,8 +2466,8 @@ ZZBase64.__code = {
|
||||||
'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/',
|
'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/',
|
||||||
};
|
};
|
||||||
ZZBase64.__decode = {}
|
ZZBase64.__decode = {}
|
||||||
for k,v in pairs(ZZBase64.__code) do
|
for k, v in pairs(ZZBase64.__code) do
|
||||||
ZZBase64.__decode[string.byte(v,1)] = k - 1
|
ZZBase64.__decode[string.byte(v, 1)] = k - 1
|
||||||
end
|
end
|
||||||
|
|
||||||
function ZZBase64.encode(text)
|
function ZZBase64.encode(text)
|
||||||
|
|
@ -2489,14 +2477,14 @@ function ZZBase64.encode(text)
|
||||||
local res = {}
|
local res = {}
|
||||||
local index = 1
|
local index = 1
|
||||||
for i = 1, len, 3 do
|
for i = 1, len, 3 do
|
||||||
local a = string.byte(text, i )
|
local a = string.byte(text, i)
|
||||||
local b = string.byte(text, i + 1)
|
local b = string.byte(text, i + 1)
|
||||||
local c = string.byte(text, i + 2)
|
local c = string.byte(text, i + 2)
|
||||||
-- num = a<<16 + b<<8 + c
|
-- num = a<<16 + b<<8 + c
|
||||||
local num = a * 65536 + b * 256 + c
|
local num = a * 65536 + b * 256 + c
|
||||||
for j = 1, 4 do
|
for j = 1, 4 do
|
||||||
--tmp = num >> ((4 -j) * 6)
|
--tmp = num >> ((4 -j) * 6)
|
||||||
local tmp = math.floor(num / (2 ^ ((4-j) * 6)))
|
local tmp = math.floor(num / (2 ^ ((4 - j) * 6)))
|
||||||
--curPos = tmp&0x3f
|
--curPos = tmp&0x3f
|
||||||
local curPos = tmp % 64 + 1
|
local curPos = tmp % 64 + 1
|
||||||
res[index] = ZZBase64.__code[curPos]
|
res[index] = ZZBase64.__code[curPos]
|
||||||
|
|
@ -2533,13 +2521,13 @@ function ZZBase64.__left2(res, index, text, len)
|
||||||
res[index + 3] = "="
|
res[index + 3] = "="
|
||||||
end
|
end
|
||||||
|
|
||||||
function ZZBase64.__left1(res, index,text, len)
|
function ZZBase64.__left1(res, index, text, len)
|
||||||
local num = string.byte(text, len + 1)
|
local num = string.byte(text, len + 1)
|
||||||
num = num * 16
|
num = num * 16
|
||||||
|
|
||||||
local tmp = math.floor(num / 64)
|
local tmp = math.floor(num / 64)
|
||||||
local curPos = tmp % 64 + 1
|
local curPos = tmp % 64 + 1
|
||||||
res[index ] = ZZBase64.__code[curPos]
|
res[index] = ZZBase64.__code[curPos]
|
||||||
|
|
||||||
curPos = num % 64 + 1
|
curPos = num % 64 + 1
|
||||||
res[index + 1] = ZZBase64.__code[curPos]
|
res[index + 1] = ZZBase64.__code[curPos]
|
||||||
|
|
@ -2562,11 +2550,11 @@ function ZZBase64.decode(text)
|
||||||
local res = {}
|
local res = {}
|
||||||
local index = 1
|
local index = 1
|
||||||
local decode = ZZBase64.__decode
|
local decode = ZZBase64.__decode
|
||||||
for i =1, len, 4 do
|
for i = 1, len, 4 do
|
||||||
local a = decode[string.byte(text,i )]
|
local a = decode[string.byte(text, i)]
|
||||||
local b = decode[string.byte(text,i + 1)]
|
local b = decode[string.byte(text, i + 1)]
|
||||||
local c = decode[string.byte(text,i + 2)]
|
local c = decode[string.byte(text, i + 2)]
|
||||||
local d = decode[string.byte(text,i + 3)]
|
local d = decode[string.byte(text, i + 3)]
|
||||||
|
|
||||||
--num = a<<18 + b<<12 + c<<6 + d
|
--num = a<<18 + b<<12 + c<<6 + d
|
||||||
local num = a * 262144 + b * 4096 + c * 64 + d
|
local num = a * 262144 + b * 4096 + c * 64 + d
|
||||||
|
|
@ -2575,7 +2563,7 @@ function ZZBase64.decode(text)
|
||||||
num = math.floor(num / 256)
|
num = math.floor(num / 256)
|
||||||
local f = string.char(num % 256)
|
local f = string.char(num % 256)
|
||||||
num = math.floor(num / 256)
|
num = math.floor(num / 256)
|
||||||
res[index ] = string.char(num % 256)
|
res[index] = string.char(num % 256)
|
||||||
res[index + 1] = f
|
res[index + 1] = f
|
||||||
res[index + 2] = e
|
res[index + 2] = e
|
||||||
index = index + 3
|
index = index + 3
|
||||||
|
|
@ -2611,7 +2599,4 @@ function ZZBase64.__decodeLeft2(res, index, text, len)
|
||||||
res[index] = string.char(num)
|
res[index] = string.char(num)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return StartDebug
|
return StartDebug
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
local debugger_reLoadFile =nil
|
local debugger_reLoadFile = nil
|
||||||
xpcall(function()
|
xpcall(function()
|
||||||
debugger_reLoadFile = require("luaideReLoadFile")
|
debugger_reLoadFile = require("luaideReLoadFile")
|
||||||
end,function()
|
end, function()
|
||||||
debugger_reLoadFile = function() print("未实现代码重载") end
|
debugger_reLoadFile = function() print("未实现代码重载") end
|
||||||
end)
|
end)
|
||||||
local sethook = debug.sethook
|
local sethook = debug.sethook
|
||||||
|
|
@ -13,9 +13,9 @@ local checkSetVar = nil
|
||||||
local loadstring_ = nil
|
local loadstring_ = nil
|
||||||
local debugger_sendMsg = nil
|
local debugger_sendMsg = nil
|
||||||
if (loadstring) then
|
if (loadstring) then
|
||||||
loadstring_ = loadstring
|
loadstring_ = loadstring
|
||||||
else
|
else
|
||||||
loadstring_ = load
|
loadstring_ = load
|
||||||
end
|
end
|
||||||
local ZZBase64 = {}
|
local ZZBase64 = {}
|
||||||
local LuaDebugTool_ = nil
|
local LuaDebugTool_ = nil
|
||||||
|
|
@ -366,6 +366,7 @@ local function createJson()
|
||||||
function json.null()
|
function json.null()
|
||||||
return json.null -- so json.null() will also return null ;-)
|
return json.null -- so json.null() will also return null ;-)
|
||||||
end
|
end
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
-- Internal, PRIVATE functions.
|
-- Internal, PRIVATE functions.
|
||||||
-- Following a Python-like convention, I have prefixed all these 'PRIVATE'
|
-- Following a Python-like convention, I have prefixed all these 'PRIVATE'
|
||||||
|
|
@ -423,8 +424,8 @@ local function createJson()
|
||||||
-- @return object, int The object (true, false or nil) and the position at which the next character should be
|
-- @return object, int The object (true, false or nil) and the position at which the next character should be
|
||||||
-- scanned.
|
-- scanned.
|
||||||
function decode_scanConstant(s, startPos)
|
function decode_scanConstant(s, startPos)
|
||||||
local consts = {["true"] = true, ["false"] = false, ["null"] = nil}
|
local consts = { ["true"] = true, ["false"] = false, ["null"] = nil }
|
||||||
local constNames = {"true", "false", "null"}
|
local constNames = { "true", "false", "null" }
|
||||||
|
|
||||||
for i, k in pairs(constNames) do
|
for i, k in pairs(constNames) do
|
||||||
if string.sub(s, startPos, startPos + string.len(k) - 1) == k then
|
if string.sub(s, startPos, startPos + string.len(k) - 1) == k then
|
||||||
|
|
@ -694,7 +695,7 @@ local LuaDebugger = {
|
||||||
runLineCount = 0,
|
runLineCount = 0,
|
||||||
--分割字符串缓存
|
--分割字符串缓存
|
||||||
splitFilePaths = {},
|
splitFilePaths = {},
|
||||||
version="0.9.3",
|
version = "0.9.3",
|
||||||
serVarLevel = 4
|
serVarLevel = 4
|
||||||
}
|
}
|
||||||
local debug_hook = nil
|
local debug_hook = nil
|
||||||
|
|
@ -747,17 +748,17 @@ function print(...)
|
||||||
end
|
end
|
||||||
if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then
|
if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then
|
||||||
if (debug_server) then
|
if (debug_server) then
|
||||||
local arg = {...} --这里的...和{}符号中间需要有空格号,否则会出错
|
local arg = { ... } --这里的...和{}符号中间需要有空格号,否则会出错
|
||||||
local str = ""
|
local str = ""
|
||||||
if (#arg == 0) then
|
if (#arg == 0) then
|
||||||
arg = {"nil"}
|
arg = { "nil" }
|
||||||
end
|
end
|
||||||
for k, v in pairs(arg) do
|
for k, v in pairs(arg) do
|
||||||
str = str .. tostring(v) .. "\t"
|
str = str .. tostring(v) .. "\t"
|
||||||
end
|
end
|
||||||
local sendMsg = {
|
local sendMsg = {
|
||||||
event = LuaDebugger.event.C2S_LuaPrint,
|
event = LuaDebugger.event.C2S_LuaPrint,
|
||||||
data = {msg = ZZBase64.encode(str), type = 1}
|
data = { msg = ZZBase64.encode(str), type = 1 }
|
||||||
}
|
}
|
||||||
local sendStr = json.encode(sendMsg)
|
local sendStr = json.encode(sendMsg)
|
||||||
debug_server:send(sendStr .. "__debugger_k0204__")
|
debug_server:send(sendStr .. "__debugger_k0204__")
|
||||||
|
|
@ -771,46 +772,48 @@ function luaIdePrintWarn(...)
|
||||||
end
|
end
|
||||||
if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then
|
if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then
|
||||||
if (debug_server) then
|
if (debug_server) then
|
||||||
local arg = {...} --这里的...和{}符号中间需要有空格号,否则会出错
|
local arg = { ... } --这里的...和{}符号中间需要有空格号,否则会出错
|
||||||
local str = ""
|
local str = ""
|
||||||
if (#arg == 0) then
|
if (#arg == 0) then
|
||||||
arg = {"nil"}
|
arg = { "nil" }
|
||||||
end
|
end
|
||||||
for k, v in pairs(arg) do
|
for k, v in pairs(arg) do
|
||||||
str = str .. tostring(v) .. "\t"
|
str = str .. tostring(v) .. "\t"
|
||||||
end
|
end
|
||||||
local sendMsg = {
|
local sendMsg = {
|
||||||
event = LuaDebugger.event.C2S_LuaPrint,
|
event = LuaDebugger.event.C2S_LuaPrint,
|
||||||
data = {msg = ZZBase64.encode(str), type = 2}
|
data = { msg = ZZBase64.encode(str), type = 2 }
|
||||||
}
|
}
|
||||||
local sendStr = json.encode(sendMsg)
|
local sendStr = json.encode(sendMsg)
|
||||||
debug_server:send(sendStr .. "__debugger_k0204__")
|
debug_server:send(sendStr .. "__debugger_k0204__")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function luaIdePrintErr(...)
|
function luaIdePrintErr(...)
|
||||||
if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 3) then
|
if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 3) then
|
||||||
debugger_print(...)
|
debugger_print(...)
|
||||||
end
|
end
|
||||||
if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then
|
if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then
|
||||||
if (debug_server) then
|
if (debug_server) then
|
||||||
local arg = {...} --这里的...和{}符号中间需要有空格号,否则会出错
|
local arg = { ... } --这里的...和{}符号中间需要有空格号,否则会出错
|
||||||
local str = ""
|
local str = ""
|
||||||
if (#arg == 0) then
|
if (#arg == 0) then
|
||||||
arg = {"nil"}
|
arg = { "nil" }
|
||||||
end
|
end
|
||||||
for k, v in pairs(arg) do
|
for k, v in pairs(arg) do
|
||||||
str = str .. tostring(v) .. "\t"
|
str = str .. tostring(v) .. "\t"
|
||||||
end
|
end
|
||||||
local sendMsg = {
|
local sendMsg = {
|
||||||
event = LuaDebugger.event.C2S_LuaPrint,
|
event = LuaDebugger.event.C2S_LuaPrint,
|
||||||
data = {msg = ZZBase64.encode(str), type = 3}
|
data = { msg = ZZBase64.encode(str), type = 3 }
|
||||||
}
|
}
|
||||||
local sendStr = json.encode(sendMsg)
|
local sendStr = json.encode(sendMsg)
|
||||||
debug_server:send(sendStr .. "__debugger_k0204__")
|
debug_server:send(sendStr .. "__debugger_k0204__")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--@endregion
|
--@endregion
|
||||||
|
|
||||||
--@region 辅助方法
|
--@region 辅助方法
|
||||||
|
|
@ -1005,27 +1008,24 @@ local function debugger_valueToString(v)
|
||||||
local vtype = type(v)
|
local vtype = type(v)
|
||||||
local vstr = nil
|
local vstr = nil
|
||||||
if (vtype == "userdata") then
|
if (vtype == "userdata") then
|
||||||
if (LuaDebugger.isFoxGloryProject ) then
|
if (LuaDebugger.isFoxGloryProject) then
|
||||||
|
return "userdata", vtype
|
||||||
return "userdata",vtype
|
|
||||||
|
|
||||||
else
|
else
|
||||||
return tostring(v), vtype
|
return tostring(v), vtype
|
||||||
end
|
end
|
||||||
elseif (vtype == "table" or vtype == "function" or vtype == "boolean") then
|
elseif (vtype == "table" or vtype == "function" or vtype == "boolean") then
|
||||||
local value = vtype
|
local value = vtype
|
||||||
xpcall(function()
|
xpcall(function()
|
||||||
if(LuaDebugger.isFoxGloryProject) then
|
if (LuaDebugger.isFoxGloryProject) then
|
||||||
value = vtype
|
value = vtype
|
||||||
else
|
else
|
||||||
value = tostring(v)
|
value = tostring(v)
|
||||||
end
|
end
|
||||||
|
end, function()
|
||||||
end,function()
|
|
||||||
value = vtype
|
value = vtype
|
||||||
end)
|
end)
|
||||||
return value, vtype
|
return value, vtype
|
||||||
elseif (vtype == "number" or vtype == "string" ) then
|
elseif (vtype == "number" or vtype == "string") then
|
||||||
return v, vtype
|
return v, vtype
|
||||||
else
|
else
|
||||||
return tostring(v), vtype
|
return tostring(v), vtype
|
||||||
|
|
@ -1033,12 +1033,12 @@ local function debugger_valueToString(v)
|
||||||
end
|
end
|
||||||
local function debugger_setVarInfo(name, value)
|
local function debugger_setVarInfo(name, value)
|
||||||
local valueStr, valueType = debugger_valueToString(value)
|
local valueStr, valueType = debugger_valueToString(value)
|
||||||
local nameStr,nameType = debugger_valueToString(name)
|
local nameStr, nameType = debugger_valueToString(name)
|
||||||
if(valueStr == nil) then
|
if (valueStr == nil) then
|
||||||
valueStr = valueType
|
valueStr = valueType
|
||||||
end
|
end
|
||||||
local valueInfo = {
|
local valueInfo = {
|
||||||
name =nameStr,
|
name = nameStr,
|
||||||
valueType = valueType,
|
valueType = valueType,
|
||||||
valueStr = ZZBase64.encode(valueStr)
|
valueStr = ZZBase64.encode(valueStr)
|
||||||
}
|
}
|
||||||
|
|
@ -1076,7 +1076,7 @@ local function debugger_getvalue(f)
|
||||||
i = i + 1
|
i = i + 1
|
||||||
end
|
end
|
||||||
|
|
||||||
return {locals = locals, ups = ups}
|
return { locals = locals, ups = ups }
|
||||||
end
|
end
|
||||||
--获取堆栈
|
--获取堆栈
|
||||||
debugger_stackInfo =
|
debugger_stackInfo =
|
||||||
|
|
@ -1122,7 +1122,7 @@ debugger_stackInfo =
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local stackInfo = {stack = stack, vars = varInfos, funcs = funcs}
|
local stackInfo = { stack = stack, vars = varInfos, funcs = funcs }
|
||||||
local data = {
|
local data = {
|
||||||
stack = stackInfo.stack,
|
stack = stackInfo.stack,
|
||||||
vars = stackInfo.vars,
|
vars = stackInfo.vars,
|
||||||
|
|
@ -1133,23 +1133,23 @@ debugger_stackInfo =
|
||||||
}
|
}
|
||||||
|
|
||||||
return data
|
return data
|
||||||
end
|
end
|
||||||
--==============================工具方法 end======================================================
|
--==============================工具方法 end======================================================
|
||||||
--===========================点断信息==================================================
|
--===========================点断信息==================================================
|
||||||
--根据不同的游戏引擎进行定时获取断点信息
|
--根据不同的游戏引擎进行定时获取断点信息
|
||||||
--CCDirector:sharedDirector():getScheduler()
|
--CCDirector:sharedDirector():getScheduler()
|
||||||
local debugger_setBreak = nil
|
local debugger_setBreak = nil
|
||||||
local function debugger_receiveDebugBreakInfo()
|
local function debugger_receiveDebugBreakInfo()
|
||||||
if(not jit) then
|
if (not jit) then
|
||||||
if(_VERSION)then
|
if (_VERSION) then
|
||||||
print("当前lua版本为: ".._VERSION.." 请使用 -----LuaDebug.lua----- 进行调试!")
|
print("当前lua版本为: " .. _VERSION .. " 请使用 -----LuaDebug.lua----- 进行调试!")
|
||||||
else
|
else
|
||||||
print("当前为lua版本,请使用-----LuaDebug.lua-----进行调试!")
|
print("当前为lua版本,请使用-----LuaDebug.lua-----进行调试!")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if (breakInfoSocket) then
|
if (breakInfoSocket) then
|
||||||
local msg, status = breakInfoSocket:receive()
|
local msg, status = breakInfoSocket:receive()
|
||||||
if(LuaDebugger.isLaunch == true and status == "closed") then
|
if (LuaDebugger.isLaunch == true and status == "closed") then
|
||||||
os.exit()
|
os.exit()
|
||||||
end
|
end
|
||||||
if (msg) then
|
if (msg) then
|
||||||
|
|
@ -1159,7 +1159,7 @@ local function debugger_receiveDebugBreakInfo()
|
||||||
elseif netData.event == LuaDebugger.event.S2C_LoadLuaScript then
|
elseif netData.event == LuaDebugger.event.S2C_LoadLuaScript then
|
||||||
LuaDebugger.loadScriptBody = netData.data
|
LuaDebugger.loadScriptBody = netData.data
|
||||||
debugger_exeLuaString()
|
debugger_exeLuaString()
|
||||||
debugger_sendMsg(breakInfoSocket,LuaDebugger.event.C2S_LoadLuaScript,LuaDebugger.loadScriptBody)
|
debugger_sendMsg(breakInfoSocket, LuaDebugger.event.C2S_LoadLuaScript, LuaDebugger.loadScriptBody)
|
||||||
elseif netData.event == LuaDebugger.event.S2C_ReLoadFile then
|
elseif netData.event == LuaDebugger.event.S2C_ReLoadFile then
|
||||||
LuaDebugger.reLoadFileBody = netData.data
|
LuaDebugger.reLoadFileBody = netData.data
|
||||||
LuaDebugger.isReLoadFile = false
|
LuaDebugger.isReLoadFile = false
|
||||||
|
|
@ -1267,7 +1267,7 @@ debugger_setBreak =
|
||||||
end
|
end
|
||||||
LuaDebugger.isHook = false
|
LuaDebugger.isHook = false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local function debugger_checkFileIsBreak(fileName)
|
local function debugger_checkFileIsBreak(fileName)
|
||||||
return LuaDebugger.breakInfos[fileName]
|
return LuaDebugger.breakInfos[fileName]
|
||||||
end
|
end
|
||||||
|
|
@ -1299,7 +1299,7 @@ function debugger_conditionStr(condition, vars, callBack)
|
||||||
currentTabble[k] = v
|
currentTabble[k] = v
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
setmetatable(currentTabble, {__index = _G})
|
setmetatable(currentTabble, { __index = _G })
|
||||||
local fun = loadstring("return " .. condition)
|
local fun = loadstring("return " .. condition)
|
||||||
setfenv(fun, currentTabble)
|
setfenv(fun, currentTabble)
|
||||||
return fun()
|
return fun()
|
||||||
|
|
@ -1316,14 +1316,13 @@ function debugger_conditionStr(condition, vars, callBack)
|
||||||
callBack()
|
callBack()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--执行lua字符串
|
--执行lua字符串
|
||||||
debugger_exeLuaString = function()
|
debugger_exeLuaString = function()
|
||||||
|
|
||||||
local function loadScript()
|
local function loadScript()
|
||||||
|
|
||||||
local script = LuaDebugger.loadScriptBody.script
|
local script = LuaDebugger.loadScriptBody.script
|
||||||
if (LuaDebugger.loadScriptBody.isBreak) then
|
if (LuaDebugger.loadScriptBody.isBreak) then
|
||||||
local currentTabble = {_G = _G}
|
local currentTabble = { _G = _G }
|
||||||
local frameId = LuaDebugger.loadScriptBody.frameId
|
local frameId = LuaDebugger.loadScriptBody.frameId
|
||||||
frameId = frameId
|
frameId = frameId
|
||||||
local func = LuaDebugger.currentDebuggerData.funcs[frameId]
|
local func = LuaDebugger.currentDebuggerData.funcs[frameId]
|
||||||
|
|
@ -1336,7 +1335,7 @@ debugger_exeLuaString = function()
|
||||||
for k, v in pairs(locals) do
|
for k, v in pairs(locals) do
|
||||||
currentTabble[k] = v
|
currentTabble[k] = v
|
||||||
end
|
end
|
||||||
setmetatable(currentTabble, {__index = _G})
|
setmetatable(currentTabble, { __index = _G })
|
||||||
|
|
||||||
local fun = loadstring(script)
|
local fun = loadstring(script)
|
||||||
setfenv(fun, currentTabble)
|
setfenv(fun, currentTabble)
|
||||||
|
|
@ -1351,50 +1350,47 @@ debugger_exeLuaString = function()
|
||||||
xpcall(
|
xpcall(
|
||||||
loadScript,
|
loadScript,
|
||||||
function(error)
|
function(error)
|
||||||
|
|
||||||
-- debugger_sendMsg(debug_server, LuaDebugger.event.C2S_LoadLuaScript, LuaDebugger.loadScriptBody)
|
-- debugger_sendMsg(debug_server, LuaDebugger.event.C2S_LoadLuaScript, LuaDebugger.loadScriptBody)
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
LuaDebugger.loadScriptBody.script = nil
|
LuaDebugger.loadScriptBody.script = nil
|
||||||
if (LuaDebugger.loadScriptBody.isBreak) then
|
if (LuaDebugger.loadScriptBody.isBreak) then
|
||||||
LuaDebugger.serVarLevel = LuaDebugger.serVarLevel+1
|
LuaDebugger.serVarLevel = LuaDebugger.serVarLevel + 1
|
||||||
LuaDebugger.currentDebuggerData = debugger_stackInfo(LuaDebugger.serVarLevel, LuaDebugger.event.C2S_HITBreakPoint)
|
LuaDebugger.currentDebuggerData = debugger_stackInfo(LuaDebugger.serVarLevel, LuaDebugger.event
|
||||||
|
.C2S_HITBreakPoint)
|
||||||
LuaDebugger.loadScriptBody.stack = LuaDebugger.currentDebuggerData.stack
|
LuaDebugger.loadScriptBody.stack = LuaDebugger.currentDebuggerData.stack
|
||||||
end
|
end
|
||||||
LuaDebugger.loadScriptBody.complete = true
|
LuaDebugger.loadScriptBody.complete = true
|
||||||
|
|
||||||
end
|
end
|
||||||
--@region 调试中修改变量值
|
--@region 调试中修改变量值
|
||||||
|
|
||||||
|
|
||||||
--根据key 值在 value 查找
|
--根据key 值在 value 查找
|
||||||
local function debugger_getTablekey(key,keyType,value)
|
local function debugger_getTablekey(key, keyType, value)
|
||||||
if(keyType == -1) then
|
if (keyType == -1) then
|
||||||
return key
|
return key
|
||||||
elseif(keyType == 1) then
|
elseif (keyType == 1) then
|
||||||
return tonumber(key)
|
return tonumber(key)
|
||||||
elseif(keyType == 2) then
|
elseif (keyType == 2) then
|
||||||
local valueKey = nil
|
local valueKey = nil
|
||||||
for k,v in pairs(value) do
|
for k, v in pairs(value) do
|
||||||
local nameType = type(k)
|
local nameType = type(k)
|
||||||
if(nameType == "userdata" or nameType == "table") then
|
if (nameType == "userdata" or nameType == "table") then
|
||||||
if (not LuaDebugger.isFoxGloryProject) then
|
if (not LuaDebugger.isFoxGloryProject) then
|
||||||
valueKey = tostring(k)
|
valueKey = tostring(k)
|
||||||
if(key == valueKey) then
|
if (key == valueKey) then
|
||||||
return k
|
return k
|
||||||
end
|
end
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function debugger_setVarValue(server, data)
|
local function debugger_setVarValue(server, data)
|
||||||
|
|
||||||
local newValue = nil
|
local newValue = nil
|
||||||
local level = LuaDebugger.serVarLevel+LuaDebugger.setVarBody.frameId
|
local level = LuaDebugger.serVarLevel + LuaDebugger.setVarBody.frameId
|
||||||
local firstKeyName = data.keys[1]
|
local firstKeyName = data.keys[1]
|
||||||
--@region vars check
|
--@region vars check
|
||||||
local localValueChangeIndex = -1
|
local localValueChangeIndex = -1
|
||||||
|
|
@ -1409,7 +1405,7 @@ local function debugger_setVarValue(server, data)
|
||||||
if not name then
|
if not name then
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
if(firstKeyName == name) then
|
if (firstKeyName == name) then
|
||||||
localValueChangeIndex = i
|
localValueChangeIndex = i
|
||||||
oldValue = value
|
oldValue = value
|
||||||
end
|
end
|
||||||
|
|
@ -1427,7 +1423,7 @@ local function debugger_setVarValue(server, data)
|
||||||
if not name then
|
if not name then
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
if(localValueChangeIndex == -1 and firstKeyName == name) then
|
if (localValueChangeIndex == -1 and firstKeyName == name) then
|
||||||
upValueFun = func
|
upValueFun = func
|
||||||
oldValue = value
|
oldValue = value
|
||||||
upValueChangeIndex = i
|
upValueChangeIndex = i
|
||||||
|
|
@ -1439,8 +1435,8 @@ local function debugger_setVarValue(server, data)
|
||||||
end
|
end
|
||||||
i = i + 1
|
i = i + 1
|
||||||
end
|
end
|
||||||
--@endregion
|
--@endregion
|
||||||
local vars = {locals = locals, ups = ups}
|
local vars = { locals = locals, ups = ups }
|
||||||
|
|
||||||
local function loadScript()
|
local function loadScript()
|
||||||
local currentTabble = {}
|
local currentTabble = {}
|
||||||
|
|
@ -1457,7 +1453,7 @@ local function debugger_setVarValue(server, data)
|
||||||
currentTabble[k] = v
|
currentTabble[k] = v
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
setmetatable(currentTabble, {__index = _G})
|
setmetatable(currentTabble, { __index = _G })
|
||||||
local fun = loadstring("return " .. data.value)
|
local fun = loadstring("return " .. data.value)
|
||||||
setfenv(fun, currentTabble)
|
setfenv(fun, currentTabble)
|
||||||
newValue = fun()
|
newValue = fun()
|
||||||
|
|
@ -1476,39 +1472,37 @@ local function debugger_setVarValue(server, data)
|
||||||
-- local 查找并替换
|
-- local 查找并替换
|
||||||
local keyLength = #data.keys
|
local keyLength = #data.keys
|
||||||
|
|
||||||
if(keyLength == 1) then
|
if (keyLength == 1) then
|
||||||
if(localValueChangeIndex ~= -1) then
|
if (localValueChangeIndex ~= -1) then
|
||||||
|
|
||||||
debug.setlocal(level, localValueChangeIndex, newValue)
|
debug.setlocal(level, localValueChangeIndex, newValue)
|
||||||
elseif(upValueFun ~= nil) then
|
elseif (upValueFun ~= nil) then
|
||||||
debug.setupvalue( upValueFun, upValueChangeIndex, newValue )
|
debug.setupvalue(upValueFun, upValueChangeIndex, newValue)
|
||||||
else
|
else
|
||||||
--全局变量查找
|
--全局变量查找
|
||||||
if(_G[firstKeyName]) then
|
if (_G[firstKeyName]) then
|
||||||
_G[firstKeyName] = newValue
|
_G[firstKeyName] = newValue
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if(not oldValue) then
|
if (not oldValue) then
|
||||||
if(_G[firstKeyName]) then
|
if (_G[firstKeyName]) then
|
||||||
oldValue = _G[firstKeyName]
|
oldValue = _G[firstKeyName]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local tempValue = oldValue
|
local tempValue = oldValue
|
||||||
for i=2,keyLength-1 do
|
for i = 2, keyLength - 1 do
|
||||||
if(tempValue) then
|
if (tempValue) then
|
||||||
oldValue = oldValue[debugger_getTablekey(data.keys[i],data.numberTypes[i],oldValue)]
|
oldValue = oldValue[debugger_getTablekey(data.keys[i], data.numberTypes[i], oldValue)]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if(tempValue) then
|
if (tempValue) then
|
||||||
oldValue[debugger_getTablekey(data.keys[keyLength],data.numberTypes[keyLength],oldValue)] = newValue
|
oldValue[debugger_getTablekey(data.keys[keyLength], data.numberTypes[keyLength], oldValue)] = newValue
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local varInfo = debugger_setVarInfo(data.varName, newValue)
|
local varInfo = debugger_setVarInfo(data.varName, newValue)
|
||||||
data.varInfo = varInfo
|
data.varInfo = varInfo
|
||||||
LuaDebugger.serVarLevel = LuaDebugger.serVarLevel+1
|
LuaDebugger.serVarLevel = LuaDebugger.serVarLevel + 1
|
||||||
LuaDebugger.currentDebuggerData = debugger_stackInfo(LuaDebugger.serVarLevel, LuaDebugger.event.C2S_HITBreakPoint)
|
LuaDebugger.currentDebuggerData = debugger_stackInfo(LuaDebugger.serVarLevel, LuaDebugger.event.C2S_HITBreakPoint)
|
||||||
|
|
||||||
end
|
end
|
||||||
--@endregion
|
--@endregion
|
||||||
|
|
||||||
|
|
@ -1520,8 +1514,8 @@ checkSetVar =
|
||||||
function()
|
function()
|
||||||
if (LuaDebugger.isSetVar) then
|
if (LuaDebugger.isSetVar) then
|
||||||
LuaDebugger.isSetVar = false
|
LuaDebugger.isSetVar = false
|
||||||
debugger_setVarValue(debug_server,LuaDebugger.setVarBody)
|
debugger_setVarValue(debug_server, LuaDebugger.setVarBody)
|
||||||
LuaDebugger.serVarLevel = LuaDebugger.serVarLevel+1
|
LuaDebugger.serVarLevel = LuaDebugger.serVarLevel + 1
|
||||||
_resume(coro_debugger, LuaDebugger.setVarBody)
|
_resume(coro_debugger, LuaDebugger.setVarBody)
|
||||||
xpcall(
|
xpcall(
|
||||||
checkSetVar,
|
checkSetVar,
|
||||||
|
|
@ -1529,10 +1523,10 @@ checkSetVar =
|
||||||
print("设置变量", error)
|
print("设置变量", error)
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
elseif(LuaDebugger.isLoadLuaScript) then
|
elseif (LuaDebugger.isLoadLuaScript) then
|
||||||
LuaDebugger.isLoadLuaScript = false
|
LuaDebugger.isLoadLuaScript = false
|
||||||
debugger_exeLuaString()
|
debugger_exeLuaString()
|
||||||
LuaDebugger.serVarLevel = LuaDebugger.serVarLevel+1
|
LuaDebugger.serVarLevel = LuaDebugger.serVarLevel + 1
|
||||||
_resume(coro_debugger, LuaDebugger.reLoadFileBody)
|
_resume(coro_debugger, LuaDebugger.reLoadFileBody)
|
||||||
xpcall(
|
xpcall(
|
||||||
checkSetVar,
|
checkSetVar,
|
||||||
|
|
@ -1540,12 +1534,12 @@ checkSetVar =
|
||||||
print("执行代码", error)
|
print("执行代码", error)
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
elseif(LuaDebugger.isReLoadFile) then
|
elseif (LuaDebugger.isReLoadFile) then
|
||||||
LuaDebugger.isReLoadFile = false
|
LuaDebugger.isReLoadFile = false
|
||||||
LuaDebugger.reLoadFileBody.isReLoad = debugger_reLoadFile(LuaDebugger.reLoadFileBody)
|
LuaDebugger.reLoadFileBody.isReLoad = debugger_reLoadFile(LuaDebugger.reLoadFileBody)
|
||||||
print("重载结果:",LuaDebugger.reLoadFileBody.isReLoad)
|
print("重载结果:", LuaDebugger.reLoadFileBody.isReLoad)
|
||||||
LuaDebugger.reLoadFileBody.script = nil
|
LuaDebugger.reLoadFileBody.script = nil
|
||||||
LuaDebugger.serVarLevel = LuaDebugger.serVarLevel+1
|
LuaDebugger.serVarLevel = LuaDebugger.serVarLevel + 1
|
||||||
_resume(coro_debugger, LuaDebugger.reLoadFileBody)
|
_resume(coro_debugger, LuaDebugger.reLoadFileBody)
|
||||||
xpcall(
|
xpcall(
|
||||||
checkSetVar,
|
checkSetVar,
|
||||||
|
|
@ -1554,7 +1548,7 @@ checkSetVar =
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1745,7 +1739,6 @@ end
|
||||||
return
|
return
|
||||||
]]
|
]]
|
||||||
local function debugger_getmetatable(value, metatable, vinfos, server, variablesReference, debugSpeedIndex, metatables)
|
local function debugger_getmetatable(value, metatable, vinfos, server, variablesReference, debugSpeedIndex, metatables)
|
||||||
|
|
||||||
for i, mtable in ipairs(metatables) do
|
for i, mtable in ipairs(metatables) do
|
||||||
if (metatable == mtable) then
|
if (metatable == mtable) then
|
||||||
return vinfos
|
return vinfos
|
||||||
|
|
@ -1801,7 +1794,6 @@ local function debugger_getmetatable(value, metatable, vinfos, server, variables
|
||||||
else
|
else
|
||||||
return vinfos
|
return vinfos
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
local function debugger_sendTableField(luatable, vinfos, server, variablesReference, debugSpeedIndex, valueType)
|
local function debugger_sendTableField(luatable, vinfos, server, variablesReference, debugSpeedIndex, valueType)
|
||||||
if (valueType == "userdata") then
|
if (valueType == "userdata") then
|
||||||
|
|
@ -1874,7 +1866,6 @@ local function debugger_sendTableValues(value, server, variablesReference, debug
|
||||||
vinfos = {}
|
vinfos = {}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
m = getmetatable(value)
|
m = getmetatable(value)
|
||||||
|
|
@ -1924,11 +1915,10 @@ local function debugger_getBreakVar(body, server)
|
||||||
if (value) then
|
if (value) then
|
||||||
local valueType = type(value)
|
local valueType = type(value)
|
||||||
if (valueType == "table" or valueType == "userdata") then
|
if (valueType == "table" or valueType == "userdata") then
|
||||||
|
|
||||||
debugger_sendTableValues(value, server, variablesReference, debugSpeedIndex)
|
debugger_sendTableValues(value, server, variablesReference, debugSpeedIndex)
|
||||||
else
|
else
|
||||||
if (valueType == "function") then
|
if (valueType == "function") then
|
||||||
if(LuaDebugger.isFoxGloryProject) then
|
if (LuaDebugger.isFoxGloryProject) then
|
||||||
value = "function"
|
value = "function"
|
||||||
else
|
else
|
||||||
value = tostring(value)
|
value = tostring(value)
|
||||||
|
|
@ -1991,7 +1981,6 @@ local function ResetDebugInfo()
|
||||||
LuaDebugger.StepIn = false
|
LuaDebugger.StepIn = false
|
||||||
LuaDebugger.StepNext = false
|
LuaDebugger.StepNext = false
|
||||||
LuaDebugger.StepOut = false
|
LuaDebugger.StepOut = false
|
||||||
|
|
||||||
end
|
end
|
||||||
local function debugger_loop(server)
|
local function debugger_loop(server)
|
||||||
server = debug_server
|
server = debug_server
|
||||||
|
|
@ -2002,7 +1991,7 @@ local function debugger_loop(server)
|
||||||
while true do
|
while true do
|
||||||
local line, status = server:receive()
|
local line, status = server:receive()
|
||||||
if (status == "closed") then
|
if (status == "closed") then
|
||||||
if(LuaDebugger.isLaunch) then
|
if (LuaDebugger.isLaunch) then
|
||||||
os.exit()
|
os.exit()
|
||||||
else
|
else
|
||||||
debug.sethook()
|
debug.sethook()
|
||||||
|
|
@ -2014,13 +2003,12 @@ local function debugger_loop(server)
|
||||||
local event = netData.event
|
local event = netData.event
|
||||||
local body = netData.data
|
local body = netData.data
|
||||||
if (event == LuaDebugger.event.S2C_DebugClose) then
|
if (event == LuaDebugger.event.S2C_DebugClose) then
|
||||||
if(LuaDebugger.isLaunch) then
|
if (LuaDebugger.isLaunch) then
|
||||||
os.exit()
|
os.exit()
|
||||||
else
|
else
|
||||||
debug.sethook()
|
debug.sethook()
|
||||||
coroutine.yield()
|
coroutine.yield()
|
||||||
end
|
end
|
||||||
|
|
||||||
elseif event == LuaDebugger.event.S2C_SetBreakPoints then
|
elseif event == LuaDebugger.event.S2C_SetBreakPoints then
|
||||||
--设置断点信息
|
--设置断点信息
|
||||||
local function setB()
|
local function setB()
|
||||||
|
|
@ -2041,7 +2029,7 @@ local function debugger_loop(server)
|
||||||
LuaDebugger.currentDebuggerData = nil
|
LuaDebugger.currentDebuggerData = nil
|
||||||
LuaDebugger.Run = true
|
LuaDebugger.Run = true
|
||||||
LuaDebugger.tempRunFlag = true
|
LuaDebugger.tempRunFlag = true
|
||||||
LuaDebugger.currentLine= nil
|
LuaDebugger.currentLine = nil
|
||||||
local data = coroutine.yield()
|
local data = coroutine.yield()
|
||||||
LuaDebugger.serVarLevel = 4
|
LuaDebugger.serVarLevel = 4
|
||||||
LuaDebugger.currentDebuggerData = data
|
LuaDebugger.currentDebuggerData = data
|
||||||
|
|
@ -2142,42 +2130,37 @@ local function debugger_loop(server)
|
||||||
end
|
end
|
||||||
coro_debugger = coroutine.create(debugger_loop)
|
coro_debugger = coroutine.create(debugger_loop)
|
||||||
debug_hook = function(event, line)
|
debug_hook = function(event, line)
|
||||||
|
if (not LuaDebugger.isHook) then
|
||||||
if(not LuaDebugger.isHook) then
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if(LuaDebugger.Run) then
|
if (LuaDebugger.Run) then
|
||||||
if(event == "line") then
|
if (event == "line") then
|
||||||
local isCheck = false
|
local isCheck = false
|
||||||
for k, breakInfo in pairs(LuaDebugger.breakInfos) do
|
for k, breakInfo in pairs(LuaDebugger.breakInfos) do
|
||||||
|
|
||||||
for bk, linesInfo in pairs(breakInfo) do
|
for bk, linesInfo in pairs(breakInfo) do
|
||||||
|
if (linesInfo.lines and linesInfo.lines[line]) then
|
||||||
if(linesInfo.lines and linesInfo.lines[line]) then
|
|
||||||
isCheck = true
|
isCheck = true
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if(isCheck) then
|
if (isCheck) then
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if(not isCheck) then
|
if (not isCheck) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local file = nil
|
local file = nil
|
||||||
if(event == "line") then
|
if (event == "line") then
|
||||||
|
|
||||||
local funs = nil
|
local funs = nil
|
||||||
local funlength =0
|
local funlength = 0
|
||||||
if(LuaDebugger.currentDebuggerData) then
|
if (LuaDebugger.currentDebuggerData) then
|
||||||
funs = LuaDebugger.currentDebuggerData.funcs
|
funs = LuaDebugger.currentDebuggerData.funcs
|
||||||
funlength = #funs
|
funlength = #funs
|
||||||
end
|
end
|
||||||
|
|
@ -2185,47 +2168,44 @@ debug_hook = function(event, line)
|
||||||
local tempFunc = stepInfo.func
|
local tempFunc = stepInfo.func
|
||||||
local source = stepInfo.source
|
local source = stepInfo.source
|
||||||
file = getSource(source);
|
file = getSource(source);
|
||||||
if(source == "=[C]" or source:find(LuaDebugger.DebugLuaFie)) then return end
|
if (source == "=[C]" or source:find(LuaDebugger.DebugLuaFie)) then return end
|
||||||
if(funlength > 0 and funs[1] == tempFunc and LuaDebugger.currentLine ~= line) then
|
if (funlength > 0 and funs[1] == tempFunc and LuaDebugger.currentLine ~= line) then
|
||||||
LuaDebugger.runLineCount = LuaDebugger.runLineCount+1
|
LuaDebugger.runLineCount = LuaDebugger.runLineCount + 1
|
||||||
end
|
end
|
||||||
local breakInfo = LuaDebugger.breakInfos[file]
|
local breakInfo = LuaDebugger.breakInfos[file]
|
||||||
local breakData = nil
|
local breakData = nil
|
||||||
local ischeck = false
|
local ischeck = false
|
||||||
if(breakInfo) then
|
if (breakInfo) then
|
||||||
|
|
||||||
for k, lineInfo in pairs(breakInfo) do
|
for k, lineInfo in pairs(breakInfo) do
|
||||||
local lines = lineInfo.lines
|
local lines = lineInfo.lines
|
||||||
if(lines and lines[line]) then
|
if (lines and lines[line]) then
|
||||||
ischeck = true
|
ischeck = true
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local isHit = false
|
local isHit = false
|
||||||
if(ischeck) then
|
if (ischeck) then
|
||||||
|
|
||||||
--并且在断点中
|
--并且在断点中
|
||||||
local info = stepInfo
|
local info = stepInfo
|
||||||
local source = string.lower( info.source )
|
local source = string.lower(info.source)
|
||||||
local fullName,dir,fileName = debugger_getFilePathInfo(source)
|
local fullName, dir, fileName = debugger_getFilePathInfo(source)
|
||||||
local hitPathNames = splitFilePath(fullName)
|
local hitPathNames = splitFilePath(fullName)
|
||||||
|
|
||||||
local hitCounts = {}
|
local hitCounts = {}
|
||||||
local debugHitCounts = nil
|
local debugHitCounts = nil
|
||||||
for k, lineInfo in pairs(breakInfo) do
|
for k, lineInfo in pairs(breakInfo) do
|
||||||
|
|
||||||
local lines = lineInfo.lines
|
local lines = lineInfo.lines
|
||||||
local pathNames = lineInfo.pathNames
|
local pathNames = lineInfo.pathNames
|
||||||
debugHitCounts = lineInfo.hitCounts
|
debugHitCounts = lineInfo.hitCounts
|
||||||
if(lines and lines[line]) then
|
if (lines and lines[line]) then
|
||||||
breakData = lines[line]
|
breakData = lines[line]
|
||||||
--判断路径
|
--判断路径
|
||||||
hitCounts[k] = 0
|
hitCounts[k] = 0
|
||||||
local hitPathNamesCount = #hitPathNames
|
local hitPathNamesCount = #hitPathNames
|
||||||
local pathNamesCount = #pathNames
|
local pathNamesCount = #pathNames
|
||||||
local checkCount = 0;
|
local checkCount = 0;
|
||||||
while(true) do
|
while (true) do
|
||||||
if (pathNames[pathNamesCount] ~= hitPathNames[hitPathNamesCount]) then
|
if (pathNames[pathNamesCount] ~= hitPathNames[hitPathNamesCount]) then
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
|
|
@ -2233,55 +2213,53 @@ debug_hook = function(event, line)
|
||||||
end
|
end
|
||||||
pathNamesCount = pathNamesCount - 1
|
pathNamesCount = pathNamesCount - 1
|
||||||
hitPathNamesCount = hitPathNamesCount - 1
|
hitPathNamesCount = hitPathNamesCount - 1
|
||||||
checkCount = checkCount+1
|
checkCount = checkCount + 1
|
||||||
if(pathNamesCount <= 0 or hitPathNamesCount <= 0) then
|
if (pathNamesCount <= 0 or hitPathNamesCount <= 0) then
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if(checkCount>0) then
|
if (checkCount > 0) then
|
||||||
break;
|
break;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
breakData = nil
|
breakData = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if(breakData) then
|
if (breakData) then
|
||||||
local hitFieName = ""
|
local hitFieName = ""
|
||||||
local maxCount = 0
|
local maxCount = 0
|
||||||
for k, v in pairs(hitCounts) do
|
for k, v in pairs(hitCounts) do
|
||||||
if(v > maxCount) then
|
if (v > maxCount) then
|
||||||
maxCount = v
|
maxCount = v
|
||||||
hitFieName = k;
|
hitFieName = k;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local hitPathNamesLength = #hitPathNames
|
local hitPathNamesLength = #hitPathNames
|
||||||
if (hitPathNamesLength == 1 or (hitPathNamesLength > 1 and maxCount > 1)) then
|
if (hitPathNamesLength == 1 or (hitPathNamesLength > 1 and maxCount > 1)) then
|
||||||
if(hitFieName ~= "") then
|
if (hitFieName ~= "") then
|
||||||
|
|
||||||
local hitCount = breakData.hitCondition
|
local hitCount = breakData.hitCondition
|
||||||
local clientHitCount = debugHitCounts[breakData.line]
|
local clientHitCount = debugHitCounts[breakData.line]
|
||||||
clientHitCount = clientHitCount + 1
|
clientHitCount = clientHitCount + 1
|
||||||
debugHitCounts[breakData.line] = clientHitCount
|
debugHitCounts[breakData.line] = clientHitCount
|
||||||
if(funs and funs[1] == tempFunc and LuaDebugger.runLineCount == 0) then
|
if (funs and funs[1] == tempFunc and LuaDebugger.runLineCount == 0) then
|
||||||
LuaDebugger.runLineCount = 0
|
LuaDebugger.runLineCount = 0
|
||||||
elseif(LuaDebugger.tempRunFlag and LuaDebugger.currentLine == line) then
|
elseif (LuaDebugger.tempRunFlag and LuaDebugger.currentLine == line) then
|
||||||
LuaDebugger.runLineCount = 0
|
LuaDebugger.runLineCount = 0
|
||||||
LuaDebugger.tempRunFlag = nil
|
LuaDebugger.tempRunFlag = nil
|
||||||
elseif(clientHitCount >= hitCount) then
|
elseif (clientHitCount >= hitCount) then
|
||||||
isHit = true
|
isHit = true
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if(LuaDebugger.StepOut) then
|
if (LuaDebugger.StepOut) then
|
||||||
if(funlength == 1) then
|
if (funlength == 1) then
|
||||||
ResetDebugInfo();
|
ResetDebugInfo();
|
||||||
LuaDebugger.Run = true
|
LuaDebugger.Run = true
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
if(funs[2] == tempFunc) then
|
if (funs[2] == tempFunc) then
|
||||||
local data = debugger_stackInfo(3, LuaDebugger.event.C2S_StepInResponse)
|
local data = debugger_stackInfo(3, LuaDebugger.event.C2S_StepInResponse)
|
||||||
-- print("StepIn 挂起")
|
-- print("StepIn 挂起")
|
||||||
--挂起等待调试器作出反应
|
--挂起等待调试器作出反应
|
||||||
|
|
@ -2292,8 +2270,8 @@ debug_hook = function(event, line)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if(LuaDebugger.StepIn) then
|
if (LuaDebugger.StepIn) then
|
||||||
if(funs[1] == tempFunc and LuaDebugger.runLineCount == 0) then
|
if (funs[1] == tempFunc and LuaDebugger.runLineCount == 0) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local data = debugger_stackInfo(3, LuaDebugger.event.C2S_StepInResponse)
|
local data = debugger_stackInfo(3, LuaDebugger.event.C2S_StepInResponse)
|
||||||
|
|
@ -2304,23 +2282,22 @@ debug_hook = function(event, line)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if(LuaDebugger.StepNext ) then
|
if (LuaDebugger.StepNext) then
|
||||||
local isNext = false
|
local isNext = false
|
||||||
if(funs) then
|
if (funs) then
|
||||||
for i,f in ipairs(funs) do
|
for i, f in ipairs(funs) do
|
||||||
if(tempFunc == f) then
|
if (tempFunc == f) then
|
||||||
if(LuaDebugger.currentLine == line) then
|
if (LuaDebugger.currentLine == line) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
isNext =true
|
isNext = true
|
||||||
break;
|
break;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
isNext = true
|
||||||
isNext =true
|
|
||||||
end
|
end
|
||||||
if(isNext) then
|
if (isNext) then
|
||||||
local data = debugger_stackInfo(3, LuaDebugger.event.C2S_NextResponse)
|
local data = debugger_stackInfo(3, LuaDebugger.event.C2S_NextResponse)
|
||||||
LuaDebugger.runLineCount = 0
|
LuaDebugger.runLineCount = 0
|
||||||
LuaDebugger.currentLine = line
|
LuaDebugger.currentLine = line
|
||||||
|
|
@ -2335,17 +2312,15 @@ debug_hook = function(event, line)
|
||||||
|
|
||||||
|
|
||||||
--断点判断
|
--断点判断
|
||||||
if(isHit) then
|
if (isHit) then
|
||||||
|
|
||||||
|
|
||||||
LuaDebugger.runLineCount = 0
|
LuaDebugger.runLineCount = 0
|
||||||
LuaDebugger.currentLine = line
|
LuaDebugger.currentLine = line
|
||||||
sevent = LuaDebugger.event.C2S_HITBreakPoint
|
sevent = LuaDebugger.event.C2S_HITBreakPoint
|
||||||
--调用 coro_debugger 并传入 参数
|
--调用 coro_debugger 并传入 参数
|
||||||
local data = debugger_stackInfo(3, sevent)
|
local data = debugger_stackInfo(3, sevent)
|
||||||
--挂起等待调试器作出反应
|
--挂起等待调试器作出反应
|
||||||
if(breakData and breakData.condition) then
|
if (breakData and breakData.condition) then
|
||||||
debugger_conditionStr(breakData.condition,data.vars,function()
|
debugger_conditionStr(breakData.condition, data.vars, function()
|
||||||
_resume(coro_debugger, data)
|
_resume(coro_debugger, data)
|
||||||
checkSetVar()
|
checkSetVar()
|
||||||
end)
|
end)
|
||||||
|
|
@ -2362,7 +2337,7 @@ end
|
||||||
local function debugger_xpcall()
|
local function debugger_xpcall()
|
||||||
--调用 coro_debugger 并传入 参数
|
--调用 coro_debugger 并传入 参数
|
||||||
local data = debugger_stackInfo(4, LuaDebugger.event.C2S_HITBreakPoint)
|
local data = debugger_stackInfo(4, LuaDebugger.event.C2S_HITBreakPoint)
|
||||||
if(data.stack and data.stack[1]) then
|
if (data.stack and data.stack[1]) then
|
||||||
data.stack[1].isXpCall = true
|
data.stack[1].isXpCall = true
|
||||||
end
|
end
|
||||||
--挂起等待调试器作出反应
|
--挂起等待调试器作出反应
|
||||||
|
|
@ -2371,12 +2346,11 @@ local function debugger_xpcall()
|
||||||
end
|
end
|
||||||
--调试开始
|
--调试开始
|
||||||
local function start()
|
local function start()
|
||||||
|
|
||||||
local socket = createSocket()
|
local socket = createSocket()
|
||||||
print(controller_host)
|
print(controller_host)
|
||||||
print(controller_port)
|
print(controller_port)
|
||||||
|
|
||||||
local fullName,dirName,fileName = debugger_getFilePathInfo(getinfo(1).source)
|
local fullName, dirName, fileName = debugger_getFilePathInfo(getinfo(1).source)
|
||||||
LuaDebugger.DebugLuaFie = fileName
|
LuaDebugger.DebugLuaFie = fileName
|
||||||
local server = socket.connect(controller_host, controller_port)
|
local server = socket.connect(controller_host, controller_port)
|
||||||
debug_server = server;
|
debug_server = server;
|
||||||
|
|
@ -2384,7 +2358,7 @@ local function start()
|
||||||
--创建breakInfo socket
|
--创建breakInfo socket
|
||||||
socket = createSocket()
|
socket = createSocket()
|
||||||
breakInfoSocket = socket.connect(controller_host, controller_port)
|
breakInfoSocket = socket.connect(controller_host, controller_port)
|
||||||
if(breakInfoSocket) then
|
if (breakInfoSocket) then
|
||||||
breakInfoSocket:settimeout(0)
|
breakInfoSocket:settimeout(0)
|
||||||
debugger_sendMsg(breakInfoSocket, LuaDebugger.event.C2S_SetSocketName, {
|
debugger_sendMsg(breakInfoSocket, LuaDebugger.event.C2S_SetSocketName, {
|
||||||
name = "breakPointSocket"
|
name = "breakPointSocket"
|
||||||
|
|
@ -2401,31 +2375,28 @@ local function start()
|
||||||
end, function(error)
|
end, function(error)
|
||||||
print("error:", error)
|
print("error:", error)
|
||||||
end)
|
end)
|
||||||
if(not jit) then
|
if (not jit) then
|
||||||
if(_VERSION)then
|
if (_VERSION) then
|
||||||
print("当前lua版本为: ".._VERSION.." 请使用LuaDebug 进行调试!")
|
print("当前lua版本为: " .. _VERSION .. " 请使用LuaDebug 进行调试!")
|
||||||
else
|
else
|
||||||
print("当前为lua版本,请使用LuaDebug 进行调试!")
|
print("当前为lua版本,请使用LuaDebug 进行调试!")
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
_resume(coro_debugger, server)
|
_resume(coro_debugger, server)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function StartDebug(host, port)
|
function StartDebug(host, port)
|
||||||
|
if (not host) then
|
||||||
|
|
||||||
if(not host) then
|
|
||||||
print("error host nil")
|
print("error host nil")
|
||||||
end
|
end
|
||||||
if(not port) then
|
if (not port) then
|
||||||
print("error prot nil")
|
print("error prot nil")
|
||||||
end
|
end
|
||||||
if(type(host) ~= "string") then
|
if (type(host) ~= "string") then
|
||||||
print("error host not string")
|
print("error host not string")
|
||||||
end
|
end
|
||||||
if(type(port) ~= "number") then
|
if (type(port) ~= "number") then
|
||||||
print("error host not number")
|
print("error host not number")
|
||||||
end
|
end
|
||||||
controller_host = host
|
controller_host = host
|
||||||
|
|
@ -2437,8 +2408,6 @@ function StartDebug(host, port)
|
||||||
return debugger_receiveDebugBreakInfo, debugger_xpcall
|
return debugger_receiveDebugBreakInfo, debugger_xpcall
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--base64
|
--base64
|
||||||
|
|
||||||
local string = string
|
local string = string
|
||||||
|
|
@ -2448,10 +2417,10 @@ ZZBase64.__code = {
|
||||||
'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',
|
'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',
|
||||||
'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
|
'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
|
||||||
'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/',
|
'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/',
|
||||||
};
|
};
|
||||||
ZZBase64.__decode = {}
|
ZZBase64.__decode = {}
|
||||||
for k,v in pairs(ZZBase64.__code) do
|
for k, v in pairs(ZZBase64.__code) do
|
||||||
ZZBase64.__decode[string.byte(v,1)] = k - 1
|
ZZBase64.__decode[string.byte(v, 1)] = k - 1
|
||||||
end
|
end
|
||||||
|
|
||||||
function ZZBase64.encode(text)
|
function ZZBase64.encode(text)
|
||||||
|
|
@ -2461,14 +2430,14 @@ function ZZBase64.encode(text)
|
||||||
local res = {}
|
local res = {}
|
||||||
local index = 1
|
local index = 1
|
||||||
for i = 1, len, 3 do
|
for i = 1, len, 3 do
|
||||||
local a = string.byte(text, i )
|
local a = string.byte(text, i)
|
||||||
local b = string.byte(text, i + 1)
|
local b = string.byte(text, i + 1)
|
||||||
local c = string.byte(text, i + 2)
|
local c = string.byte(text, i + 2)
|
||||||
-- num = a<<16 + b<<8 + c
|
-- num = a<<16 + b<<8 + c
|
||||||
local num = a * 65536 + b * 256 + c
|
local num = a * 65536 + b * 256 + c
|
||||||
for j = 1, 4 do
|
for j = 1, 4 do
|
||||||
--tmp = num >> ((4 -j) * 6)
|
--tmp = num >> ((4 -j) * 6)
|
||||||
local tmp = math.floor(num / (2 ^ ((4-j) * 6)))
|
local tmp = math.floor(num / (2 ^ ((4 - j) * 6)))
|
||||||
--curPos = tmp&0x3f
|
--curPos = tmp&0x3f
|
||||||
local curPos = tmp % 64 + 1
|
local curPos = tmp % 64 + 1
|
||||||
res[index] = ZZBase64.__code[curPos]
|
res[index] = ZZBase64.__code[curPos]
|
||||||
|
|
@ -2505,13 +2474,13 @@ function ZZBase64.__left2(res, index, text, len)
|
||||||
res[index + 3] = "="
|
res[index + 3] = "="
|
||||||
end
|
end
|
||||||
|
|
||||||
function ZZBase64.__left1(res, index,text, len)
|
function ZZBase64.__left1(res, index, text, len)
|
||||||
local num = string.byte(text, len + 1)
|
local num = string.byte(text, len + 1)
|
||||||
num = num * 16
|
num = num * 16
|
||||||
|
|
||||||
local tmp = math.floor(num / 64)
|
local tmp = math.floor(num / 64)
|
||||||
local curPos = tmp % 64 + 1
|
local curPos = tmp % 64 + 1
|
||||||
res[index ] = ZZBase64.__code[curPos]
|
res[index] = ZZBase64.__code[curPos]
|
||||||
|
|
||||||
curPos = num % 64 + 1
|
curPos = num % 64 + 1
|
||||||
res[index + 1] = ZZBase64.__code[curPos]
|
res[index + 1] = ZZBase64.__code[curPos]
|
||||||
|
|
@ -2534,11 +2503,11 @@ function ZZBase64.decode(text)
|
||||||
local res = {}
|
local res = {}
|
||||||
local index = 1
|
local index = 1
|
||||||
local decode = ZZBase64.__decode
|
local decode = ZZBase64.__decode
|
||||||
for i =1, len, 4 do
|
for i = 1, len, 4 do
|
||||||
local a = decode[string.byte(text,i )]
|
local a = decode[string.byte(text, i)]
|
||||||
local b = decode[string.byte(text,i + 1)]
|
local b = decode[string.byte(text, i + 1)]
|
||||||
local c = decode[string.byte(text,i + 2)]
|
local c = decode[string.byte(text, i + 2)]
|
||||||
local d = decode[string.byte(text,i + 3)]
|
local d = decode[string.byte(text, i + 3)]
|
||||||
|
|
||||||
--num = a<<18 + b<<12 + c<<6 + d
|
--num = a<<18 + b<<12 + c<<6 + d
|
||||||
local num = a * 262144 + b * 4096 + c * 64 + d
|
local num = a * 262144 + b * 4096 + c * 64 + d
|
||||||
|
|
@ -2547,7 +2516,7 @@ function ZZBase64.decode(text)
|
||||||
num = math.floor(num / 256)
|
num = math.floor(num / 256)
|
||||||
local f = string.char(num % 256)
|
local f = string.char(num % 256)
|
||||||
num = math.floor(num / 256)
|
num = math.floor(num / 256)
|
||||||
res[index ] = string.char(num % 256)
|
res[index] = string.char(num % 256)
|
||||||
res[index + 1] = f
|
res[index + 1] = f
|
||||||
res[index + 2] = e
|
res[index + 2] = e
|
||||||
index = index + 3
|
index = index + 3
|
||||||
|
|
@ -2583,7 +2552,4 @@ function ZZBase64.__decodeLeft2(res, index, text, len)
|
||||||
res[index] = string.char(num)
|
res[index] = string.char(num)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return StartDebug
|
return StartDebug
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,17 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<component size="1334,750" opaque="false">
|
<component size="2532,1170" opaque="false">
|
||||||
<displayList>
|
<displayList>
|
||||||
<component id="n1_hznk" name="PopPanel" src="hznkce2" fileName="PopPanel.xml" xy="0,0" size="1334,750" visible="false">
|
<component id="n1_hznk" name="PopPanel" src="hznkce2" fileName="PopPanel.xml" xy="0,0" size="2532,1170" visible="false">
|
||||||
<relation target="" sidePair="width-width,height-height"/>
|
<relation target="" sidePair="width-width,height-height"/>
|
||||||
</component>
|
</component>
|
||||||
</displayList>
|
</displayList>
|
||||||
<transition name="left_pop">
|
<transition name="left_pop">
|
||||||
<item time="0" type="Visible" target="n1_hznk" value="true"/>
|
<item time="0" type="Visible" target="n1_hznk" value="true"/>
|
||||||
<item time="0" type="XY" target="n1_hznk" tween="true" startValue="-1400,0" endValue="0,0" duration="6"/>
|
<item time="0" type="XY" target="n1_hznk" tween="true" startValue="-1400,0" endValue="0,0" duration="6"/>
|
||||||
<item time="6" type="XY" target="n1_hznk" value="0,0"/>
|
|
||||||
</transition>
|
</transition>
|
||||||
<transition name="right_pop">
|
<transition name="right_pop">
|
||||||
<item time="0" type="Visible" target="n1_hznk" value="true"/>
|
<item time="0" type="Visible" target="n1_hznk" value="true"/>
|
||||||
<item time="0" type="XY" target="n1_hznk" tween="true" startValue="1400,0" endValue="0,0" duration="6"/>
|
<item time="0" type="XY" target="n1_hznk" tween="true" startValue="1400,0" endValue="0,0" duration="6"/>
|
||||||
<item time="6" type="XY" target="n1_hznk" value="0,0"/>
|
|
||||||
</transition>
|
</transition>
|
||||||
<transition name="left_pop_back">
|
<transition name="left_pop_back">
|
||||||
<item time="0" type="Visible" target="n1_hznk" value="true"/>
|
<item time="0" type="Visible" target="n1_hznk" value="true"/>
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<component size="2532,1170">
|
<component size="2532,1170">
|
||||||
<controller name="familyType" exported="true" homePageType="specific" homePage="6" pages="6,空,0,main,1,playEdit,4,createAndJoin,5,numberList,7,numberRecord,8,auditNumber" selected="1"/>
|
<controller name="familyType" exported="true" homePageType="specific" homePage="6" pages="6,空,0,main,1,playEdit,4,createAndJoin,5,numberList,7,numberRecord,8,auditNumber" selected="5"/>
|
||||||
<controller name="createOrJoin" pages="0,create,1,join" selected="0"/>
|
<controller name="createOrJoin" pages="0,create,1,join" selected="0"/>
|
||||||
<controller name="listFamily" pages="0,,1,,10,,11,,12,,13,,14,,15," selected="0"/>
|
<controller name="listFamily" pages="0,,1,,10,,11,,12,,13,,14,,15," selected="0"/>
|
||||||
<controller name="numberRecordRank" pages="0,,1,,3," selected="0"/>
|
<controller name="numberRecordRank" pages="0,,1,,3," selected="0"/>
|
||||||
<controller name="numberRecord" pages="0,,1,,3," selected="0"/>
|
<controller name="numberRecord" pages="0,,1,,3," selected="1"/>
|
||||||
<controller name="showChooseTime" pages="0,,1," selected="0"/>
|
<controller name="showChooseTime" pages="0,,1," selected="0"/>
|
||||||
<controller name="lev" pages="0,1,1,2,2,3" selected="0"/>
|
<controller name="lev" pages="0,1,1,2,2,3" selected="0"/>
|
||||||
<controller name="moreBtn" pages="0,,1," selected="0"/>
|
<controller name="moreBtn" pages="0,,1," selected="0"/>
|
||||||
|
|
@ -143,154 +143,6 @@
|
||||||
<component id="n380_n74n" name="com_createAndJoin" src="n74n7d11" fileName="CreateAndJoin/com_createAndJoin.xml" xy="0,0" size="2532,1170">
|
<component id="n380_n74n" name="com_createAndJoin" src="n74n7d11" fileName="CreateAndJoin/com_createAndJoin.xml" xy="0,0" size="2532,1170">
|
||||||
<gearDisplay controller="familyType" pages="4"/>
|
<gearDisplay controller="familyType" pages="4"/>
|
||||||
</component>
|
</component>
|
||||||
<text id="n84_qz7i" name="text_titleRecord" xy="265,21" size="2002,102" group="n86_qz7i" font="ui://27vd145bh35o7iju" fontSize="78" color="#fbdf74" align="center" autoSize="none" shadowColor="#9a3908" shadowOffset="3,2" text="亲友圈xxxx(123456)成员记录">
|
|
||||||
<relation target="" sidePair="center-center"/>
|
|
||||||
</text>
|
|
||||||
<image id="n136_qz7i" name="n136" src="mc627d05" fileName="Main/Image/Rectangle 91.png" xy="24,192" size="2484,960" group="n138_qz7i"/>
|
|
||||||
<image id="n137_qz7i" name="n137" src="mc627d04" fileName="NumberRecord/Image/Rectangle 112.png" xy="39,210" size="2454,924" group="n138_qz7i"/>
|
|
||||||
<image id="n377_mc62" name="n377" src="mc627d07" fileName="NumberRecord/Image/image(1).png" xy="60,444" size="2412,678" group="n138_qz7i"/>
|
|
||||||
<group id="n138_qz7i" name="bg_numberRecord" xy="24,192" size="2484,960" group="n139_qz7i"/>
|
|
||||||
<component id="n378_v5m5" name="n378" src="v5m57d0f" fileName="NumberRecord/Component/box_time.xml" xy="69,237" size="435,66" group="n144_qz7i">
|
|
||||||
<ComboBox visibleItemCount="10"/>
|
|
||||||
</component>
|
|
||||||
<text id="n143_qz7i" name="text_numberRecordTime" xy="66,322" size="440,56" group="n144_qz7i" font="ui://27vd145bh35o7im7" fontSize="42" color="#444444" align="center" vAlign="middle" autoSize="none" text="2025-03-21 14:30:23"/>
|
|
||||||
<component id="n145_qz7i" name="btn_numberRecordHead" src="86ct7cwk" fileName="Main/Component/btn_head.xml" xy="1168,257" size="144,144" group="n144_qz7i"/>
|
|
||||||
<text id="n146_qz7i" name="text_numberRecordName" xy="1327,257" size="305,64" group="n144_qz7i" font="ui://27vd145bh35o7im7" fontSize="48" color="#444444" autoSize="none" text="12345623">
|
|
||||||
<relation target="n145_qz7i" sidePair="center-center,top-bottom"/>
|
|
||||||
</text>
|
|
||||||
<text id="n147_qz7i" name="text_numberRecordID" xy="1327,309" size="305,64" group="n144_qz7i" font="ui://27vd145bh35o7im7" fontSize="48" color="#444444" autoSize="none" text="12345623">
|
|
||||||
<relation target="n145_qz7i" sidePair="middle-middle,left-right"/>
|
|
||||||
</text>
|
|
||||||
<component id="n379_v5m5" name="n379" src="v5m57d0i" fileName="NumberRecord/Component/btn_reflash.xml" xy="546,223" group="n144_qz7i"/>
|
|
||||||
<group id="n144_qz7i" name="Top" xy="66,223" size="1566,178" group="n139_qz7i"/>
|
|
||||||
<text id="n148_qz7i" name="n148" xy="581,357" size="159,86" group="n149_qz7i" font="ui://27vd145bg2mo7ij0" fontSize="66" color="#444444" align="center" autoSize="none" text="已读"/>
|
|
||||||
<text id="n150_qz7i" name="n150" xy="1827,357" size="159,86" group="n149_qz7i" font="ui://27vd145bg2mo7ij0" fontSize="66" color="#444444" align="center" autoSize="none" text="未读"/>
|
|
||||||
<component id="n151_qz7i" name="comp_numberRecordByGameTypelooked" src="qz7i7cxi" fileName="NumberRecord/Component/comp_numberRecordByGameType.xml" xy="84,460" size="1110,604" group="n149_qz7i">
|
|
||||||
<relation target="" sidePair="center-center,middle-middle"/>
|
|
||||||
</component>
|
|
||||||
<component id="n152_qz7i" name="comp_numberRecordByGameType" src="qz7i7cxi" fileName="NumberRecord/Component/comp_numberRecordByGameType.xml" xy="1330,460" size="1110,604" group="n149_qz7i">
|
|
||||||
<relation target="" sidePair="center-center,middle-middle"/>
|
|
||||||
</component>
|
|
||||||
<group id="n149_qz7i" name="Button" xy="84,357" size="2356,707" group="n139_qz7i"/>
|
|
||||||
<group id="n139_qz7i" name="numberRecord2" xy="24,192" size="2484,960" group="n86_qz7i" advanced="true">
|
|
||||||
<gearDisplay controller="numberRecord" pages="1"/>
|
|
||||||
</group>
|
|
||||||
<image id="n89_qz7i" name="n89" src="c8pn7d02" fileName="Main/Image/Rectangle 93(1)(1).png" xy="24,144" size="2484,1011" group="n99_qz7i"/>
|
|
||||||
<image id="n90_qz7i" name="n90" src="c8pn7d03" fileName="Main/Image/Rectangle 122(1).png" xy="42,160" size="2448,978" group="n99_qz7i"/>
|
|
||||||
<group id="n99_qz7i" name="bg_numberRecordRank" xy="24,144" size="2484,1011" group="n135_qz7i"/>
|
|
||||||
<text id="n93_qz7i" name="text_timeRecord" xy="127,198" size="604,72" group="n121_qz7i" font="Alibaba PuHuiTi 3.0" fontSize="54" color="#0000ed" bold="true" text="2025-04-11-01 18:58:25"/>
|
|
||||||
<image id="n95_qz7i" name="n95" src="c8pn7czi" fileName="Main/Image/Rectangle 278.png" xy="229,327" size="438,72" group="n121_qz7i"/>
|
|
||||||
<text id="n96_qz7i" name="input_numberID" xy="251,327" size="344,72" group="n121_qz7i" fontSize="46" vAlign="middle" autoSize="shrink" bold="true" autoClearText="true" text="123456213" input="true"/>
|
|
||||||
<component id="n97_qz7i" name="btn_clearInput" src="qz7i7cwy" fileName="NumberRecord/Component/btn_clearInput.xml" xy="610,351" group="n121_qz7i"/>
|
|
||||||
<component id="n98_qz7i" name="btn_searchRecord" src="qz7i7cwz" fileName="NumberRecord/Component/btn_search.xml" xy="691,315" group="n121_qz7i"/>
|
|
||||||
<text id="n100_qz7i" name="n100" xy="112,539" size="220,86" group="n121_qz7i" font="Alibaba PuHuiTi 3.0" fontSize="66" color="#a8312f" text="总局数:">
|
|
||||||
<relation target="" sidePair="right-left,top-top"/>
|
|
||||||
</text>
|
|
||||||
<text id="n101_qz7i" name="text_allRound" xy="331,539" size="41,86" group="n121_qz7i" font="Alibaba PuHuiTi 3.0" fontSize="66" color="#0000ed" text="0">
|
|
||||||
<relation target="n100_qz7i" sidePair="left-right,top-top"/>
|
|
||||||
</text>
|
|
||||||
<text id="n102_qz7i" name="n102" xy="503,539" size="286,86" group="n121_qz7i" font="Alibaba PuHuiTi 3.0" fontSize="66" color="#a8312f" text="大赢家数:">
|
|
||||||
<relation target="" sidePair="right-left,top-top"/>
|
|
||||||
</text>
|
|
||||||
<text id="n103_qz7i" name="text_winNum" xy="788,539" size="41,86" group="n121_qz7i" font="Alibaba PuHuiTi 3.0" fontSize="66" color="#0000ed" text="0">
|
|
||||||
<relation target="n102_qz7i" sidePair="left-right,top-top"/>
|
|
||||||
</text>
|
|
||||||
<text id="n104_qz7i" name="n104" xy="79,644" size="286,86" group="n121_qz7i" font="Alibaba PuHuiTi 3.0" fontSize="66" color="#a8312f" text="剩余房卡:">
|
|
||||||
<relation target="" sidePair="right-left,top-top"/>
|
|
||||||
</text>
|
|
||||||
<text id="n105_qz7i" name="text_residueDiamond" xy="364,644" size="41,86" group="n121_qz7i" font="Alibaba PuHuiTi 3.0" fontSize="66" color="#0000ed" text="0">
|
|
||||||
<relation target="n104_qz7i" sidePair="left-right,top-top"/>
|
|
||||||
</text>
|
|
||||||
<text id="n106_qz7i" name="n106" xy="503,644" size="286,86" group="n121_qz7i" font="Alibaba PuHuiTi 3.0" fontSize="66" color="#a8312f" text="房卡消耗:">
|
|
||||||
<relation target="" sidePair="right-left,top-top"/>
|
|
||||||
</text>
|
|
||||||
<text id="n108_qz7i" name="n108" xy="201,806" size="158,86" group="n112_qz7i" font="Alibaba PuHuiTi 3.0" fontSize="66" color="#a8312f" bold="true" text="麻将(">
|
|
||||||
<relation target="" sidePair="left-left"/>
|
|
||||||
</text>
|
|
||||||
<text id="n109_qz7i" name="text_score_majiang" xy="359,806" size="115,86" group="n112_qz7i" font="Alibaba PuHuiTi 3.0" fontSize="66" color="#0000ed" bold="true" singleLine="true" text="000">
|
|
||||||
<relation target="n108_qz7i" sidePair="left-right"/>
|
|
||||||
</text>
|
|
||||||
<component id="n110_qz7i" name="btn_changeMJScore" src="qz7i7cws" fileName="NumberDetail/Component/btn_change.xml" xy="987,815" group="n112_qz7i">
|
|
||||||
<relation target="n111_qz7i" sidePair="left-right"/>
|
|
||||||
</component>
|
|
||||||
<text id="n111_qz7i" name="n111" xy="474,805" size="488,86" group="n112_qz7i" font="Alibaba PuHuiTi 3.0" fontSize="66" color="#a8312f" bold="true" text=")分禁止进入牌局">
|
|
||||||
<relation target="n109_qz7i" sidePair="left-right"/>
|
|
||||||
</text>
|
|
||||||
<group id="n112_qz7i" name="majiang" xy="201,805" size="912,87" group="n121_qz7i"/>
|
|
||||||
<text id="n113_qz7i" name="n113" xy="201,932" size="158,86" group="n117_qz7i" font="Alibaba PuHuiTi 3.0" fontSize="66" color="#a8312f" bold="true" text="扑克(">
|
|
||||||
<relation target="" sidePair="left-left"/>
|
|
||||||
</text>
|
|
||||||
<text id="n114_qz7i" name="text_score_poker" xy="359,932" size="115,86" group="n117_qz7i" font="Alibaba PuHuiTi 3.0" fontSize="66" color="#0000ed" bold="true" singleLine="true" text="000">
|
|
||||||
<relation target="n113_qz7i" sidePair="left-right"/>
|
|
||||||
</text>
|
|
||||||
<component id="n115_qz7i" name="btn_changePKScore" src="qz7i7cws" fileName="NumberDetail/Component/btn_change.xml" xy="987,941" group="n117_qz7i">
|
|
||||||
<relation target="n116_qz7i" sidePair="left-right"/>
|
|
||||||
</component>
|
|
||||||
<text id="n116_qz7i" name="n116" xy="474,932" size="488,86" group="n117_qz7i" font="Alibaba PuHuiTi 3.0" fontSize="66" color="#a8312f" bold="true" text=")分禁止进入牌局">
|
|
||||||
<relation target="n114_qz7i" sidePair="left-right"/>
|
|
||||||
</text>
|
|
||||||
<group id="n117_qz7i" name="oiker" xy="201,932" size="912,86" group="n121_qz7i"/>
|
|
||||||
<text id="n107_qz7i" name="text_useDiamond" xy="788,644" size="41,86" group="n121_qz7i" font="Alibaba PuHuiTi 3.0" fontSize="66" color="#0000ed" text="0">
|
|
||||||
<relation target="n106_qz7i" sidePair="left-right,top-top"/>
|
|
||||||
</text>
|
|
||||||
<component id="n208_jrro" name="btn_chooseTimeBegin" src="jrro7cxv" fileName="NumberRecord/Component/btn_chooseTime.xml" xy="179,1020" group="n121_qz7i"/>
|
|
||||||
<component id="n209_jrro" name="btn_chooseTimeEnd" src="jrro7cxv" fileName="NumberRecord/Component/btn_chooseTime.xml" xy="545,1022" group="n121_qz7i"/>
|
|
||||||
<component id="n211_jrro" name="comp_chooseTime" src="jrro7cxw" fileName="NumberRecord/Component/comp_chooseTime.xml" xy="1,-1" group="n121_qz7i">
|
|
||||||
<gearDisplay controller="showChooseTime" pages="1"/>
|
|
||||||
</component>
|
|
||||||
<group id="n121_qz7i" name="left" xy="1,-1" size="2532,1170" group="n135_qz7i"/>
|
|
||||||
<image id="n375_c8pn" name="n375" src="c8pn7czm" fileName="NumberRecord/Image/Rectangle 277.png" xy="1318,252" group="n122_qz7i"/>
|
|
||||||
<list id="n119_qz7i" name="list_numverRecord" xy="1336,355" size="1130,642" group="n122_qz7i" overflow="scroll" lineGap="17" defaultItem="ui://htcn7v3rqz7i7cx0" align="center" autoClearItems="true">
|
|
||||||
<item/>
|
|
||||||
<item/>
|
|
||||||
</list>
|
|
||||||
<component id="n120_qz7i" name="n120" src="qz7i7cx2" fileName="NumberRecord/Component/comp_numberRecordChildTitle.xml" xy="1336,234" group="n122_qz7i"/>
|
|
||||||
<image id="n123_qz7i" name="n123" src="c8pn7czk" fileName="NumberRecord/Image/1_03.png" xy="1366,168" size="225,84" group="n124_qz7i"/>
|
|
||||||
<text id="n126_qz7i" name="text_recordSortType" xy="1366,168" size="225,84" group="n124_qz7i" fontSize="30" align="center" vAlign="middle" autoSize="none" bold="true" text="正数榜">
|
|
||||||
<relation target="" sidePair="center-center,middle-middle"/>
|
|
||||||
</text>
|
|
||||||
<component id="n127_qz7i" name="n127" src="qz7i7cx3" fileName="NumberRecord/Component/btn_moreArrow.xml" xy="1592,168" size="81,84" group="n124_qz7i">
|
|
||||||
<Button controller="numberRecordRank" page="1"/>
|
|
||||||
</component>
|
|
||||||
<component id="n129_qz7i" name="comp_sortTypeList" src="qz7i7cx5" fileName="NumberRecord/Component/comp_sortTypeList.xml" xy="1577,240" group="n124_qz7i">
|
|
||||||
<gearDisplay controller="numberRecordRank" pages="1"/>
|
|
||||||
</component>
|
|
||||||
<group id="n124_qz7i" name="sortType" xy="1366,168" size="411,232" group="n122_qz7i"/>
|
|
||||||
<image id="n130_qz7i" name="n130" src="c8pn7czk" fileName="NumberRecord/Image/1_03.png" xy="1727,169" size="225,84" group="n134_qz7i"/>
|
|
||||||
<text id="n131_qz7i" name="text_recordGameType" xy="1729,167" size="225,84" group="n134_qz7i" fontSize="30" align="center" vAlign="middle" autoSize="shrink" bold="true" text="麻将">
|
|
||||||
<relation target="" sidePair="center-center,middle-middle"/>
|
|
||||||
</text>
|
|
||||||
<component id="n132_qz7i" name="n132" src="qz7i7cx3" fileName="NumberRecord/Component/btn_moreArrow.xml" xy="1954,166" size="81,84" group="n134_qz7i">
|
|
||||||
<Button controller="numberRecordRank" page="3"/>
|
|
||||||
</component>
|
|
||||||
<component id="n133_qz7i" name="comp_gameTypeList" src="qz7i7cx9" fileName="NumberRecord/Component/comp_gameTypeList.xml" xy="1727,219" group="n134_qz7i">
|
|
||||||
<gearDisplay controller="numberRecordRank" pages="3"/>
|
|
||||||
</component>
|
|
||||||
<group id="n134_qz7i" name="gameType" xy="1727,166" size="308,613" group="n122_qz7i"/>
|
|
||||||
<text id="n376_c8pn" name="text_noPlayer" xy="1325,624" size="1152,154" group="n122_qz7i" font="ui://27vd145bg2mo7ij0" fontSize="120" color="#a8312f" align="center" vAlign="middle" autoSize="none" text="暂时没有玩家上榜"/>
|
|
||||||
<group id="n122_qz7i" name="right" xy="1318,166" size="1161,962" group="n135_qz7i"/>
|
|
||||||
<group id="n135_qz7i" name="numberRank" xy="1,-1" size="2532,1170" group="n86_qz7i" advanced="true">
|
|
||||||
<gearDisplay controller="numberRecord" pages="0"/>
|
|
||||||
</group>
|
|
||||||
<image id="n153_jrro" name="n153" src="86ct7cvc" fileName="GamePlay/Image/Rectangle 91.png" xy="24,181" size="2484,960" group="n155_jrro"/>
|
|
||||||
<image id="n154_jrro" name="n154" src="86ct7cvb" fileName="GamePlay/Image/Rectangle 112.png" xy="60,213" size="2412,900" group="n155_jrro"/>
|
|
||||||
<group id="n155_jrro" name="bg_numberRecordDetail" xy="24,181" size="2484,960" group="n193_jrro"/>
|
|
||||||
<component id="n196_jrro" name="n196" src="jrro7cxp" fileName="NumberRecord/Component/comp_numberRecordDetailChildTitle.xml" xy="95,259" size="2342,72" group="n193_jrro"/>
|
|
||||||
<list id="n197_jrro" name="list_numberRecordDetail" xy="95,372" size="2342,620" group="n193_jrro" overflow="scroll" lineGap="30" defaultItem="ui://htcn7v3rjrro7cxl">
|
|
||||||
<item/>
|
|
||||||
<item/>
|
|
||||||
<item/>
|
|
||||||
<item/>
|
|
||||||
</list>
|
|
||||||
<component id="n199_jrro" name="btn_allChoose" src="jrro7cxq" fileName="NumberRecord/Component/btn_allChoose.xml" xy="390,1008" size="240,84" group="n193_jrro"/>
|
|
||||||
<component id="n200_jrro" name="btn_allChooseRead" src="jrro7cxs" fileName="NumberRecord/Component/btn_allChooseRead.xml" xy="1014,1008" size="240,84" group="n193_jrro"/>
|
|
||||||
<component id="n201_jrro" name="btn_allChooseReverse" src="jrro7cxr" fileName="NumberRecord/Component/btn_allChooseReverse.xml" xy="702,1008" size="240,84" group="n193_jrro"/>
|
|
||||||
<group id="n193_jrro" name="numberRecordDetail" xy="24,181" size="2484,960" group="n86_qz7i" advanced="true">
|
|
||||||
<gearDisplay controller="numberRecord" pages="3"/>
|
|
||||||
</group>
|
|
||||||
<group id="n86_qz7i" name="numberRecord" xy="1,-1" size="2532,1170" advanced="true">
|
|
||||||
<gearDisplay controller="familyType" pages="7"/>
|
|
||||||
</group>
|
|
||||||
<image id="n281_jrro" name="text_titleAuditNumber" src="c8pn7cz4" fileName="Main/Image/Group 327.png" xy="969,24" size="593,99" group="n349_jrro">
|
<image id="n281_jrro" name="text_titleAuditNumber" src="c8pn7cz4" fileName="Main/Image/Group 327.png" xy="969,24" size="593,99" group="n349_jrro">
|
||||||
<relation target="" sidePair="center-center"/>
|
<relation target="" sidePair="center-center"/>
|
||||||
</image>
|
</image>
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 561 B After Width: | Height: | Size: 561 B |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 558 B After Width: | Height: | Size: 558 B |
|
|
@ -2,7 +2,7 @@
|
||||||
<component size="255,84" extention="Button">
|
<component size="255,84" extention="Button">
|
||||||
<controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
|
<controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
|
||||||
<displayList>
|
<displayList>
|
||||||
<image id="n3_jrro" name="n3" src="v5m57d0r" fileName="NumberRecord/Image/quanxuan.png" xy="0,0" size="255,84">
|
<image id="n3_jrro" name="n3" src="v5m57d0s" fileName="NumberRecord/Image/yuedu.png" xy="0,0" size="255,84">
|
||||||
<relation target="" sidePair="width-width,height-height"/>
|
<relation target="" sidePair="width-width,height-height"/>
|
||||||
</image>
|
</image>
|
||||||
</displayList>
|
</displayList>
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,14 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<component size="322,77" extention="Button">
|
<component size="442,90" extention="Button">
|
||||||
<controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
|
<controller name="button" pages="0,up,1,down" selected="1"/>
|
||||||
<displayList>
|
<displayList>
|
||||||
<text id="n3_jrro" name="title" xy="0,7" size="328,72" font="Alibaba PuHuiTi 3.0" fontSize="54" color="#0000ed" text="分数限制一天"/>
|
<text id="n3_jrro" name="title" xy="114,9" size="328,72" font="Alibaba PuHuiTi 3.0" fontSize="54" color="#a8312f" text="分数限制一天">
|
||||||
<graph id="n4_jrro" name="n4" xy="253,10" size="62,57" type="rect"/>
|
<gearColor controller="button" pages="1" values="#a8312f,#000000" default="#0000ed,#000000"/>
|
||||||
|
</text>
|
||||||
|
<image id="n7_lgoh" name="n7" src="lgoh7d4b" fileName="NumberRecord/Image/createRoom_6.png" xy="0,0"/>
|
||||||
|
<image id="n6_lgoh" name="n6" src="v5m57d0p" fileName="NumberRecord/Image/Ellipse 38.png" xy="24,24">
|
||||||
|
<gearDisplay controller="button" pages="1"/>
|
||||||
|
</image>
|
||||||
</displayList>
|
</displayList>
|
||||||
<Button/>
|
<Button mode="Radio"/>
|
||||||
</component>
|
</component>
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<component size="306,84" extention="ComboBox">
|
||||||
|
<controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
|
||||||
|
<displayList>
|
||||||
|
<image id="n4_jydr" name="n4" src="jydr7d3u" fileName="Main/Image/Rectangle 163.png" xy="0,5" size="291,72" group="n7_jydr">
|
||||||
|
<relation target="" sidePair="width-width%,height-height%,left-left%,top-top%"/>
|
||||||
|
</image>
|
||||||
|
<image id="n5_jydr" name="n5" src="jydr7d3s" fileName="Main/Image/Rectangle 165.png" xy="233,5" size="73,72" group="n7_jydr">
|
||||||
|
<relation target="" sidePair="height-height%,left-left%,top-top%"/>
|
||||||
|
</image>
|
||||||
|
<image id="n6_jydr" name="n6" src="jydr7d3t" fileName="Main/Image/Polygon 5.png" xy="252,27" size="35,28" group="n7_jydr" aspect="true">
|
||||||
|
<relation target="n5_jydr" sidePair="center-center,middle-middle"/>
|
||||||
|
<relation target="" sidePair="height-height%"/>
|
||||||
|
</image>
|
||||||
|
<group id="n7_jydr" name="bg" xy="0,5" size="306,72"/>
|
||||||
|
<text id="n3_jydr" name="title" xy="4,2" size="228,78" font="ui://27vd145bh35o7il1" fontSize="54" color="#ffffff" align="center" vAlign="middle" autoSize="shrink" singleLine="true" text="2025-09-09">
|
||||||
|
<relation target="" sidePair=""/>
|
||||||
|
<relation target="n5_jydr" sidePair="rightext-left"/>
|
||||||
|
</text>
|
||||||
|
</displayList>
|
||||||
|
<ComboBox dropdown="ui://htcn7v3rlgoh7d47"/>
|
||||||
|
</component>
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<component size="306,72" extention="Button">
|
||||||
|
<controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
|
||||||
|
<displayList>
|
||||||
|
<text id="n2_jydr" name="title" xy="0,0" size="306,72" font="ui://27vd145bh35o7im8" fontSize="54" color="#ffffff" align="center" vAlign="middle" autoSize="shrink" singleLine="true" text="2025-07-07">
|
||||||
|
<relation target="" sidePair="width-width,height-height"/>
|
||||||
|
</text>
|
||||||
|
</displayList>
|
||||||
|
<Button mode="Radio"/>
|
||||||
|
<relation target="n2_jydr" sidePair="height-height"/>
|
||||||
|
</component>
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<component size="306,504">
|
||||||
|
<displayList>
|
||||||
|
<image id="n0_jydr" name="n0" src="jydr7d3u" fileName="Main/Image/Rectangle 163.png" xy="0,0" size="306,504">
|
||||||
|
<relation target="" sidePair="width-width,height-height"/>
|
||||||
|
</image>
|
||||||
|
<list id="n1_jydr" name="list" xy="0,0" size="306,504" overflow="scroll" defaultItem="ui://htcn7v3rlgoh7d46">
|
||||||
|
<relation target="" sidePair="width-width"/>
|
||||||
|
</list>
|
||||||
|
</displayList>
|
||||||
|
<relation target="n1_jydr" sidePair="height-height"/>
|
||||||
|
</component>
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<component size="1110,586">
|
<component size="1110,586">
|
||||||
<displayList>
|
<displayList>
|
||||||
<component id="n2_qz7i" name="n2" src="qz7i7cxk" fileName="NumberRecord/Component/comp_numberRecordByGameTypeChildTitle.xml" xy="11,2"/>
|
<component id="n2_qz7i" name="n2" src="qz7i7cxk" fileName="NumberRecord/Component/comp_numberRecordByGameTypeChildTitle.xml" xy="11,2"/>
|
||||||
<list id="n3_qz7i" name="n3" xy="1,74" size="1110,511" overflow="scroll" lineGap="15" defaultItem="ui://htcn7v3rqz7i7cxj" align="center">
|
<list id="n3_qz7i" name="n3" xy="1,94" size="1110,492" overflow="scroll" lineGap="15" defaultItem="ui://htcn7v3rqz7i7cxj" align="center">
|
||||||
<relation target="" sidePair="width-width,height-height"/>
|
<relation target="" sidePair="width-width,height-height"/>
|
||||||
<item/>
|
<item/>
|
||||||
<item/>
|
<item/>
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<component size="1088,66">
|
<component size="1088,66">
|
||||||
<controller name="scoreColor" pages="0,,1,,2," selected="0"/>
|
<controller name="scoreColor" pages="0,,1,,2," selected="0"/>
|
||||||
<displayList>
|
<displayList>
|
||||||
<image id="n14_v5m5" name="n14" src="v5m57d0b" fileName="NumberRecord/Image/Subtract.png" xy="-11,-3"/>
|
<image id="n14_v5m5" name="n14" src="jw057d2h" fileName="Record/Image/Group 544.png" xy="0,-3" size="1088,66"/>
|
||||||
<text id="n2_qz7i" name="n2" xy="67,4" size="126,56" font="ui://27vd145bg2mo7ij0" fontSize="42" color="#ffffff" align="center" vAlign="middle" autoSize="none" text="类型">
|
<text id="n2_qz7i" name="n2" xy="67,4" size="126,56" font="ui://27vd145bg2mo7ij0" fontSize="42" color="#ffffff" align="center" vAlign="middle" autoSize="none" text="类型">
|
||||||
<relation target="" sidePair="center-center,middle-middle"/>
|
<relation target="" sidePair="center-center,middle-middle"/>
|
||||||
</text>
|
</text>
|
||||||
|
|
@ -20,5 +20,9 @@
|
||||||
<gearColor controller="scoreColor" pages="0,1,2" values="#ffffff,#000000|#ff0000,#000000|#66ff00,#000000"/>
|
<gearColor controller="scoreColor" pages="0,1,2" values="#ffffff,#000000|#ff0000,#000000|#66ff00,#000000"/>
|
||||||
<relation target="" sidePair="center-center,middle-middle"/>
|
<relation target="" sidePair="center-center,middle-middle"/>
|
||||||
</text>
|
</text>
|
||||||
|
<image id="n15_lgoh" name="n15" src="slrk7d35" fileName="Record/Image/Rectangle 187.png" xy="225,6" size="6,53"/>
|
||||||
|
<image id="n16_lgoh" name="n16" src="slrk7d35" fileName="Record/Image/Rectangle 187.png" xy="471,6" size="6,53"/>
|
||||||
|
<image id="n17_lgoh" name="n17" src="slrk7d35" fileName="Record/Image/Rectangle 187.png" xy="684,6" size="6,53"/>
|
||||||
|
<image id="n18_lgoh" name="n18" src="slrk7d35" fileName="Record/Image/Rectangle 187.png" xy="908,6" size="6,53"/>
|
||||||
</displayList>
|
</displayList>
|
||||||
</component>
|
</component>
|
||||||
|
|
@ -2,19 +2,19 @@
|
||||||
<component size="1130,120">
|
<component size="1130,120">
|
||||||
<displayList>
|
<displayList>
|
||||||
<image id="n11_c8pn" name="n11" src="c8pn7czj" fileName="NumberRecord/Image/Group 354.png" xy="0,30"/>
|
<image id="n11_c8pn" name="n11" src="c8pn7czj" fileName="NumberRecord/Image/Group 354.png" xy="0,30"/>
|
||||||
<text id="n2_qz7i" name="text_ID" xy="211,31" size="46,56" font="Alibaba PuHuiTi 3.0" fontSize="42" color="#ffffff" text="ID">
|
<text id="n2_qz7i" name="text_ID" xy="231,31" size="46,56" font="Alibaba PuHuiTi 3.0" fontSize="42" color="#ffffff" text="ID">
|
||||||
<relation target="" sidePair="center-center,middle-middle"/>
|
<relation target="" sidePair="center-center,middle-middle"/>
|
||||||
</text>
|
</text>
|
||||||
<text id="n4_qz7i" name="text_nick" xy="468,32" size="88,56" font="Alibaba PuHuiTi 3.0" fontSize="42" color="#ffffff" text="昵称">
|
<text id="n4_qz7i" name="text_nick" xy="453,32" size="88,56" font="Alibaba PuHuiTi 3.0" fontSize="42" color="#ffffff" text="昵称">
|
||||||
<relation target="" sidePair="center-center,middle-middle"/>
|
<relation target="" sidePair="center-center,middle-middle"/>
|
||||||
</text>
|
</text>
|
||||||
<text id="n6_qz7i" name="text_score" xy="704,32" size="88,56" font="Alibaba PuHuiTi 3.0" fontSize="42" color="#ffffff" text="分数">
|
<text id="n6_qz7i" name="text_score" xy="726,32" size="88,56" font="Alibaba PuHuiTi 3.0" fontSize="42" color="#ffffff" text="分数">
|
||||||
<relation target="" sidePair="center-center,middle-middle"/>
|
<relation target="" sidePair="center-center,middle-middle"/>
|
||||||
</text>
|
</text>
|
||||||
<text id="n9_qz7i" name="n9" xy="18,31" size="88,56" font="Alibaba PuHuiTi 3.0" fontSize="42" color="#ffffff" text="头像">
|
<text id="n9_qz7i" name="n9" xy="28,31" size="88,56" font="Alibaba PuHuiTi 3.0" fontSize="42" color="#ffffff" text="头像">
|
||||||
<relation target="" sidePair="center-center,middle-middle"/>
|
<relation target="" sidePair="center-center,middle-middle"/>
|
||||||
</text>
|
</text>
|
||||||
<text id="n10_qz7i" name="n10" xy="933,32" size="88,56" font="Alibaba PuHuiTi 3.0" fontSize="42" color="#ffffff" text="查看">
|
<text id="n10_qz7i" name="n10" xy="963,32" size="88,56" font="Alibaba PuHuiTi 3.0" fontSize="42" color="#ffffff" text="查看">
|
||||||
<relation target="" sidePair="center-center,middle-middle"/>
|
<relation target="" sidePair="center-center,middle-middle"/>
|
||||||
</text>
|
</text>
|
||||||
</displayList>
|
</displayList>
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,9 @@
|
||||||
<text id="n2_jrro" name="text_gameName" xy="192,47" size="182,56" font="ui://27vd145bg2mo7ij0" fontSize="42" color="#444444" autoSize="none" text="麻将麻将
">
|
<text id="n2_jrro" name="text_gameName" xy="192,47" size="182,56" font="ui://27vd145bg2mo7ij0" fontSize="42" color="#444444" autoSize="none" text="麻将麻将
">
|
||||||
<relation target="" sidePair="center-center,middle-middle"/>
|
<relation target="" sidePair="center-center,middle-middle"/>
|
||||||
</text>
|
</text>
|
||||||
<text id="n4_jrro" name="text_time" xy="408,48" size="346,54" font="ui://27vd145bg2mo7ij0" fontSize="36" color="#444444" autoSize="none" text="2025-05-19 14:23:01"/>
|
<text id="n4_jrro" name="text_time" xy="408,48" size="346,54" font="ui://27vd145bg2mo7ij0" fontSize="36" color="#444444" autoSize="none" text="2025-05-19 14:23:01">
|
||||||
|
<relation target="" sidePair="center-center,middle-middle"/>
|
||||||
|
</text>
|
||||||
<text id="n6_jrro" name="text_roomID" xy="763,48" size="177,54" font="ui://27vd145bg2mo7ij0" fontSize="40" color="#444444" text="12345678">
|
<text id="n6_jrro" name="text_roomID" xy="763,48" size="177,54" font="ui://27vd145bg2mo7ij0" fontSize="40" color="#444444" text="12345678">
|
||||||
<relation target="" sidePair="center-center,middle-middle"/>
|
<relation target="" sidePair="center-center,middle-middle"/>
|
||||||
</text>
|
</text>
|
||||||
|
|
|
||||||
|
After Width: | Height: | Size: 8.2 KiB |
|
|
@ -0,0 +1,154 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<component size="2532,1170">
|
||||||
|
<controller name="page" pages="0,,1,,2," selected="2"/>
|
||||||
|
<controller name="day" pages="0,,1," selected="0"/>
|
||||||
|
<controller name="sort" pages="0,,1," selected="0"/>
|
||||||
|
<controller name="limitDay" pages="0,,1," selected="0"/>
|
||||||
|
<controller name="noPeople" pages="0,,1," selected="0"/>
|
||||||
|
<displayList>
|
||||||
|
<text id="n0_lgoh" name="text_titleRecord" xy="264,22" size="2002,102" group="n73_lgoh" font="ui://27vd145bh35o7iju" fontSize="78" color="#fbdf74" align="center" autoSize="none" shadowColor="#9a3908" shadowOffset="3,2" text="亲友圈xxxx(123456)成员记录">
|
||||||
|
<relation target="" sidePair="center-center"/>
|
||||||
|
</text>
|
||||||
|
<image id="n1_lgoh" name="n1" src="mc627d05" fileName="Main/Image/Rectangle 91.png" xy="23,193" size="2484,960" group="n4_lgoh"/>
|
||||||
|
<image id="n2_lgoh" name="n2" src="mc627d04" fileName="NumberRecord/Image/Rectangle 112.png" xy="38,211" size="2454,924" group="n4_lgoh"/>
|
||||||
|
<image id="n3_lgoh" name="n3" src="mc627d07" fileName="NumberRecord/Image/image(1).png" xy="59,445" size="2412,678" group="n4_lgoh"/>
|
||||||
|
<group id="n4_lgoh" name="bg_numberRecord" xy="23,193" size="2484,960" group="n17_lgoh"/>
|
||||||
|
<component id="n5_lgoh" name="n5" src="v5m57d0f" fileName="NumberRecord/Component/box_time.xml" xy="68,238" size="435,66" group="n11_lgoh">
|
||||||
|
<ComboBox visibleItemCount="10"/>
|
||||||
|
</component>
|
||||||
|
<text id="n6_lgoh" name="text_numberRecordTime" xy="65,323" size="440,56" group="n11_lgoh" font="ui://27vd145bh35o7im7" fontSize="42" color="#444444" align="center" vAlign="middle" autoSize="none" text="2025-03-21 14:30:23"/>
|
||||||
|
<component id="n7_lgoh" name="btn_numberRecordHead" src="86ct7cwk" fileName="Main/Component/btn_head.xml" xy="1167,258" size="144,144" group="n11_lgoh"/>
|
||||||
|
<text id="n8_lgoh" name="text_numberRecordName" xy="1326,258" size="305,64" group="n11_lgoh" font="ui://27vd145bh35o7im7" fontSize="48" color="#444444" autoSize="none" text="12345623">
|
||||||
|
<relation target="n7_lgoh" sidePair="center-center,top-bottom"/>
|
||||||
|
</text>
|
||||||
|
<text id="n9_lgoh" name="text_numberRecordID" xy="1326,310" size="305,64" group="n11_lgoh" font="ui://27vd145bh35o7im7" fontSize="48" color="#444444" autoSize="none" text="12345623">
|
||||||
|
<relation target="n7_lgoh" sidePair="middle-middle,left-right"/>
|
||||||
|
</text>
|
||||||
|
<component id="n10_lgoh" name="n10" src="v5m57d0i" fileName="NumberRecord/Component/btn_reflash.xml" xy="545,224" group="n11_lgoh"/>
|
||||||
|
<group id="n11_lgoh" name="Top" xy="65,224" size="1566,178" group="n17_lgoh"/>
|
||||||
|
<text id="n12_lgoh" name="n12" xy="580,358" size="159,86" group="n16_lgoh" font="ui://27vd145bg2mo7ij0" fontSize="66" color="#444444" align="center" autoSize="none" text="已读"/>
|
||||||
|
<text id="n13_lgoh" name="n13" xy="1826,358" size="159,86" group="n16_lgoh" font="ui://27vd145bg2mo7ij0" fontSize="66" color="#444444" align="center" autoSize="none" text="未读"/>
|
||||||
|
<component id="n14_lgoh" name="comp_numberRecordByGameTypelooked" src="qz7i7cxi" fileName="NumberRecord/Component/comp_numberRecordByGameType.xml" xy="83,461" size="1110,604" group="n16_lgoh">
|
||||||
|
<relation target="" sidePair="center-center,middle-middle"/>
|
||||||
|
</component>
|
||||||
|
<component id="n15_lgoh" name="comp_numberRecordByGameType" src="qz7i7cxi" fileName="NumberRecord/Component/comp_numberRecordByGameType.xml" xy="1329,461" size="1110,604" group="n16_lgoh">
|
||||||
|
<relation target="" sidePair="center-center,middle-middle"/>
|
||||||
|
</component>
|
||||||
|
<group id="n16_lgoh" name="Button" xy="83,358" size="2356,707" group="n17_lgoh"/>
|
||||||
|
<group id="n17_lgoh" name="numberRecord2" xy="23,193" size="2484,960" group="n73_lgoh" advanced="true">
|
||||||
|
<gearDisplay controller="page" pages="1"/>
|
||||||
|
</group>
|
||||||
|
<image id="n18_lgoh" name="n18" src="c8pn7d02" fileName="Main/Image/Rectangle 93(1)(1).png" xy="21,145" size="2484,1011" group="n20_lgoh"/>
|
||||||
|
<image id="n19_lgoh" name="n19" src="c8pn7d03" fileName="Main/Image/Rectangle 122(1).png" xy="39,161" size="2448,978" group="n20_lgoh"/>
|
||||||
|
<group id="n20_lgoh" name="bg_numberRecordRank" xy="21,145" size="2484,1011" group="n63_lgoh"/>
|
||||||
|
<text id="n21_lgoh" name="text_timeRecord" xy="124,199" size="660,72" group="n47_lgoh" font="Alibaba PuHuiTi 3.0" fontSize="54" color="#0000ed" bold="true" text="2025-04-11-01 18:58:25"/>
|
||||||
|
<image id="n22_lgoh" name="n22" src="c8pn7czi" fileName="Main/Image/Rectangle 278.png" xy="226,328" size="438,72" group="n47_lgoh"/>
|
||||||
|
<text id="n23_lgoh" name="input_numberID" xy="248,328" size="344,72" group="n47_lgoh" fontSize="46" vAlign="middle" autoSize="shrink" bold="true" autoClearText="true" text="123456213" input="true"/>
|
||||||
|
<component id="n24_lgoh" name="btn_clearInput" src="qz7i7cwy" fileName="NumberRecord/Component/btn_clearInput.xml" xy="607,352" group="n47_lgoh"/>
|
||||||
|
<component id="n25_lgoh" name="btn_searchRecord" src="qz7i7cwz" fileName="NumberRecord/Component/btn_search.xml" xy="688,316" group="n47_lgoh"/>
|
||||||
|
<text id="n26_lgoh" name="n26" xy="109,540" size="220,86" group="n47_lgoh" font="Alibaba PuHuiTi 3.0" fontSize="66" color="#a8312f" text="总局数:">
|
||||||
|
<relation target="" sidePair="right-left,top-top"/>
|
||||||
|
</text>
|
||||||
|
<text id="n27_lgoh" name="text_allRound" xy="328,540" size="41,86" group="n47_lgoh" font="Alibaba PuHuiTi 3.0" fontSize="66" color="#0000ed" text="0">
|
||||||
|
<relation target="n26_lgoh" sidePair="left-right,top-top"/>
|
||||||
|
</text>
|
||||||
|
<text id="n28_lgoh" name="n28" xy="700,540" size="286,86" group="n47_lgoh" font="Alibaba PuHuiTi 3.0" fontSize="66" color="#a8312f" text="大赢家数:">
|
||||||
|
<relation target="" sidePair="right-left,top-top"/>
|
||||||
|
</text>
|
||||||
|
<text id="n29_lgoh" name="text_winNum" xy="985,540" size="41,86" group="n47_lgoh" font="Alibaba PuHuiTi 3.0" fontSize="66" color="#0000ed" text="0">
|
||||||
|
<relation target="n28_lgoh" sidePair="left-right,top-top"/>
|
||||||
|
</text>
|
||||||
|
<text id="n30_lgoh" name="n30" xy="76,645" size="286,86" group="n47_lgoh" font="Alibaba PuHuiTi 3.0" fontSize="66" color="#a8312f" text="剩余房卡:">
|
||||||
|
<relation target="" sidePair="right-left,top-top"/>
|
||||||
|
</text>
|
||||||
|
<text id="n31_lgoh" name="text_residueDiamond" xy="361,645" size="330,86" group="n47_lgoh" font="Alibaba PuHuiTi 3.0" fontSize="66" color="#0000ed" autoSize="shrink" text="0">
|
||||||
|
<relation target="n30_lgoh" sidePair="left-right,top-top"/>
|
||||||
|
</text>
|
||||||
|
<text id="n32_lgoh" name="n32" xy="700,645" size="286,86" group="n47_lgoh" font="Alibaba PuHuiTi 3.0" fontSize="66" color="#a8312f" text="房卡消耗:">
|
||||||
|
<relation target="" sidePair="right-left,top-top"/>
|
||||||
|
</text>
|
||||||
|
<text id="n33_lgoh" name="n33" xy="198,807" size="160,86" group="n37_lgoh" font="Alibaba PuHuiTi 3.0" fontSize="66" color="#a8312f" bold="true" text="麻将(">
|
||||||
|
<relation target="" sidePair="left-left"/>
|
||||||
|
</text>
|
||||||
|
<text id="n34_lgoh" name="text_score_majiang" xy="356,807" size="121,86" group="n37_lgoh" font="Alibaba PuHuiTi 3.0" fontSize="66" color="#0000ed" bold="true" singleLine="true" text="000">
|
||||||
|
<relation target="n33_lgoh" sidePair="left-right"/>
|
||||||
|
</text>
|
||||||
|
<component id="n35_lgoh" name="btn_changeMJScore" src="qz7i7cws" fileName="NumberDetail/Component/btn_change.xml" xy="984,816" group="n37_lgoh">
|
||||||
|
<relation target="n36_lgoh" sidePair="left-right"/>
|
||||||
|
</component>
|
||||||
|
<text id="n36_lgoh" name="n36" xy="471,806" size="485,86" group="n37_lgoh" font="Alibaba PuHuiTi 3.0" fontSize="66" color="#a8312f" bold="true" text=")分禁止进入牌局">
|
||||||
|
<relation target="n34_lgoh" sidePair="left-right"/>
|
||||||
|
</text>
|
||||||
|
<group id="n37_lgoh" name="majiang" xy="198,806" size="912,87" group="n47_lgoh"/>
|
||||||
|
<text id="n38_lgoh" name="n38" xy="198,933" size="160,86" group="n42_lgoh" font="Alibaba PuHuiTi 3.0" fontSize="66" color="#a8312f" bold="true" text="扑克(">
|
||||||
|
<relation target="" sidePair="left-left"/>
|
||||||
|
</text>
|
||||||
|
<text id="n39_lgoh" name="text_score_poker" xy="356,933" size="121,86" group="n42_lgoh" font="Alibaba PuHuiTi 3.0" fontSize="66" color="#0000ed" bold="true" singleLine="true" text="000">
|
||||||
|
<relation target="n38_lgoh" sidePair="left-right"/>
|
||||||
|
</text>
|
||||||
|
<component id="n40_lgoh" name="btn_changePKScore" src="qz7i7cws" fileName="NumberDetail/Component/btn_change.xml" xy="984,942" group="n42_lgoh">
|
||||||
|
<relation target="n41_lgoh" sidePair="left-right"/>
|
||||||
|
</component>
|
||||||
|
<text id="n41_lgoh" name="n41" xy="471,933" size="485,86" group="n42_lgoh" font="Alibaba PuHuiTi 3.0" fontSize="66" color="#a8312f" bold="true" text=")分禁止进入牌局">
|
||||||
|
<relation target="n39_lgoh" sidePair="left-right"/>
|
||||||
|
</text>
|
||||||
|
<group id="n42_lgoh" name="oiker" xy="198,933" size="912,86" group="n47_lgoh"/>
|
||||||
|
<text id="n43_lgoh" name="text_useDiamond" xy="985,645" size="323,86" group="n47_lgoh" font="Alibaba PuHuiTi 3.0" fontSize="66" color="#0000ed" autoSize="ellipsis" text="0">
|
||||||
|
<relation target="n32_lgoh" sidePair="left-right,top-top"/>
|
||||||
|
</text>
|
||||||
|
<component id="n44_lgoh" name="btn_oneday" src="jrro7cxv" fileName="NumberRecord/Component/btn_chooseTime.xml" xy="126,1026" group="n47_lgoh">
|
||||||
|
<Button checked="true" controller="limitDay" page="0"/>
|
||||||
|
</component>
|
||||||
|
<component id="n154_lgoh" name="btn_twoday" src="jrro7cxv" fileName="NumberRecord/Component/btn_chooseTime.xml" xy="674,1026" group="n47_lgoh">
|
||||||
|
<Button title="分数限制两天" controller="limitDay" page="1"/>
|
||||||
|
</component>
|
||||||
|
<group id="n47_lgoh" name="left" xy="76,199" size="1232,917" group="n63_lgoh"/>
|
||||||
|
<image id="n48_lgoh" name="n48" src="c8pn7czm" fileName="NumberRecord/Image/Rectangle 277.png" xy="1315,253" group="n62_lgoh"/>
|
||||||
|
<list id="n49_lgoh" name="list_numverRecord" xy="1333,356" size="1130,642" group="n62_lgoh" overflow="scroll" lineGap="17" defaultItem="ui://htcn7v3rqz7i7cx0" align="center" autoClearItems="true">
|
||||||
|
<gearDisplay controller="noPeople" pages="0"/>
|
||||||
|
<item/>
|
||||||
|
<item/>
|
||||||
|
</list>
|
||||||
|
<component id="n50_lgoh" name="n50" src="qz7i7cx2" fileName="NumberRecord/Component/comp_numberRecordChildTitle.xml" xy="1333,235" group="n62_lgoh"/>
|
||||||
|
<text id="n61_lgoh" name="text_noPlayer" xy="1322,625" size="1152,154" group="n62_lgoh" font="ui://27vd145bg2mo7ij0" fontSize="120" color="#a8312f" align="center" vAlign="middle" autoSize="none" text="暂时没有玩家上榜">
|
||||||
|
<gearDisplay controller="noPeople" pages="1"/>
|
||||||
|
</text>
|
||||||
|
<component id="n151_lgoh" name="combBox_time" src="lgoh7d45" fileName="NumberRecord/Component/combBox_sort.xml" xy="1363,168" group="n62_lgoh">
|
||||||
|
<ComboBox title="今天" visibleItemCount="10" selectionController="day">
|
||||||
|
<item title="今天"/>
|
||||||
|
<item title="昨天"/>
|
||||||
|
</ComboBox>
|
||||||
|
</component>
|
||||||
|
<component id="n152_lgoh" name="combBox_sort" src="lgoh7d45" fileName="NumberRecord/Component/combBox_sort.xml" xy="1732,168" group="n62_lgoh">
|
||||||
|
<ComboBox title="正数榜" visibleItemCount="10" selectionController="sort">
|
||||||
|
<item title="正数榜"/>
|
||||||
|
<item title="负数榜"/>
|
||||||
|
</ComboBox>
|
||||||
|
</component>
|
||||||
|
<component id="n153_lgoh" name="combBox_type" src="lgoh7d45" fileName="NumberRecord/Component/combBox_sort.xml" xy="2101,168" group="n62_lgoh">
|
||||||
|
<ComboBox visibleItemCount="10"/>
|
||||||
|
</component>
|
||||||
|
<group id="n62_lgoh" name="right" xy="1315,168" size="1161,961" group="n63_lgoh"/>
|
||||||
|
<group id="n63_lgoh" name="numberRank" xy="21,145" size="2484,1011" group="n73_lgoh" advanced="true">
|
||||||
|
<gearDisplay controller="page" pages="0"/>
|
||||||
|
</group>
|
||||||
|
<image id="n64_lgoh" name="n64" src="86ct7cvc" fileName="GamePlay/Image/Rectangle 91.png" xy="23,182" size="2484,960" group="n66_lgoh"/>
|
||||||
|
<image id="n65_lgoh" name="n65" src="86ct7cvb" fileName="GamePlay/Image/Rectangle 112.png" xy="59,214" size="2412,900" group="n66_lgoh"/>
|
||||||
|
<group id="n66_lgoh" name="bg_numberRecordDetail" xy="23,182" size="2484,960" group="n72_lgoh"/>
|
||||||
|
<component id="n67_lgoh" name="n67" src="jrro7cxp" fileName="NumberRecord/Component/comp_numberRecordDetailChildTitle.xml" xy="94,260" size="2342,72" group="n72_lgoh"/>
|
||||||
|
<list id="n68_lgoh" name="list_numberRecordDetail" xy="94,373" size="2342,620" group="n72_lgoh" overflow="scroll" lineGap="-5" defaultItem="ui://htcn7v3rjrro7cxl">
|
||||||
|
<item/>
|
||||||
|
<item/>
|
||||||
|
<item/>
|
||||||
|
<item/>
|
||||||
|
</list>
|
||||||
|
<component id="n69_lgoh" name="btn_allChoose" src="jrro7cxq" fileName="NumberRecord/Component/btn_allChoose.xml" xy="389,1009" size="240,84" group="n72_lgoh"/>
|
||||||
|
<component id="n70_lgoh" name="btn_allChooseRead" src="jrro7cxs" fileName="NumberRecord/Component/btn_allChooseRead.xml" xy="1013,1009" size="240,84" group="n72_lgoh"/>
|
||||||
|
<component id="n71_lgoh" name="btn_allChooseReverse" src="jrro7cxr" fileName="NumberRecord/Component/btn_allChooseReverse.xml" xy="701,1009" size="240,84" group="n72_lgoh"/>
|
||||||
|
<group id="n72_lgoh" name="numberRecordDetail" xy="23,182" size="2484,960" group="n73_lgoh" advanced="true">
|
||||||
|
<gearDisplay controller="page" pages="2"/>
|
||||||
|
</group>
|
||||||
|
<component id="n148_lgoh" name="btn_close" src="in3i7cu9" fileName="Main/Component/btn_close.xml" xy="54,6" group="n73_lgoh"/>
|
||||||
|
<group id="n73_lgoh" name="numberRecord" xy="21,6" size="2486,1150" advanced="true"/>
|
||||||
|
</displayList>
|
||||||
|
</component>
|
||||||
|
|
@ -2,18 +2,20 @@
|
||||||
<component size="435,76" extention="ComboBox">
|
<component size="435,76" extention="ComboBox">
|
||||||
<controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
|
<controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
|
||||||
<displayList>
|
<displayList>
|
||||||
<image id="n4_jydr" name="n4" src="jydr7d3u" fileName="Rank/Image/Rectangle 163.png" xy="0,5" group="n7_jydr">
|
<image id="n4_jydr" name="n4" src="jydr7d3u" fileName="Main/Image/Rectangle 163.png" xy="0,5" size="414,66" group="n7_jydr">
|
||||||
<relation target="" sidePair="width-width%,height-height%"/>
|
<relation target="" sidePair="width-width%,height-height%,left-left%,top-top%"/>
|
||||||
</image>
|
</image>
|
||||||
<image id="n5_jydr" name="n5" src="jydr7d3s" fileName="Rank/Image/Rectangle 165.png" xy="369,5" group="n7_jydr">
|
<image id="n5_jydr" name="n5" src="jydr7d3s" fileName="Main/Image/Rectangle 165.png" xy="369,5" size="66,66" group="n7_jydr" aspect="true">
|
||||||
<relation target="" sidePair="width-width%,height-height%"/>
|
<relation target="" sidePair="height-height%,left-left%,top-top%"/>
|
||||||
</image>
|
</image>
|
||||||
<image id="n6_jydr" name="n6" src="jydr7d3t" fileName="Rank/Image/Polygon 5.png" xy="384,25" group="n7_jydr">
|
<image id="n6_jydr" name="n6" src="jydr7d3t" fileName="Main/Image/Polygon 5.png" xy="384,25" size="35,26" group="n7_jydr" aspect="true">
|
||||||
<relation target="" sidePair="width-width%,height-height%"/>
|
<relation target="n5_jydr" sidePair="center-center,middle-middle"/>
|
||||||
|
<relation target="" sidePair="height-height%"/>
|
||||||
</image>
|
</image>
|
||||||
<group id="n7_jydr" name="bg" xy="0,5" size="435,66"/>
|
<group id="n7_jydr" name="bg" xy="0,5" size="435,66"/>
|
||||||
<text id="n3_jydr" name="title" xy="4,2" size="364,72" font="ui://27vd145bh35o7il1" fontSize="54" color="#ffffff" align="center" vAlign="middle" autoSize="none" singleLine="true" text="2025-09-09">
|
<text id="n3_jydr" name="title" xy="4,2" size="364,72" font="ui://27vd145bh35o7il1" fontSize="54" color="#ffffff" align="center" vAlign="middle" autoSize="none" singleLine="true" text="2025-09-09">
|
||||||
<relation target="" sidePair="width-width,height-height"/>
|
<relation target="" sidePair=""/>
|
||||||
|
<relation target="n5_jydr" sidePair="rightext-left"/>
|
||||||
</text>
|
</text>
|
||||||
</displayList>
|
</displayList>
|
||||||
<ComboBox dropdown="ui://htcn7v3rjydr7d3x"/>
|
<ComboBox dropdown="ui://htcn7v3rjydr7d3x"/>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<component size="2432,1170">
|
<component size="2432,1170">
|
||||||
<controller name="top_list" pages="0,,1,,2," selected="2"/>
|
<controller name="top_list" pages="0,,1,,2," selected="0"/>
|
||||||
<displayList>
|
<displayList>
|
||||||
<component id="n0_jydr" name="btn_close" src="in3i7cu9" fileName="Main/Component/btn_close.xml" xy="54,6" group="n2_jydr"/>
|
<component id="n0_jydr" name="btn_close" src="in3i7cu9" fileName="Main/Component/btn_close.xml" xy="54,6" group="n2_jydr"/>
|
||||||
<image id="n1_jydr" name="n1" src="jydr7d3l" fileName="Rank/Image/Group 147.png" xy="246,194" group="n2_jydr">
|
<image id="n1_jydr" name="n1" src="jydr7d3l" fileName="Rank/Image/Group 147.png" xy="246,194" group="n2_jydr">
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
</image>
|
</image>
|
||||||
<group id="n2_jydr" name="bg" xy="54,6" size="2232,1148"/>
|
<group id="n2_jydr" name="bg" xy="54,6" size="2232,1148"/>
|
||||||
<component id="n4_jydr" name="btn_round" src="jydr7d3r" fileName="Main/Component/btn_choose.xml" xy="659,361" size="348,123" group="n7_jydr">
|
<component id="n4_jydr" name="btn_round" src="jydr7d3r" fileName="Main/Component/btn_choose.xml" xy="659,361" size="348,123" group="n7_jydr">
|
||||||
<Button icon="ui://htcn7v3rjydr7d3f" selectedIcon="ui://htcn7v3rjydr7d3i" controller="top_list" page="0"/>
|
<Button checked="true" icon="ui://htcn7v3rjydr7d3f" selectedIcon="ui://htcn7v3rjydr7d3i" controller="top_list" page="0"/>
|
||||||
</component>
|
</component>
|
||||||
<component id="n5_jydr" name="btn_win" src="jydr7d3r" fileName="Main/Component/btn_choose.xml" xy="1079,361" size="348,123" group="n7_jydr">
|
<component id="n5_jydr" name="btn_win" src="jydr7d3r" fileName="Main/Component/btn_choose.xml" xy="1079,361" size="348,123" group="n7_jydr">
|
||||||
<Button icon="ui://htcn7v3rjydr7d3g" selectedIcon="ui://htcn7v3rjydr7d3j" controller="top_list" page="1"/>
|
<Button icon="ui://htcn7v3rjydr7d3g" selectedIcon="ui://htcn7v3rjydr7d3j" controller="top_list" page="1"/>
|
||||||
|
|
@ -24,30 +24,34 @@
|
||||||
<ComboBox visibleItemCount="10"/>
|
<ComboBox visibleItemCount="10"/>
|
||||||
</component>
|
</component>
|
||||||
<component id="n6_jydr" name="btn_score" src="jydr7d3r" fileName="Main/Component/btn_choose.xml" xy="1499,361" size="348,123" group="n7_jydr">
|
<component id="n6_jydr" name="btn_score" src="jydr7d3r" fileName="Main/Component/btn_choose.xml" xy="1499,361" size="348,123" group="n7_jydr">
|
||||||
<Button checked="true" icon="ui://htcn7v3rjydr7d3h" selectedIcon="ui://htcn7v3rjydr7d3k" controller="top_list" page="2"/>
|
<Button icon="ui://htcn7v3rjydr7d3h" selectedIcon="ui://htcn7v3rjydr7d3k" controller="top_list" page="2"/>
|
||||||
</component>
|
</component>
|
||||||
<component id="n12_jydr" name="btn_search" src="jydr7d3r" fileName="Main/Component/btn_choose.xml" xy="1840,264" size="204,74" group="n7_jydr">
|
<component id="n12_jydr" name="btn_search" src="jydr7d3r" fileName="Main/Component/btn_choose.xml" xy="1840,264" size="204,74" group="n7_jydr">
|
||||||
<Button icon="ui://htcn7v3rjydr7d3z"/>
|
<Button icon="ui://htcn7v3rjydr7d3z"/>
|
||||||
</component>
|
</component>
|
||||||
<group id="n7_jydr" name="top" xy="659,263" size="1385,221"/>
|
<image id="n19_lgoh" name="n19" src="jydr7d3m" fileName="Rank/Image/Group 327.png" xy="919,24" group="n7_jydr"/>
|
||||||
|
<group id="n7_jydr" name="top" xy="659,24" size="1385,460"/>
|
||||||
<image id="n13_jydr" name="n13" src="jydr7d3o" fileName="Rank/Image/Group 556.png" xy="366,490" size="1794,72" group="n14_jydr">
|
<image id="n13_jydr" name="n13" src="jydr7d3o" fileName="Rank/Image/Group 556.png" xy="366,490" size="1794,72" group="n14_jydr">
|
||||||
<relation target="" sidePair="center-center,middle-middle"/>
|
<relation target="" sidePair="center-center,middle-middle"/>
|
||||||
</image>
|
</image>
|
||||||
<list id="n15_jydr" name="list_round" xy="366,590" size="1794,522" group="n14_jydr" overflow="scroll" lineGap="-8" defaultItem="ui://htcn7v3rjydr7d43">
|
<list id="n15_jydr" name="list_round" xy="366,590" size="1794,522" group="n14_jydr" overflow="scroll" lineGap="-8" defaultItem="ui://htcn7v3rjydr7d43">
|
||||||
<gearDisplay controller="top_list" pages="0"/>
|
<gearDisplay controller="top_list" pages="0"/>
|
||||||
|
<relation target="n13_jydr" sidePair="width-width,left-left"/>
|
||||||
</list>
|
</list>
|
||||||
<list id="n17_jydr" name="list_score" xy="366,590" size="1794,522" group="n14_jydr" overflow="scroll" lineGap="-8" defaultItem="ui://htcn7v3rjydr7d43" autoClearItems="true">
|
<list id="n17_jydr" name="list_score" xy="366,590" size="1794,522" group="n14_jydr" overflow="scroll" lineGap="-8" defaultItem="ui://htcn7v3rjydr7d43" autoClearItems="true">
|
||||||
<gearDisplay controller="top_list" pages="2"/>
|
<gearDisplay controller="top_list" pages="2"/>
|
||||||
|
<relation target="n13_jydr" sidePair="width-width,left-left"/>
|
||||||
<item/>
|
<item/>
|
||||||
<item/>
|
<item/>
|
||||||
<item/>
|
<item/>
|
||||||
</list>
|
</list>
|
||||||
<text id="n18_jydr" name="n18" xy="1965,498" size="88,56" group="n14_jydr" font="FZCuYuan-M03" fontSize="42" color="#ffffff" text="分数">
|
<text id="n18_jydr" name="n18" xy="1965,498" size="88,56" group="n14_jydr" font="FZCuYuan-M03" fontSize="42" color="#ffffff" text="局数">
|
||||||
<gearText controller="top_list" pages="1,2" values="大赢家数|分数" default="局数"/>
|
<gearText controller="top_list" pages="1,2" values="大赢家数|分数" default="局数"/>
|
||||||
<relation target="" sidePair="center-center,middle-middle"/>
|
<relation target="" sidePair="center-center,middle-middle"/>
|
||||||
</text>
|
</text>
|
||||||
<list id="n16_jydr" name="list_win" xy="366,590" size="1794,522" group="n14_jydr" overflow="scroll" lineGap="-8" defaultItem="ui://htcn7v3rjydr7d43">
|
<list id="n16_jydr" name="list_win" xy="366,590" size="1794,522" group="n14_jydr" overflow="scroll" lineGap="-8" defaultItem="ui://htcn7v3rjydr7d43">
|
||||||
<gearDisplay controller="top_list" pages="1"/>
|
<gearDisplay controller="top_list" pages="1"/>
|
||||||
|
<relation target="n13_jydr" sidePair="width-width,left-left"/>
|
||||||
</list>
|
</list>
|
||||||
<group id="n14_jydr" name="body" xy="366,490" size="1794,622"/>
|
<group id="n14_jydr" name="body" xy="366,490" size="1794,622"/>
|
||||||
</displayList>
|
</displayList>
|
||||||
|
|
|
||||||
|
|
@ -267,7 +267,6 @@
|
||||||
<component id="slrk7d3b" name="Item_familyRecord.xml" path="/Record/Component/"/>
|
<component id="slrk7d3b" name="Item_familyRecord.xml" path="/Record/Component/"/>
|
||||||
<component id="slrk7d3c" name="Item_familyPlayer.xml" path="/Record/Component/"/>
|
<component id="slrk7d3c" name="Item_familyPlayer.xml" path="/Record/Component/"/>
|
||||||
<image id="o2rw7d3d" name="zhuangrang 1.png" path="/Main/Image/"/>
|
<image id="o2rw7d3d" name="zhuangrang 1.png" path="/Main/Image/"/>
|
||||||
<<<<<<< HEAD
|
|
||||||
<component id="jydr7d3e" name="comp_rank.xml" path="/Rank/" exported="true"/>
|
<component id="jydr7d3e" name="comp_rank.xml" path="/Rank/" exported="true"/>
|
||||||
<image id="jydr7d3f" name="2_12.png" path="/Rank/Image/"/>
|
<image id="jydr7d3f" name="2_12.png" path="/Rank/Image/"/>
|
||||||
<image id="jydr7d3g" name="2_14.png" path="/Rank/Image/"/>
|
<image id="jydr7d3g" name="2_14.png" path="/Rank/Image/"/>
|
||||||
|
|
@ -282,9 +281,9 @@
|
||||||
<image id="jydr7d3p" name="该时间段没人上榜!.png" path="/Rank/Image/"/>
|
<image id="jydr7d3p" name="该时间段没人上榜!.png" path="/Rank/Image/"/>
|
||||||
<component id="jydr7d3q" name="btn_mul.xml" path="/Main/Component/"/>
|
<component id="jydr7d3q" name="btn_mul.xml" path="/Main/Component/"/>
|
||||||
<component id="jydr7d3r" name="btn_choose.xml" path="/Main/Component/"/>
|
<component id="jydr7d3r" name="btn_choose.xml" path="/Main/Component/"/>
|
||||||
<image id="jydr7d3s" name="Rectangle 165.png" path="/Rank/Image/"/>
|
<image id="jydr7d3s" name="Rectangle 165.png" path="/Main/Image/"/>
|
||||||
<image id="jydr7d3t" name="Polygon 5.png" path="/Rank/Image/"/>
|
<image id="jydr7d3t" name="Polygon 5.png" path="/Main/Image/"/>
|
||||||
<image id="jydr7d3u" name="Rectangle 163.png" path="/Rank/Image/" scale="9grid" scale9grid="103,16,206,32"/>
|
<image id="jydr7d3u" name="Rectangle 163.png" path="/Main/Image/" scale="9grid" scale9grid="103,16,206,32"/>
|
||||||
<component id="jydr7d3w" name="combBox_time_item.xml" path="/Rank/Component/"/>
|
<component id="jydr7d3w" name="combBox_time_item.xml" path="/Rank/Component/"/>
|
||||||
<component id="jydr7d3x" name="combBox_time_popup.xml" path="/Rank/Component/"/>
|
<component id="jydr7d3x" name="combBox_time_popup.xml" path="/Rank/Component/"/>
|
||||||
<component id="jydr7d3y" name="combBox_time.xml" path="/Rank/Component/" exported="true"/>
|
<component id="jydr7d3y" name="combBox_time.xml" path="/Rank/Component/" exported="true"/>
|
||||||
|
|
@ -292,9 +291,12 @@
|
||||||
<image id="jydr7d40" name="1_04.png" path="/Rank/Image/"/>
|
<image id="jydr7d40" name="1_04.png" path="/Rank/Image/"/>
|
||||||
<image id="jydr7d42" name="Group 363.png" path="/Rank/Image/"/>
|
<image id="jydr7d42" name="Group 363.png" path="/Rank/Image/"/>
|
||||||
<component id="jydr7d43" name="comp_listChild.xml" path="/Rank/Component/"/>
|
<component id="jydr7d43" name="comp_listChild.xml" path="/Rank/Component/"/>
|
||||||
=======
|
|
||||||
<image id="o2rw7d3e" name="hall_club_button_aremovassi.png" path="/NumberDetail/Image/"/>
|
<image id="o2rw7d3e" name="hall_club_button_aremovassi.png" path="/NumberDetail/Image/"/>
|
||||||
>>>>>>> 9ea9f829c9c9bd426e2b76a19fce5658be8b474f
|
<component id="lgoh7d44" name="comp_numberRecord.xml" path="/NumberRecord/" exported="true"/>
|
||||||
|
<component id="lgoh7d45" name="combBox_sort.xml" path="/NumberRecord/Component/" exported="true"/>
|
||||||
|
<component id="lgoh7d46" name="combBox_sort_item.xml" path="/NumberRecord/Component/"/>
|
||||||
|
<component id="lgoh7d47" name="combBox_sort_popup.xml" path="/NumberRecord/Component/"/>
|
||||||
|
<image id="lgoh7d4b" name="createRoom_6.png" path="/NumberRecord/Image/"/>
|
||||||
</resources>
|
</resources>
|
||||||
<publish name="Family" path="..\wb_unity_pro\Assets\ART\base\Family\ui" packageCount="2"/>
|
<publish name="Family" path="..\wb_unity_pro\Assets\ART\base\Family\ui" packageCount="2"/>
|
||||||
</packageDescription>
|
</packageDescription>
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<component size="1334,217" opaque="false" initName="player_card_info">
|
<component size="1334,217" opaque="false" initName="player_card_info">
|
||||||
<controller name="chupai" pages="0,,1," selected="1"/>
|
<controller name="chupai" pages="0,,1," selected="0"/>
|
||||||
<controller name="piao" pages="0,,1,,3,,4," selected="0"/>
|
<controller name="piao" pages="0,,1,,3,,4," selected="0"/>
|
||||||
<controller name="piaovalue" pages="0,0,1,1,2,2,3,3,4,5,5,8" selected="0"/>
|
<controller name="piaovalue" pages="0,0,1,1,2,2,3,3,4,5,5,8" selected="0"/>
|
||||||
<displayList>
|
<displayList>
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
<component id="n38_ey1o" name="n38" src="f55qvy" fileName="component/Main/component/PromptOutCard.xml" xy="116,-155">
|
<component id="n38_ey1o" name="n38" src="f55qvy" fileName="component/Main/component/PromptOutCard.xml" xy="116,-155">
|
||||||
<gearDisplay controller="chupai" pages="1"/>
|
<gearDisplay controller="chupai" pages="1"/>
|
||||||
</component>
|
</component>
|
||||||
<component id="n27" name="area_outcard_list" src="djzo18" fileName="component/Component1.xml" pkg="27vd145b" xy="480,-400" size="65,84">
|
<component id="n27" name="area_outcard_list" src="djzo18" fileName="component/Component1.xml" pkg="27vd145b" xy="599,-400" size="65,84">
|
||||||
<relation target="n35_lr5d" sidePair="right-right"/>
|
<relation target="n35_lr5d" sidePair="right-right"/>
|
||||||
</component>
|
</component>
|
||||||
<component id="n39_j34t" name="piao0" src="j34t1gj" fileName="component/piao/btn_nopiao.xml" xy="215,-159" group="n45_j34t">
|
<component id="n39_j34t" name="piao0" src="j34t1gj" fileName="component/piao/btn_nopiao.xml" xy="215,-159" group="n45_j34t">
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,10 @@
|
||||||
<loader id="n1_wyal" name="icon" xy="0,0" size="82,243" url="ui://v6yvqp7wotnwp5" fill="scale" shrinkOnly="true" clearOnPublish="true"/>
|
<loader id="n1_wyal" name="icon" xy="0,0" size="82,243" url="ui://v6yvqp7wotnwp5" fill="scale" shrinkOnly="true" clearOnPublish="true"/>
|
||||||
</displayList>
|
</displayList>
|
||||||
<transition name="mopai1">
|
<transition name="mopai1">
|
||||||
<item time="0" type="Size" target="n1_wyal" tween="true" startValue="17,44" endValue="82,243" duration="4"/>
|
<item time="0" type="Size" target="n1_wyal" tween="true" startValue="17,44" endValue="82,243" duration="7"/>
|
||||||
<item time="0" type="Size" target="n2_ddb9" tween="true" startValue="31.7,60.2" endValue="136,312" duration="4"/>
|
<item time="0" type="Size" target="n2_ddb9" tween="true" startValue="31.7,60.2" endValue="136,312" duration="7"/>
|
||||||
<item time="0" type="XY" target="n1_wyal" tween="true" startValue="35,-40" endValue="0,0" duration="4"/>
|
<item time="0" type="XY" target="n1_wyal" tween="true" startValue="35,-40" endValue="-300,0" duration="7"/>
|
||||||
<item time="0" type="XY" target="n2_ddb9" tween="true" startValue="27,-47" endValue="-31,-29" duration="4"/>
|
<item time="0" type="XY" target="n2_ddb9" tween="true" startValue="27,-47" endValue="-31,-29" duration="7"/>
|
||||||
</transition>
|
</transition>
|
||||||
<transition name="mopai2">
|
<transition name="mopai2">
|
||||||
<item time="0" type="Size" target="n1_wyal" tween="true" startValue="17,44" endValue="82,243" duration="5"/>
|
<item time="0" type="Size" target="n1_wyal" tween="true" startValue="17,44" endValue="82,243" duration="5"/>
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 2.8 MiB After Width: | Height: | Size: 2.7 MiB |
|
Before Width: | Height: | Size: 1.5 MiB After Width: | Height: | Size: 1.6 MiB |
|
|
@ -88,5 +88,5 @@ TextureImporter:
|
||||||
pSDRemoveMatte: 0
|
pSDRemoveMatte: 0
|
||||||
pSDShowRemoveMatteOption: 0
|
pSDShowRemoveMatteOption: 0
|
||||||
userData:
|
userData:
|
||||||
assetBundleName: base/family/b23cba4d4e164d6d5cb3cff916b9e0a4
|
assetBundleName:
|
||||||
assetBundleVariant:
|
assetBundleVariant:
|
||||||
|
|
|
||||||