📄 3.lua
字号:
-- Decompiled using luadec 0.6 by sztupy (http://winmo.sztupy.hu)
-- Command line was: -l 313,330,331,391;;;;6,12;0,2;;;5;5;;;;;;0,31;0,34,36,40,46,101;0,7;;;;0,23,25;;;;;;;;2,4,5,6;0,15,71;3,5;0,0,0,42,46;;;0,14,87,121,127,220,256;0,0,8;4,5;;0,13,15,23;; 252e3f90_manila_20B2.luac
if _config_os == "windowsmobile" then
require("audio_manager_svc")
end
if indicatorPress_startPos == nil then
indicatorPress_startPos = 27
end
if indicatorPress_maxPos == nil then
indicatorPress_maxPos = 366
end
if tracklineDrag_maxWidth == nil then
tracklineDrag_maxWidth = 328
end
BUTTON_UP = 0
BUTTON_DOWN = 1
BUTTON_DISABLED = 2
gCurTrackIndex = 0
gAMBusy = false
gDuration = 0
gIndicator_Offset = 0
gTrackDown = false
gTrackX = 0
gIsPreviousBtnPress = false
gEngReloaded = false
gSeekPosition = 0
gWheelTimer = nil
gWheelTimerCount = 0
gWheelOrigState = nil
gWheelDirection = nil
gWheelSkipValue = tonumber(MusicConfig_Instance():GetSetting(CONFIG_WHEEL_SKIP_VALUE))
if gWheelSkipValue == nil then
gWheelSkipValue = 1
end
gWheelCount = 0
gFirstTimeIn = true
if _config_os == "windowsmobile" then
gPlayer = MusicPlayer_Instance()
_application.Navigator:SetMode(NavigatorMode_Wheel)
end
artistalbum_ani = function()
if artistalbum.Opacity.value == 0 then
artistalbum.Opacity:Interpolate(0, 100, 12, 60, Interpolate_EaseOutQuad, artistalbum_ani)
artistalbum2.Opacity:Interpolate(100, 0, 12, 50, Interpolate_EaseOutQuad)
else
artistalbum.Opacity:Interpolate(100, 0, 12, 50, Interpolate_EaseOutQuad)
artistalbum2.Opacity:Interpolate(0, 100, 12, 60, Interpolate_EaseOutQuad, artistalbum_ani)
end
end
EndSongInfoAnimation = function()
artistalbum.Opacity:Interpolate(100, 0, 12, 50, Interpolate_EaseOutQuad)
artistalbum2.Opacity:Interpolate(0, 100, 12, 60, Interpolate_EaseOutQuad)
end
ResetListviewCollection = function(l_3_0)
AlbumGenerator.Collection = nil
AlbumGenerator.Collection = l_3_0
if AlbumGenerator:GetCount() > 0 then
AlbumGenerator.SelectedIndex = 0
end
end
FlipAlbumArt = function()
if _config_os == "windowsmobile" then
local l_4_0 = AlbumGenerator:GetCount()
local l_4_1 = gPlayer:Database():GetAlbumArtIndex(gCurTrackIndex)
trace("Flip albumart i:" .. l_4_1 .. ", c:" .. l_4_0 .. "\n")
if l_4_1 > -1 and l_4_1 < l_4_0 then
if l_4_0 - 1 == AlbumGenerator.SelectedIndex and l_4_1 == 0 and gIsPreviousBtnPress == false then
AlbumQuery = gPlayer:Database().CurAlbumArtList
ResetListviewCollection(AlbumQuery)
else
AlbumGenerator.SelectedIndex = l_4_1
gIsPreviousBtnPress = false
end
end
end
end
if UpdateControlInfo == nil then
UpdateControlInfo = function(l_5_0)
local l_5_1 = l_5_0.Tag.name
if l_5_0.Tag.state == BUTTON_UP then
l_5_1 = l_5_1 .. "-up"
else
if l_5_0.Tag.state == BUTTON_DOWN then
l_5_1 = l_5_1 .. "-dn"
else
l_5_1 = l_5_1 .. "-disable"
end
end
l_5_0:SetTextureRef(l_5_1)
end
end
OnTimerConnectPositionChange = function(l_6_0)
l_6_0:Stop()
gPlayer.onPositionChange:connect(OnPositionChange)
end
DisconnectOnPositionChange = function()
gPlayer.onPositionChange:disconnect(OnPositionChange)
if gPosChangeTimer == nil then
gPosChangeTimer = timer(1)
gPosChangeTimer.OnElapsed:connect(OnTimerConnectPositionChange)
else
gPosChangeTimer:Start()
end
end
DoPrevious = function()
if gEngReloaded == false then
return
end
local l_8_0 = gCurTrackIndex
if gPlayer.Shuffle == true then
l_8_0 = gPlayer:Database():GetIndexForShuffle(l_8_0)
end
if l_8_0 == 0 then
return
end
gIsPreviousBtnPress = true
if _config_os == "windowsmobile" then
gPlayer:Hook()
DisconnectOnPositionChange()
gPlayer:Rewind()
else
if AlbumGenerator.SelectedIndex > 0 then
AlbumGenerator.SelectedIndex = AlbumGenerator.SelectedIndex - 1
end
end
end
DoNext = function()
if gEngReloaded == false then
return
end
local l_9_0 = gCurTrackIndex
if gPlayer.Shuffle == true then
l_9_0 = gPlayer:Database():GetIndexForShuffle(l_9_0)
end
if l_9_0 == gPlayer:Database().Count - 1 then
return
end
if _config_os == "windowsmobile" then
gPlayer:Hook()
DisconnectOnPositionChange()
gPlayer:Forward()
else
if AlbumGenerator.SelectedIndex < AlbumGenerator:GetCount() - 1 then
AlbumGenerator.SelectedIndex = AlbumGenerator.SelectedIndex + 1
end
end
end
DoPlayPause = function()
if _config_os == "windowsmobile" then
gPlayer:Hook()
if gPlayer.Status ~= MP_STATUS_PLAYING then
gPlayer.CurTrackIndex = gCurTrackIndex
else
gPlayer:PlayPause()
end
end
end
OnBtnPress = function(l_11_0)
if l_11_0.Tag.state == BUTTON_DISABLED or l_11_0.Tag.state ~= BUTTON_UP then
return
end
l_11_0.Tag.state = BUTTON_DOWN
UpdateControlInfo(l_11_0)
end
OnBtnRelease = function(l_12_0)
if l_12_0.Tag.state == BUTTON_DISABLED then
return
end
l_12_0.Tag.action()
l_12_0.Tag.state = BUTTON_UP
UpdateControlInfo(l_12_0)
end
OnBtnReleaseOutside = function(l_13_0)
if l_13_0.Tag.state == BUTTON_DISABLED then
return
end
l_13_0.Tag.state = BUTTON_UP
UpdateControlInfo(l_13_0)
end
OnEnablePosConnect = function(l_14_0, l_14_1)
l_14_0:Stop()
gPlayer.onPositionChange:connect(OnPositionChange)
end
OnIndicatorPress = function(l_15_0)
if gDuration <= 0 or gPlayer.Status ~= MP_STATUS_PAUSED and gPlayer.Status ~= MP_STATUS_PLAYING then
return
end
trackbar._visible = false
dragbar._visible = true
SongInfo._visible = false
local l_15_1 = (indicator.Position.x - gIndicator_Offset) / remainingline.Size.width * tracklineDrag_maxWidth
tracklineDrag.Size.width = l_15_1
indicatorDrag.Position.x = l_15_1 + gIndicator_Offset
gTrackX = l_15_0._xmouse
gTrackDown = true
if _config_os == "windowsmobile" then
_application.TouchFlo.HorizontalEnabled = false
_application.TouchFlo.VerticalEnabled = false
end
end
OnIndicatorRelease = function(l_16_0)
if gDuration <= 0 or gPlayer.Status ~= MP_STATUS_PAUSED and gPlayer.Status ~= MP_STATUS_PLAYING then
trace("[MG] d: " .. gDuration .. ", s: " .. gPlayer.Status .. "\n")
return
end
trackbar._visible = true
dragbar._visible = false
SongInfo._visible = true
local l_16_1 = tracklineDrag.Size.width / tracklineDrag_maxWidth
local l_16_2 = l_16_1 * gDuration
local l_16_3 = MusicHelper_IntDevide(l_16_2, 1)
l_16_1 = l_16_3 / gDuration
local l_16_4 = l_16_1 * remainingline.Size.width
passline.Size.width = l_16_4
indicator.Position.x = l_16_4 + gIndicator_Offset
indicatorPress.Position.x = indicatorPress_startPos + l_16_4
gTrackDown = false
if gPlayer.Status == MP_STATUS_PAUSED then
local gd = gDuration - l_16_3
elapse.String = MusicHelper_FormatTime(l_16_3)
remain.String = "-" .. MusicHelper_FormatTime(gd)
end
trace("[MG] drag time pos to [" .. tostring(l_16_3) .. "]\n")
gSeekPosition = l_16_3
gPlayer:SetTimePos(l_16_3)
gPlayer.onPositionChange:disconnect(OnPositionChange)
local l_16_5 = timer(0.099990844726563)
l_16_5.OnElapsed:connect(OnEnablePosConnect)
if _config_os == "windowsmobile" then
_application.TouchFlo.HorizontalEnabled = true
_application.TouchFlo.VerticalEnabled = true
end
end
OnIndicatorMove = function(l_17_0)
if gTrackDown == false then
return
end
local l_17_1 = l_17_0._xmouse - gTrackX
gTrackX = l_17_0._xmouse
tracklineDrag.Size.width = tracklineDrag.Size.width + l_17_1
indicatorDrag.Position.x = indicatorDrag.Position.x + l_17_1
indicatorPress.Position.x = indicatorPress.Position.x + l_17_1
if indicatorPress.Position.x < indicatorPress_startPos then
indicatorPress.Position.x = indicatorPress_startPos
else
if indicatorPress.Position.x > indicatorPress_maxPos then
indicatorPress.Position.x = indicatorPress_maxPos
end
end
if indicatorDrag.Position.x < gIndicator_Offset then
indicatorDrag.Position.x = gIndicator_Offset
else
if indicatorDrag.Position.x > tracklineDrag_maxWidth + gIndicator_Offset then
indicatorDrag.Position.x = tracklineDrag_maxWidth + gIndicator_Offset
end
end
if tracklineDrag.Size.width < 0 then
tracklineDrag.Size.width = 0
else
if tracklineDrag.Size.width > tracklineDrag_maxWidth then
tracklineDrag.Size.width = tracklineDrag_maxWidth
end
end
end
OnNavComplete = function()
trace("[MG] nav complete\n")
gPlayer:Hook()
gPlayer.onPlaySpecificMediaPath:connect(OnPlaySpecificMeidaPath)
if gPlayer.Status == MP_STATUS_SEARCHING then
gAMBusy = true
return
end
if gPlayer:Database().Count == 0 then
getPlayingList()
NoMusicText.String = Locale:GetString("IDS_MUSIC_NOMUSIC")
return
end
if gPlayer.Status ~= MP_STATUS_PLAYING then
if gDoNotReloadList == nil and gbWantPlaySpecificFile == false then
trace("[MG] Reload list\n")
gPlayer:ReloadList(gCurTrackIndex)
end
else
playpause.Tag.name = "pause"
UpdateControlInfo(playpause)
end
if gbWantPlaySpecificFile == true then
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -