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

📄 0.lua

📁 htc manila 2 sourcecode
💻 LUA
📖 第 1 页 / 共 2 页
字号:
-- Decompiled using luadec 0.6 by sztupy (http://winmo.sztupy.hu)
-- Command line was: -l ;;;;0,0,0,4,17;;0,0,0,12;;;0,0,7,11;;;;;;;;;;2,5,240;;;;;;;;; 42400af9_manila_608.luac 

require("theme")
require("audio_manager_svc")
trace("[MG] Group list\n")
if _config_os == "windowsmobile" then
   gPlayer = MusicPlayer_Instance()
   gOrder = nil
   gAddSongs = nil
end
gListView_Height = 80
gSubTitleHeight = 51
gScreenWidth = 480
gScreenHeight = 800
easeInOut = function(l_1_0, l_1_1, l_1_2, l_1_3)
   l_1_0 = l_1_0 / l_1_3
   if 2 * (l_1_0) < 1 then
      return l_1_2 / 2 * (l_1_0) * (l_1_0) + l_1_1
   else
      l_1_0 = l_1_0 - 1
      return -l_1_2 / 2 * ((l_1_0) * (l_1_0 - 2)) + l_1_1
   end
end

easeOut = function(l_2_0, l_2_1, l_2_2, l_2_3)
   l_2_0 = l_2_0 / l_2_3
   return -l_2_2 * (l_2_0) * (l_2_0 - 2) + l_2_1
end

easeIn = function(l_3_0, l_3_1, l_3_2, l_3_3)
   l_3_0 = l_3_0 / l_3_3
   return l_3_2 * (l_3_0) * (l_3_0) + l_3_1
end

EnterList = function(l_4_0)
   local l_4_1 = nil
   local l_4_2 = nil
   local l_4_3 = ItemListGenerator:GetData(l_4_0)
   if gOrder ~= "3" then
      l_4_2 = l_4_3.Title
   else
      l_4_2 = l_4_3.UID
      MusicConfig_Instance():SetSetting(CONFIG_CURRENT_PLAYLIST_NAME, l_4_3.Name)
   end
   local l_4_4 = true
   if gOrder == "1" then
      if gAddSongs == "1" then
         l_4_1 = URL("Manila://music/playlist/AddSongs/AddbyArtist/allsongs.page")
         l_4_4 = false
      else
         l_4_1 = URL("Manila://music/artist/albums.page")
         l_4_4 = true
      end
      MusicConfig_Instance():SetSetting(CONFIG_CURRENT_ARTIST, l_4_2)
   elseif gOrder == "2" then
      if gAddSongs == "1" then
         l_4_1 = URL("Manila://music/playlist/AddSongs/AddbyAlbum/allsongs.page")
         l_4_4 = false
      else
         l_4_1 = URL("Manila://music/album/allsongs.page")
         l_4_4 = true
      end
      MusicConfig_Instance():SetSetting(CONFIG_CURRENT_ALBUM, l_4_2)
   elseif gOrder == "3" then
      l_4_1 = URL("Manila://music/playlist/allsongs.page")
      MusicConfig_Instance():SetSetting(CONFIG_CURRENT_PLAYLIST, l_4_2)
      if l_4_3.IsWmp == true then
         l_4_1.Parameters:AddParameter("IsWMPPlaylist", "1")
      else
         l_4_1.Parameters:AddParameter("IsWMPPlaylist", "0")
      end
   elseif gOrder == "5" then
      if gAddSongs == "1" then
         l_4_1 = URL("Manila://music/playlist/AddSongs/AddbyGenre/allsongs.page")
         l_4_4 = false
      else
         l_4_1 = URL("Manila://music/genre/artists.page")
         l_4_4 = true
      end
      MusicConfig_Instance():SetSetting(CONFIG_CURRENT_GENRE, l_4_2)
   elseif gOrder == "6" then
      if gAddSongs == "1" then
         l_4_1 = URL("Manila://music/playlist/AddSongs/AddbyComposer/allsongs.page")
         l_4_4 = false
      else
         l_4_1 = URL("Manila://music/composer/artists.page")
         l_4_4 = true
      end
      MusicConfig_Instance():SetSetting(CONFIG_CURRENT_COMPOSER, l_4_2)
   elseif gOrder == "10" then
      l_4_1 = URL("Manila://music/artist/album/allsongs.page")
      MusicConfig_Instance():SetSetting(CONFIG_CURRENT_ALBUM, l_4_2)
   elseif gOrder == "50" then
      l_4_1 = URL("Manila://music/genre/artist/allsongs.page")
      MusicConfig_Instance():SetSetting(CONFIG_CURRENT_ARTIST, l_4_2)
   elseif gOrder == "51" then
      l_4_1 = URL("Manila://music/genre/album/allsongs.page")
      MusicConfig_Instance():SetSetting(CONFIG_CURRENT_ALBUM, l_4_2)
   elseif gOrder == "60" then
      l_4_1 = URL("Manila://music/composer/artist/allsongs.page")
      MusicConfig_Instance():SetSetting(CONFIG_CURRENT_ARTIST, l_4_2)
   elseif gOrder == "61" then
      l_4_1 = URL("Manila://music/composer/album/allsongs.page")
      MusicConfig_Instance():SetSetting(CONFIG_CURRENT_ALBUM, l_4_2)
   end
   _application.Navigation:Navigate(l_4_1, l_4_4)
end

HandleItemSelection = function(l_5_0)
   EnterList(l_5_0)
end

HandleKeyForItem = function(l_6_0, l_6_1, l_6_2)
   if l_6_1.Code == KeyCode_Return or l_6_1.Code == KeyCode_Space then
      local l_6_3 = ItemListGenerator:GetIndexForItem(l_6_0)
      EnterList(l_6_3)
      l_6_2.value = true
   end
end

HandleSelectionForItem = function(l_7_0)
   l_7_0.Namespace:FindName("title").Color = GetMainTextSelectedColor()
end

HandleDeselectionForItem = function(l_8_0)
   l_8_0.Namespace:FindName("title").Color = GetMainTextUnselectedColor()
end

HandleItemCreated = function(l_9_0, l_9_1)
   if _config_os == "windowsmobile" then
      local l_9_2 = l_9_1.Namespace:FindName("title")
      local l_9_3 = l_9_1.Namespace:FindName("seperator")
      l_9_2.Color = GetMainTextUnselectedColor()
      l_9_1.Tag = nil
      l_9_3.TextureCoords:set(0, 0, gScreenWidth / 2, 1)
      l_9_3.Size.width = gScreenWidth
      if gOrder == "3" then
         local frame = l_9_1.Namespace:FindName("frame")
         local image = l_9_1.Namespace:FindName("image")        
         l_9_2.Position.x = 90         
         l_9_2.Size.width = gScreenWidth - 130         
         l_9_2.String = l_9_0.Name         
         frame._visible = true         
         trace("[MG] Playlist " .. l_9_0.Name .. ". WMP " .. tostring(l_9_0.IsWmp) .. "\n")
         image._visible = true
         image.Position.x = 12
         if l_9_0.IsWmp == true then
            image:SetTextureRef("music-wmp-playlist")
         else
            image:SetTextureRef("music-playlist")
         end
      elseif gOrder == "2" or gOrder == "10" or gOrder == "51" or gOrder == "61" then
         l_9_2.String = l_9_0.Title
         local mwc = MusicWhereConditions()
         mwc:AddCondition(l_9_0.Title)
         local gl = gPlayer:Database():GetList(VID_SONGS_OF_ALBUM, mwc)
         local frame = l_9_1.Namespace:FindName("frame")
         local image = l_9_1.Namespace:FindName("image")           
         if gl:GetCount() > 0 then
            local gli = gl:GetItem(0)           
            gli.IsRealized = true
            l_9_1.Tag = gli
            frame._visible = true
            image._visible = true
            image.Position.x = 12
            l_9_2.Position.x = 90
            l_9_2.Size.width = gScreenWidth - 130
            if gli.ArtPath ~= "" and MusicHelper_FileExists(gli.ArtPath) == true then
               image:SetTextureRef("Music_tile")
               if ListImageLoader == nil then
                  ListImageLoader = ListImageLoaderClass()
               end
               ListImageLoader:AddImage(image, gli)
            else
               image:SetTextureRef("Music_tile")
            end
         else
            image:SetTextureRef("Music_tile")
         end
      else
         l_9_2.String = l_9_0.Title
         l_9_2.Position.x = 20
         l_9_2.Size.width = gScreenWidth - 60
      end
      l_9_1.Focusable = true
      l_9_1.onKeyDown:connect(HandleKeyForItem)
      l_9_1.OnSelected:connect(HandleSelectionForItem)
      l_9_1.OnDeselected:connect(HandleDeselectionForItem)
   end
end

HandleItemDestroyed = function(l_10_0)
   if gOrder ~= "3" and l_10_0.Tag ~= nil then
      l_10_0.Tag.IsRealized = false
   end
   l_10_0.onKeyDown:disconnect(HandleKeyForItem)
   l_10_0.OnSelected:disconnect(HandleSelectionForItem)
   l_10_0.OnDeselected:disconnect(HandleDeselectionForItem)
end

ShowMenu = function()
   DialogRequest = _application.DialogManager:GetDialog(URL("Manila://music-browser-playlist.dialog"))
   DialogRequest.OnExit:connect(DialogCallback)
   DialogRequest:Show()
end

DialogCallback = function(l_12_0)
   l_12_0.OnExit:disconnect(DialogCallback)
   listview:Focus()
   if l_12_0.Result.ExitType == DialogExitType_Cancel then
      return 
   end
   if l_12_0.Result.UserValue == "New" then
      _application.Navigation:Navigate(URL("Manila://music/playlist/Input/New/new_playlist.page"))
      return 
   else
      if l_12_0.Result.UserValue == "Delete" then
         _application.Navigation:Navigate(URL("Manila://music/playlist/Delete/D_playlist/deleteplaylists.page"))
         return 
      else
         if l_12_0.Result.UserValue == "Player" then
            _application.Navigation:Navigate(URL("Manila://music.page"))
            return 
         end
      end
   end
end

GotoUpLayer = function()
   _application.Navigation:NavigateBack()
end

⌨️ 快捷键说明

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