📄 manila.luac.lua
字号:
-- Decompiled using luadec 0.4 by sztupy (http://winmo.sztupy.hu)
-- Command line was: -l 0;;0,16;3,6,7;;40;20;1;;0,6;26;0;1,14,16;;4,5,39;0;0;0;0;0;;1,11;7,24,49;;0,7;18;;12;1;40;;;1;0;40;0;;8,20;0;0;;1;;;0;0;;0;0,0,25;; 2a3d01cc_manila.luac
currentNumberOfTabs = 0
trayIconWidth = 64
selectorIconWidth = 64
tabSpacing = 92
selectBodyOffset = 44
selectorWidth = 215
tabOffset = 0
selectorIcons = {}
selectorIconsCount = 0
trayIcons = {}
trayIconsCount = 0
notificationIcons = {}
URLS = {}
selectedPositions = {}
previewIcons = {}
previewTitles = {}
tabsShown = false
screenWidth = 480
selectMinX = -selectBodyOffset
selectMaxX = -1
selectTotalX = -1
selectorIconOffset = selectBodyOffset + (selectorWidth - selectBodyOffset - selectBodyOffset - selectorIconWidth) / 2
selectorDragOffset = 0
selectorIsDragging = false
selectedIconSpacing = -1
selectorDestinationPosition = -1
inBucket = -1
delta = -1
bFirstRebuild = true
usingPreviews = true
usingNavigation = true
delayNavFrameCount = 0
landscapeMenuShowing = false
oldPages = {}
landscapeOnStart = false
currentPreviewIndex = 0
noSwipes = false
previewDelta = -35
trace("checking settings...\n")
if _application.Store:GetStringValue(Lifetime_Application, "DisablePreview") == "true" then
trace("not using tab previews\n")
usingPreviews = false
end
if _application.Store:GetStringValue(Lifetime_Application, "DisableNavigation") == "true" then
trace("not using navigation\n")
usingNavigation = false
end
selectedIconResistance = 3
selectedIconResistanceCounter = 0
providingResistance = false
BlockMouseDown = function(l_1_0, l_1_1)
trace("Mouse blocked\n")
l_1_1.value = true
end
MoveToSelectionPosition = function(l_2_0)
selectorDestinationPosition = selectedPositions[l_2_0]
trace("********** selectorDestinationPosition: " .. tostring(selectorDestinationPosition))
tabControl.onUpdate:connect(TabControlOnUpdate)
if delayNavFrameCount == 0 then
if navigateToBucket ~= nil then
Navigate(URLS[navigateToBucket], false)
navigateToBucket = nil
end
end
end
ResetInBucketData = function()
inBucketDataIndex = 0
inBucketData = {}
for i = 0, 15 do
inBucketData[i] = {}
inBucketData[i].tickcount = 0
inBucketData[i].inBucket = 0
end
end
AddInBucketData = function(l_4_0)
if inBucketData == nil then
ResetInBucketData()
end
if inBucketData[inBucketDataIndex].tickcount == 0 then
inBucketData[inBucketDataIndex].tickcount = _application.CurrentTickCount
inBucketData[inBucketDataIndex].inBucket = l_4_0
else
if inBucketData[inBucketDataIndex].inBucket ~= l_4_0 then
inBucketDataIndex = (inBucketDataIndex + 1) % 16
inBucketData[inBucketDataIndex].tickcount = _application.CurrentTickCount
inBucketData[inBucketDataIndex].inBucket = l_4_0
end
end
end
BeginDrag = function()
trace("********************StartDrag\n")
if tabsShown == false then
trace("tabs not shown, cancelling drag\n")
return
end
tabControl.onUpdate:disconnect(TabControlOnUpdate)
navigateToBucket = nil
_application.TouchFlo.HorizontalEnabled = false
selectorIsDragging = true
selectedIconResistanceCounter = 0
providingResistance = false
selectorDragOffset = selector._xmouse - selector.Position.x
SetSelectorX(selector._xmouse - selectorDragOffset)
if usingPreviews then
SetPreviewVisible(true)
end
end
StopDrag = function()
trace("***********************StopDrag\n")
if tabsShown == false then
trace("tabs not shown, cancelling drag\n")
return
end
selectorIsDragging = false
_application.TouchFlo.HorizontalEnabled = true
if CheckIfSelected() then
Navigate(URLS[inBucket], true)
else
if delta <= 0.5 then
local l_6_0 = inBucket
Navigate(URLS[l_6_0], true)
TabJumpTo(l_6_0)
else
local l_6_0 = inBucket + 1
Navigate(URLS[l_6_0], true)
TabJumpTo(l_6_0)
end
end
if usingPreviews then
SetPreviewVisible(false)
end
end
hidePreviewDelayCount = 2
DelayHidePreview = function()
hidePreviewDelayCount = hidePreviewDelayCount - 1
if hidePreviewDelayCount == 0 then
SetPreviewVisible(false)
tabControl.onUpdate:disconnect(DelayHidePreview)
end
end
Navigate = function(l_8_0, l_8_1)
trace("***********************Navigate\n")
trace("Navigating to: " .. l_8_0:ToString(URLParts_All) .. "\n")
if usingNavigation then
hidePreviewDelayCount = 2
tabControl.onUpdate:connect(DelayHidePreview)
_application.Navigation:Navigate(l_8_0, false, l_8_1)
end
end
IsInBucketBounds = function(l_9_0)
trace("***********************IsInBucketBounds\n")
if l_9_0 > -1 and trayIconsCount > l_9_0 then
return true
else
return false
end
end
CheckIfSelected = function()
trace("***********************CheckIfSelected\n")
if selectorDestinationPosition ~= nil and selectorDestinationPosition ~= -1 then
if IsInBucketBounds(inBucket + 1) and selectorDestinationPosition > selectedPositions[inBucket + 1] or
IsInBucketBounds(inBucket - 1) and selectorDestinationPosition < selectedPositions[inBucket - 1] then
trace("out of bounds\n")
return false
end
end
if delta < 0.04998779296875 then
if selectorDestinationPosition <= selector.Position.x then
delta = 0
return true
end
elseif delta > 0.94999694824219 and selectorDestinationPosition >= selector.Position.x then
inBucket = inBucket + 1
delta = 0
return true
end
return false
end
UpdatePreviewIcon = function(l_11_0)
if l_11_0 ~= currentPreviewIndex then
previewIcons[l_11_0].Opacity.value = 100
if currentPreviewIndex >= 0 then
previewIcons[currentPreviewIndex].Opacity.value = 0
end
PreviewTitleText.String = previewTitles[l_11_0]
currentPreviewIndex = l_11_0
end
end
SetSelectorX = function(l_12_0)
if l_12_0 < selectMinX then
l_12_0 = selectMinX
end
if selectMaxX < l_12_0 then
l_12_0 = selectMaxX
end
selector.Position.x = l_12_0
local l_12_1 = l_12_0 - selectMinX
local l_12_2 = l_12_1 / selectedIconSpacing
inBucket = -1
delta = -1
for i = trayIconsCount - 1, 0, -1 do
if i <= l_12_2 and l_12_2 < i + 1 then
inBucket = i
delta = l_12_2 - i
break
end
end
local l_12_3 = 0
for i = 0, trayIconsCount - 1 do
if i == inBucket then
l_12_3 = 100 - 100 * delta
else
if i == inBucket + 1 then
l_12_3 = 100 * delta
else
l_12_3 = 0
end
end
if l_12_3 < 5 then
l_12_3 = 0
end
if l_12_3 > 50 or l_12_3 == 50 and i == inBucket then
selectorIcons[i].Opacity.value = 100
else
selectorIcons[i].Opacity.value = 0
end
if usingPreviews and (l_12_3 > 50 or (l_12_3 == 50 and i == inBucket)) then
UpdatePreviewIcon(i)
end
end
iconTrayRoot.Position.x = l_12_0 + selectorIconOffset - l_12_1 * (tabSpacing / selectedIconSpacing)
notificationTrayRoot.Position.x = iconTrayRoot.Position.x
local itrp = iconTrayRoot.Position.x
local itrps = itrp + tabSpacing
for i = 0, trayIconsCount - 1 do
if (itrp >= 0 and itrp <= screenWidth) or itrps >= 0 and itrps <= screenWidth then
trayIcons[i].Opacity.value = 100
else
trayIcons[i].Opacity.value = 0
end
itrp = itrps
itrps = itrps + tabSpacing
end
end
TabJumpTo = function(l_13_0)
trace("***********************TabJumpTo\n")
selectorDestinationPosition = selectedPositions[l_13_0]
SetSelectorX(selectedPositions[l_13_0])
UpdatePreviewIcon(l_13_0)
CheckIfSelected()
end
navigateToBucket = nil
TabControlOnUpdate = function()
trace("***********************TabControlOnUpdate\n")
local l_14_0 = selectorDestinationPosition - selector.Position.x
local l_14_1 = (l_14_0) / 2
if math.abs(l_14_1) < 5 then
l_14_1 = l_14_0
end
SetSelectorX(selector.Position.x + (l_14_1))
CheckIfSelected()
if l_14_0 == 0 then
if delayNavFrameCount > 0 then
delayNavFrameCount = delayNavFrameCount - 1
else
tabControl.onUpdate:disconnect(TabControlOnUpdate)
if navigateToBucket ~= nil then
Navigate(URLS[navigateToBucket], false)
navigateToBucket = nil
end
end
end
end
OnSelectorPress = function(l_15_0, l_15_1)
trace("***********************OnSelectorPress\n")
if _tptabTimer then
_tptabTimer:Stop()
end
BeginDrag()
selectorDestinationPosition = -1
l_15_1.value = true
end
OnSelectorRelease = function(l_16_0, l_16_1)
trace("***********************OnSelectorRelease\n")
if _tptabTimer then
_tptabTimer:Start()
end
StopDrag()
l_16_1.value = true
end
OnSelectorReleaseOutside = function(l_17_0, l_17_1)
trace("***********************OnSelectorReleaseOutside\n")
if _tptabTimer then
_tptabTimer:Start()
end
StopDrag()
l_17_1.value = true
end
OnTrayIconRelease = function(l_18_0, l_18_1)
trace("***********************OnTrayIconRelease\n")
if _tptabTimer then
_tptabTimer:Start()
end
trace("TrayIcon clicked, tag = " .. tostring(l_18_0.Tag) .. "\n")
l_18_1.value = true
noSwipes = false
end
OnTrayIconReleaseOutside = function(l_19_0, l_19_1)
trace("***********************OnTrayIconReleaseOutside\n")
if _tptabTimer then
_tptabTimer:Start()
end
noSwipes = false
end
OnTrayIconPress = function(l_20_0, l_20_1)
trace("***********************OnTrayIconPress\n")
if _tptabTimer then
_tptabTimer:Stop()
end
trace("TrayIcon pressed, tag = " .. tostring(l_20_0.Tag) .. "\n")
navigateToBucket = l_20_0.Tag
delayNavFrameCount = 0
_application:VibrateButton()
TabJumpTo(l_20_0.Tag)
Navigate(URLS[l_20_0.Tag], false)
noSwipes = true
l_20_1.value = true
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -