musicgroup_landscape.luac.lua
来自「htc manila 2 sourcecode」· LUA 代码 · 共 94 行
LUA
94 行
-- Decompiled using luadec 0.4 by sztupy (http://winmo.sztupy.hu)
-- Command line was: -l ;62;0;0,8; 59da06e0_manila.luac
trace("Load MusicGroup_Landscape.lua begin")
require("Common\\LayoutInfo")
_LayoutInfo = LayoutInfo()
gListviewViewportOffset = 51
ResetListViewContent = function()
trace("+++++++[MusicGroup_ScreenRotation] : ResetListViewContent")
if not listview:HasLayout() then
return
end
listview.Viewport.x = screenWidth
if _application.Orientation == ScreenOrientation_Portrait then
listview.Viewport.y = screenHeight - 258
if gAddSongs == "1" then
listview.Viewport.y = listview.Viewport.y - gListviewViewportOffset
end
elseif _application.Orientation == ScreenOrientation_Landscape then
listview.Viewport.y = screenHeight - 2 * SystemTitlebarHeight - ManilaTitleBarHeight
if gAddSongs == "1" then
listview.Viewport.y = listview.Viewport.y - gListviewViewportOffset
end
end
local l_1_0 = Vector3F()
l_1_0.x = screenWidth
l_1_0.y = gListView_Height
l_1_0.z = 0
listview:GetLayout().ItemSize = l_1_0
local l_1_0, l_1_1, l_1_2 = nil, nil
for i = 0, ItemListGenerator:GetCount() - 1, 1 do
l_1_0 = ItemListGenerator:GetItem(i)
if l_1_0 then
l_1_1 = l_1_0.Namespace:FindName("seperator")
l_1_1.TextureCoords:set(0, 0, screenWidth / 2, 1)
l_1_1.Size.width = screenWidth
l_1_2 = l_1_0.Namespace:FindName("title")
l_1_2.Size.width = screenWidth - 60
end
end
end
MusicGroup_ScreenRotation = class(RotationTemplate)
MusicGroup_ScreenRotation.__init = function(l_2_0)
RotationTemplate.__init(l_2_0)
trace("+++++++[MusicGroup_ScreenRotation] : __init")
end
MusicGroup_ScreenRotation.OnScreenRotation = function(l_3_0)
trace("+++++++[MusicGroup_ScreenRotation] : OnScreenRotation")
gScreenWidth = screenWidth
gScreenHeight = screenHeight
local l_3_1 = screenHeight
l_3_1 = l_3_1 - 2 * SystemTitlebarHeight
camera.Viewport.value = RectF(0, 0, screenWidth, l_3_1)
camera.ViewRight.value = screenWidth
camera.ViewButtom.value = -(l_3_1)
Mask.Rectangle = RectFProperty(RectF(0, 60, screenWidth, screenHeight))
SubTitleBg.Size.width = screenWidth
SubTitleText.Size.width = screenWidth
SelectorRight.Position.x = screenWidth
SelectorMain.Size.width = screenWidth - 8
SelectorHightRight.Size.width = screenWidth / 2 - 8
SelectorHightLeft.Size.width = screenWidth / 2 - 8
SelectorHightLeft.Position.x = screenWidth - 8
highlightRight.Position.x = screenWidth
if _application.Orientation == ScreenOrientation_Portrait then
trace("+++++++[MusicGroup_ScreenRotation] : Portrait mode")
newplaylist_img.Position.y = -144
newplaylist_text.VerticalAlignment = Top
newplaylist_text.Size.width = screenWidth
newplaylist_text.Position.y = newplaylist_img.Position.y - newplaylist_img.Size.height - 24
newplaylist_text.Position.x = 0
else
if _application.Orientation == ScreenOrientation_Landscape then
trace("+++++++[MusicGroup_ScreenRotation] : Landscape mode")
newplaylist_img.Position.y = -86
newplaylist_text.VerticalAlignment = VerticalCenter
newplaylist_text.Size.width = screenWidth / 2
newplaylist_text.Position.y = newplaylist_img.Position.y - (newplaylist_img.Size.height - newplaylist_text.Size.height) / 2
newplaylist_text.Position.x = screenWidth / 2
end
end
if ImgHitFeedback ~= nil then
ImgHitFeedback:SetImagePosition(newplaylist_img.Position.x, newplaylist_img.Position.y)
end
ResetListViewContent()
end
trace("Load MusicGroup_Landscape.lua end")
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?