|
|
|
@ -461,6 +461,9 @@ function DictQuickLookup:update()
|
|
|
|
|
callback = function()
|
|
|
|
|
self:changeToPrevDict()
|
|
|
|
|
end,
|
|
|
|
|
hold_callback = function()
|
|
|
|
|
self:changeToFirstDict()
|
|
|
|
|
end,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
text = self:getHighlightText(),
|
|
|
|
@ -480,6 +483,9 @@ function DictQuickLookup:update()
|
|
|
|
|
callback = function()
|
|
|
|
|
self:changeToNextDict()
|
|
|
|
|
end,
|
|
|
|
|
hold_callback = function()
|
|
|
|
|
self:changeToLastDict()
|
|
|
|
|
end,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
@ -846,6 +852,18 @@ function DictQuickLookup:changeToNextDict()
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function DictQuickLookup:changeToFirstDict()
|
|
|
|
|
if self:isPrevDictAvaiable() then
|
|
|
|
|
self:changeDictionary(1)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function DictQuickLookup:changeToLastDict()
|
|
|
|
|
if self:isNextDictAvaiable() then
|
|
|
|
|
self:changeDictionary(#self.results)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function DictQuickLookup:changeDictionary(index)
|
|
|
|
|
if not self.results[index] then return end
|
|
|
|
|
self.dict_index = index
|
|
|
|
|