programlist_landscape.luac.lua

来自「htc manila 2 sourcecode」· LUA 代码 · 共 92 行

LUA
92
字号
-- Decompiled using luadec 0.4 by sztupy (http://winmo.sztupy.hu)
-- Command line was: -l ;0;0,4;0,12,50; 6ec19d9f_manila.luac 

trace("Load ProgramList_Landscape.lua begin")
require("Common\\LayoutInfo")
_LayoutInfo = LayoutInfo()
ProgramList_ScreenRotation = class(RotationTemplate)
ProgramList_ScreenRotation.__init = function(l_1_0)
   RotationTemplate.__init(l_1_0)
   trace("+++++++[ProgramList_ScreenRotation] : __init")
end

ProgramList_ScreenRotation.OnScreenRotation = function(l_2_0)
   trace("+++++++[ProgramList_ScreenRotation] : OnScreenRotation")
   local l_2_1 = screenHeight
   l_2_1 = l_2_1 - 2 * SystemTitlebarHeight
   Camera_2D.Viewport.value = RectF(0, 0, screenWidth, l_2_1)
   Camera_2D.ViewLeft.value = 0
   Camera_2D.ViewRight.value = screenWidth
   Camera_2D.ViewTop.value = 0
   Camera_2D.ViewButtom.value = -(l_2_1)
   Program_Cam.Viewport.value = RectF(0, 0, screenWidth, l_2_1)
   Program_Cam.ViewLeft.value = 0
   Program_Cam.ViewRight.value = screenWidth
   Program_Cam.ViewTop.value = 0
   Program_Cam.ViewButtom.value = l_2_1
   if l_2_0._application.Orientation == ScreenOrientation_Portrait then
      Program_Cam.CameraPosition.value = Vector3(0, 0, (l_2_1) / 2)
      Mask.Rectangle = RectFProperty(RectF(240, 348, 480, 636))
      ProgramListGroup.Position.x = -Program_Cam.Viewport.width / 2
      ProgramListGroup.Position.y = Program_Cam.Viewport.height / 2 - ManilaTitleBarHeight
      ItemSizeWidth = 480
      ItemSizeHeight = Common_ListViewItemHeight + 1
      LVPositionX = 0
      LVPositionY = 0
      LVWidth = 480
      LVHeight = 636
      APNameWidth = 350
   elseif l_2_0._application.Orientation == ScreenOrientation_Landscape then
      Program_Cam.CameraPosition.value = Vector3(0, 0, (l_2_1) / 2)
      Mask.Rectangle = RectFProperty(RectF(-500, 188, 2000, 2000))
      ProgramListGroup.Position.x = -Program_Cam.Viewport.width / 2
      ProgramListGroup.Position.y = Program_Cam.Viewport.height / 2 - ManilaTitleBarHeight
      ItemSizeWidth = 800
      ItemSizeHeight = Common_ListViewItemHeight + 1
      LVPositionX = 0
      LVPositionY = 0
      LVWidth = 800
      LVHeight = 318
      APNameWidth = 670
   end
   l_2_0:ResetListViewContent()
end

ProgramList_ScreenRotation.ResetListViewContent = function(l_3_0)
   trace("+++++++[ProgramList_ScreenRotation] : ResetListViewContent")
   if not ProgramListView:HasLayout() then
      return 
   end
   local l_3_1 = ProgramListView:GetLayout()
   l_3_1 = l_3_1.SelectionNode
   if l_3_0._application.Orientation == ScreenOrientation_Portrait then
      l_3_1.Scale = Vector3Property(Vector3(1, 1, 1))
   else
      if l_3_0._application.Orientation == ScreenOrientation_Landscape then
         l_3_1.Scale = Vector3Property(Vector3(1.6999969482422, 1, 1))
      end
   end
   ProgramListView.Viewport.x = LVWidth
   ProgramListView.Viewport.y = LVHeight
   local l_3_2 = Vector3F()
   l_3_2.x = ItemSizeWidth
   l_3_2.y = ItemSizeHeight
   l_3_2.z = 0
   ProgramListView:GetLayout().ItemSize = l_3_2

   local l_3_2, l_3_3, l_3_4 = nil
   for i = 0, ProgramListView:GetGenerator():GetCount() - 1 do
      l_3_2 = ProgramListView:GetGenerator():GetItem(i)
      if l_3_2 then
         l_3_3 = l_3_2.Namespace:FindName("DottedLine")
         l_3_3.Size.width = ItemSizeWidth
         l_3_3.TextureCoords:set(0, 0, ItemSizeWidth / 2, 1)
         l_3_4 = l_3_2.Namespace:FindName("ProgramListItemText")
         l_3_4.Size.width = APNameWidth
      end
   end
end

trace("Load ProgramList_Landscape.lua end")

⌨️ 快捷键说明

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