⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 4.lua

📁 htc manila 2 sourcecode
💻 LUA
字号:
-- Decompiled using luadec 1.0 by sztupy (http://winmo.sztupy.hu)
-- Command line was: -l2 73;;;;;;;2,6;4;;;;;;;1,1,19,23,27,31,74-91,101-126,108-118,136; 252e3f90_manila_D1DA.luac 
-- with minor Q16.16 conversion error

if _config_os == "windowsmobile" then
   AlbumQuery = MusicPlayer_Instance():Database().CurAlbumArtList
   Condition = MusicWhereConditions()
else
   AlbumQuery = VectorNotifyint()
   for i = 0, 11 do
      AlbumQuery:push_back(i)
   end
end
AlbumLayout = class()
gFirstLaunch = true
gFirstCreateCount = 0
AlbumLayout.__init = function(l_1_0, l_1_1)
   l_1_0.Base = l_1_1
   l_1_1.ExtendGetRealizedViewport:connect(AlbumLayout.GetRealizedViewport, l_1_0)
   l_1_1.ExtendGetPositionAtPoint:connect(AlbumLayout.GetPositionAtPoint, l_1_0)
   l_1_1.ExtendGetOpacityAtPoint:connect(AlbumLayout.GetOpacityAtPoint, l_1_0)
   l_1_1.ExtendGetRotationAtPoint:connect(AlbumLayout.GetRotationAtPoint, l_1_0)
   l_1_1.ExtendGetScaleAtPoint:connect(AlbumLayout.GetScaleAtPoint, l_1_0)
   l_1_1.OnItemArranged:connect(AlbumLayout.OnItemArranged, l_1_0)
   l_1_1.UsePositionPath = true
   l_1_1.UseOpacityPath = true
   l_1_1.UseRotationPath = true
   l_1_1.UseScalePath = true
   l_1_1.SmoothPosition = true
   l_1_1.SmoothOpacity = true
   l_1_1.SmoothRotation = true
   l_1_1.SmoothScale = true
   l_1_1.PositionSmoothFactor = 5
   l_1_1.OpacitySmoothFactor = 3
   l_1_1.RotationSmoothFactor = 5
   l_1_1.ScaleSmoothFactor = 5
end

AlbumLayout.GetPositionAtPoint = function(l_2_0, l_2_1, l_2_2, l_2_3, l_2_4, l_2_5)
   if l_2_3.y >= 0 then
      l_2_4.value.x = 0
      l_2_4.value.y = 0
      l_2_4.value.z = l_2_3.y * -1000
   else
      l_2_4.value.x = 0
      l_2_4.value.y = 0
      l_2_4.value.z = 0
   end
   l_2_5.value = true
end

AlbumLayout.GetOpacityAtPoint = function(l_3_0, l_3_1, l_3_2, l_3_3, l_3_4, l_3_5)
   if l_3_3.y < 0 or l_3_3.y >= 1 then
      l_3_4.value = 0
   else
      l_3_4.value = 100
   end
   l_3_5.value = true
end

AlbumLayout.GetScaleAtPoint = function(l_4_0, l_4_1, l_4_2, l_4_3, l_4_4, l_4_5)
   l_4_4.value.x = 0.89999389648438
   l_4_4.value.y = 1
   l_4_4.value.z = 1
   l_4_5.value = true
end

AlbumLayout.GetRotationAtPoint = function(l_5_0, l_5_1, l_5_2, l_5_3, l_5_4, l_5_5)
   if l_5_3.y < 0 then
      l_5_4.value.x = l_5_3.y / 0.33332824707031 * -70
      l_5_4.value.y = 0
      l_5_4.value.z = 0
   else
      l_5_4.value.x = 0
      l_5_4.value.y = 0
      l_5_4.value.z = 0
   end
   l_5_5.value = true
end

AlbumLayout.GetRealizedViewport = function(l_6_0, l_6_1, l_6_2, l_6_3)
   l_6_1.value.y = l_6_1.value.y - 256
   l_6_2.value.y = l_6_2.value.y + 512
   l_6_3.value = true
end

AlbumLayout.OnItemArranged = function(l_7_0, l_7_1, l_7_2, l_7_3, l_7_4)
   local l_7_5 = l_7_2.Rotation.x
   local l_7_6 = l_7_2.Namespace:FindName("artreflection")
   local l_7_7 = l_7_2.Namespace:FindName("Shadow")
   l_7_6.Rotation.x = 180 - l_7_5 * 2
   l_7_7.Rotation.x = -l_7_5 - 90
   l_7_6.Opacity.value = 20 + l_7_2.Position.z * 0.0099945068359375
end

AlignVerticalScroll = function()
   local l_8_0 = AlbumList:GetGenerator().SelectedIndex
   if l_8_0 >= 0 then
      AlbumList:GetLayout():JumpToIndex(l_8_0, ListAlignment_Top, ListAlignmentOptions_Snap)
   end
end

HandleItemsAdded = function(l_9_0, l_9_1)
   AlignVerticalScroll()
end

HandleItemsRemoved = function(l_10_0, l_10_1)
   AlignVerticalScroll()
end

HandleItemsMoved = function(l_11_0, l_11_1, l_11_2)
   AlignVerticalScroll()
end

HandleItemsReplaced = function(l_12_0, l_12_1)
   AlignVerticalScroll()
end

HandleCollectionReset = function()
   AlignVerticalScroll()
end

HandleSelectedIndexChanged = function(l_14_0, l_14_1)
   AlignVerticalScroll()
end

OnAlbumItemCreated = function(l_15_0, l_15_1)
   local l_15_2, l_15_3 = nil, true
   if _config_os == "windowsmobile" then
      l_15_2 = l_15_0.ArtPath
      if MusicHelper_FileExists(l_15_2) == false then
         l_15_2 = ""
      end
      l_15_3 = MusicHelper_FileExists(l_15_0.FilePath)
   end
   local l_15_4 = l_15_1.Namespace:FindName("art")
   local l_15_5 = l_15_1.Namespace:FindName("artreflection")
   local l_15_6 = AlbumGenerator:GetIndexForItem(l_15_1)
   l_15_1.Opacity.value = 0
   l_15_5._visible = false
   local l_15_7 = false
   if gFirstLaunch == true then
      if AlbumGenerator.SelectedIndex == 0 and l_15_6 == 0 then
         l_15_7 = true
      elseif l_15_6 > 0 and gFirstCreateCount < 4 then
         l_15_7 = true
      end
      if AlbumGenerator.SelectedIndex == 0 and l_15_6 == 3 then
         l_15_7 = false
      end
      if AlbumGenerator.SelectedIndex > 0 and l_15_6 == AlbumGenerator.SelectedIndex - 1 and gFirstCreateCount == 0 then
         l_15_7 = false
      end
      gFirstCreateCount = gFirstCreateCount + 1
   end
   if l_15_3 == false then
      local l_15_8 = "Music_default_art"
      if gPlayer:Database():CheckGroupMusics(l_15_6) == false then
         l_15_8 = "MusicRemove"
      end
      l_15_4:SetTextureRef(l_15_8)
      if l_15_7 then
         l_15_1.Opacity.value = 100
      end
   elseif l_15_2 == "[DUMMY]" then
      l_15_4:SetTextureRef("dummy")
   elseif l_15_2 ~= "" then
      local l_15_9 = Image()
      if l_15_9:LoadFile(l_15_2) then
         local l_15_10 = l_15_9:GetTexture()
         l_15_4:SetTexture(l_15_10)
         if l_15_7 then
            l_15_1.Opacity.value = 100
         end
         l_15_9:Clear()
      else
         l_15_4:SetTextureRef("Music_default_art")
         if l_15_7 then
            l_15_1.Opacity.value = 100
         end
       end
   else
      l_15_4:SetTextureRef("Music_default_art")
      if l_15_7 then
         l_15_1.Opacity.value = 100
      end
   end
   
   
   
   local l_15_11 = AlbumGenerator:GetCount()
   if gFirstCreateCount >= 4 or l_15_6 == l_15_11 - 1 then
      gFirstLaunch = false
   end
end

local l_0_0 = AlbumLayout(PathLayout())
l_0_0.Base:SetItemSize(256, 256, 0)
AlbumList:SetLayout(l_0_0.Base)
AlbumList.AllowScrollToEnd = true
if _config_os == "windowsmobile" then
   if gAMBusy == true then
      AlbumQuery = nil
   end
   AlbumGenerator = LibraryGeneratorMusicInfo(AlbumQuery, AlbumList:GetMovie(), AlbumList.ComponentLibraryName, AlbumList.ComponentLibraryID)
else
   AlbumGenerator = LibraryGeneratorint(AlbumQuery, AlbumList:GetMovie(), AlbumList.ComponentLibraryName, AlbumList.ComponentLibraryID)
end
AlbumGenerator.ItemCreated:connect(OnAlbumItemCreated)
AlbumGenerator.ItemsAdded:connect(HandleItemsAdded)
AlbumGenerator.ItemsRemoved:connect(HandleItemsRemoved)
AlbumGenerator.ItemsMoved:connect(HandleItemsMoved)
AlbumGenerator.ItemsReplaced:connect(HandleItemsReplaced)
AlbumGenerator.CollectionReset:connect(HandleCollectionReset)
AlbumGenerator.SelectedIndexChanged:connect(HandleSelectedIndexChanged)
AlbumGenerator.RecycleItems = true
AlbumList:SetGenerator(AlbumGenerator)
if AlbumGenerator:GetCount() > 0 then
   AlbumGenerator.SelectedIndex = 0
end
if _config_os == "windowsmobile" and gAMBusy == false then
   OnPlayingIndexChange(gCurTrackIndex)
end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -