📄 10.lua
字号:
-- Decompiled using luadec 0.6 by sztupy (http://winmo.sztupy.hu)
-- Command line was: -l ;0,4,5;0,4,5;0,4,8,17,41,48,58,64;0,4;0,4,8,15;0,0,7,11,15,19,23,27,31;;;;;;;5;;; 710a1147_manila_1193C.luac
require("theme")
if _config_os == "windowsmobile" then
require("audio_manager_svc")
gPlayer = MusicPlayer_Instance()
gOrder = nil
end
gListView_Height = 80
gManilaTrayBarHeight = 77
gScreenWidth = 480
gScreenHeight = 800
SelectAlbumLevel = function(l_1_0)
local l_1_1 = ItemListGenerator:GetData(l_1_0)
local l_1_2 = l_1_1.ChildCount
trace("[MG-Add]SelectAlbumLevel: childcount= " .. tostring(l_1_2))
for i = 1, l_1_2 do
local l_1_7 = l_1_0 + i
trace("[MG-Add]SelectAlbumLevel: i= " .. tostring(l_1_7))
local data = ItemListGenerator:GetData(l_1_7)
if data ~= nil and data.Album == l_1_1.Album then
data.IsAdded = true
local item = ItemListGenerator:GetItem(l_1_7)
if item ~= nil then
local icon = item.Namespace:FindName("CheckboxIcon")
icon:SetTextureRef("Check-box")
end
else
break
end
end
l_1_1.SelectedChildCount = l_1_2
end
DeSelectAlbumLevel = function(l_2_0)
local l_2_1 = ItemListGenerator:GetData(l_2_0)
local l_2_2 = l_2_1.ChildCount
trace("[MG-Add]DeSelectAlbumLevel: childcount= " .. tostring(l_2_2))
for i = 1, l_2_2 do
local l_2_7 = l_2_0 + i
trace("[MG-Add]DeSelectAlbumLevel: i= " .. tostring(l_2_7))
local data = ItemListGenerator:GetData(l_2_7)
if data ~= nil and data.Album == l_2_1.Album then
data.IsAdded = false
local item = ItemListGenerator:GetItem(l_2_7)
if item ~= nil then
local icon = item.Namespace:FindName("CheckboxIcon")
icon:SetTextureRef("Check-box-empty")
end
else
break
end
end
l_2_1.SelectedChildCount = 0
end
HandleItemSelection = function(l_3_0)
local l_3_1 = ItemListGenerator:GetData(l_3_0)
local l_3_2 = ItemListGenerator:GetItem(l_3_0)
if l_3_1 == nil or l_3_2 == nil then
return
end
local l_3_3 = l_3_2.Namespace:FindName("CheckboxIcon")
if l_3_1.IsAdded == true then
l_3_1.IsAdded = false
l_3_3:SetTextureRef("Check-box-empty")
if l_3_1.Level == 0 then
DeSelectAlbumLevel(l_3_0)
elseif gOrder == "10" or gOrder == "50" or gOrder == "60" then
local l_3_4 = l_3_1.ParentIndex
if l_3_0 < l_3_4 then
return
end
local l_3_5 = ItemListGenerator:GetData(l_3_4)
if l_3_5 ~= nil then
l_3_5.IsAdded = false
l_3_5.SelectedChildCount = l_3_5.SelectedChildCount - 1
local l_3_6 = ItemListGenerator:GetItem(l_3_4)
if l_3_6 ~= nil then
local l_3_7 = l_3_6.Namespace:FindName("CheckboxIcon")
if l_3_5.SelectedChildCount > 0 and l_3_5.SelectedChildCount < l_3_5.ChildCount then
l_3_7:SetTextureRef("Check-box-semi")
elseif l_3_5.SelectedChildCount == 0 then
l_3_7:SetTextureRef("Check-box-empty")
end
end
trace("[MG-add] HandleItemSelection(), parent.Album: " .. l_3_5.Album .. ", SelectedChildCount: " .. tostring(SelectedChildCount))
end
end
else
l_3_1.IsAdded = true
l_3_3:SetTextureRef("Check-box")
if l_3_1.Level == 0 then
SelectAlbumLevel(l_3_0)
else
if gOrder == "10" or gOrder == "50" or gOrder == "60" then
local l_3_4 = l_3_1.ParentIndex
if l_3_0 < l_3_4 then
return
end
local l_3_5 = ItemListGenerator:GetData(l_3_4)
if l_3_5 ~= nil then
l_3_5.IsAdded = false
l_3_5.SelectedChildCount = l_3_5.SelectedChildCount + 1
local l_3_6 = ItemListGenerator:GetItem(l_3_4)
if l_3_6 ~= nil then
local l_3_7 = l_3_6.Namespace:FindName("CheckboxIcon")
if l_3_5.SelectedChildCount > 0 and l_3_5.SelectedChildCount < l_3_5.ChildCount then
l_3_5.IsAdded = false
l_3_7:SetTextureRef("Check-box-semi")
else
if l_3_5.SelectedChildCount == l_3_5.ChildCount then
l_3_5.IsAdded = true
l_3_7:SetTextureRef("Check-box")
end
end
end
trace("[MG-add] HandleItemSelection(), parent.Album: " .. l_3_5.Album .. ", SelectedChildCount: " .. tostring(SelectedChildCount))
end
end
end
end
end
HandleSelectionForItem = function(l_4_0)
local l_4_1 = l_4_0.Namespace:FindName("title")
local l_4_2 = l_4_0.Namespace:FindName("albumartist")
local l_4_3 = l_4_0.Namespace:FindName("Background_level")
l_4_3._visible = false
l_4_1.Color = GetMainTextSelectedColor()
l_4_2.Color = GetSubTextSelectedColor()
end
HandleDeselectionForItem = function(l_5_0)
local l_5_1 = l_5_0.Namespace:FindName("title")
local l_5_2 = l_5_0.Namespace:FindName("albumartist")
l_5_1.Color = GetMainTextUnselectedColor()
l_5_2.Color = GetSubTextUnselectedColor()
local l_5_3 = l_5_0.Tag
if (gOrder == "10" or gOrder == "50" or gOrder == "60") and l_5_3.Level == 0 then
l_5_0.Namespace:FindName("Background_level")._visible = true
end
end
HandleItemCreated = function(l_6_0, l_6_1)
if _config_os == "windowsmobile" then
local l_6_2 = l_6_1.Namespace:FindName("title")
local l_6_3 = l_6_1.Namespace:FindName("albumartist")
local l_6_4 = l_6_1.Namespace:FindName("image")
local l_6_5 = l_6_1.Namespace:FindName("frame")
local l_6_6 = l_6_1.Namespace:FindName("CheckboxIcon")
local l_6_7 = l_6_1.Namespace:FindName("Background_level")
local l_6_8 = l_6_1.Namespace:FindName("seperator")
l_6_7.Size.width = gScreenWidth
l_6_8.TextureCoords:set(0, 0, gScreenWidth / 2, 1)
l_6_8.Size.width = gScreenWidth
l_6_2.Size.width = gScreenWidth - 160
l_6_3.Size.width = gScreenWidth - 160
l_6_6.Position.x = gScreenWidth - 62
l_6_0.IsRealized = true
l_6_1.Tag = l_6_0
l_6_7._visible = false
l_6_2.Color = GetMainTextUnselectedColor()
l_6_3.Color = GetSubTextUnselectedColor()
l_6_2.Size.height = gListView_Height / 2
l_6_3._visible = true
if gOrder == "4" then
l_6_2.String = l_6_0.Title
l_6_3.String = l_6_0.Artist
if l_6_0.ArtPath ~= "" and MusicHelper_FileExists(l_6_0.ArtPath) == true then
l_6_4:SetTextureRef("Music_tile")
if ListImageLoader == nil then
ListImageLoader = ListImageLoaderClass()
end
ListImageLoader:AddImage(l_6_4, l_6_0)
else
l_6_4:SetTextureRef("Music_tile")
end
elseif gOrder == "10" or gOrder == "50" or gOrder == "60" then
if l_6_0.Level == 0 then
l_6_7._visible = true
l_6_3._visible = false
l_6_4._visible = true
l_6_5._visible = true
l_6_2.String = l_6_0.Album
l_6_2.Size.height = gListView_Height
if l_6_0.ArtPath ~= "" and MusicHelper_FileExists(l_6_0.ArtPath) == true then
l_6_4:SetTextureRef("Music_tile")
if ListImageLoader == nil then
ListImageLoader = ListImageLoaderClass()
end
ListImageLoader:AddImage(l_6_4, l_6_0)
else
l_6_4:SetTextureRef("Music_tile")
end
else
l_6_4._visible = false
l_6_5._visible = false
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -