programs_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 ;31;0;0,4; 1e448016_manila.luac 

trace("Load Programs_Landscape.lua begin")
require("Common\\LayoutInfo")
_LayoutInfo = LayoutInfo()
ResetListViewContent = function()
   trace("+++++++[Programs_ScreenRotation] : ResetListViewContent")
   PageListView.IndicatorBarOffset = IndictorPositionX
   if not PageListView:HasLayout() then
      return 
   end
   PageListView.Position.x = LVPositionX
   PageListView.Position.y = -LVPositionY
   PageListView.Viewport.x = LVWidth
   PageListView.Viewport.y = LVHeight
   local l_1_0 = Vector3F()
   l_1_0.x = ItemSizeWidth
   l_1_0.y = ItemSizeHeight
   l_1_0.z = 0
   PageListView:GetLayout().ItemSize = l_1_0
   local l_1_1 = nil
   local l_1_2 = nil
   local l_1_3 = nil
   for i = 0, PageListView:GetGenerator():GetCount() - 1 do
      l_1_1 = PageListView:GetGenerator():GetItem(i)
      if l_1_1 then
         l_1_2 = l_1_1.Namespace:FindName("APName")
         l_1_2.Size.width = ItemSizeWidth
         l_1_2.Position.y = -APNameHeight
         l_1_3 = l_1_1.Namespace:FindName("PageBackground")
         l_1_3.Position.x = (ItemSizeWidth - l_1_3.Size.width) / 2
         l_1_3.Position.y = -(ItemSizeHeight - l_1_3.Size.height) / 2
      end
   end
end

Programs_ScreenRotation = class(RotationTemplate)
Programs_ScreenRotation.__init = function(l_2_0)
   RotationTemplate.__init(l_2_0)
   trace("+++++++[Programs_ScreenRotation] : __init")
end

Programs_ScreenRotation.OnScreenRotation = function(l_3_0)
   trace("+++++++[Programs_ScreenRotation] : OnScreenRotation")
   local l_3_1 = screenHeight
   l_3_1 = l_3_1 - 2 * SystemTitlebarHeight
   Camera_2D.Viewport.value = RectF(0, 0, screenWidth, l_3_1)
   Camera_2D.ViewLeft.value = 0
   Camera_2D.ViewRight.value = screenWidth
   Camera_2D.ViewTop.value = 0
   Camera_2D.ViewButtom.value = -(l_3_1)
   Program_Cam.Viewport.value = RectF(0, 0, screenWidth, l_3_1)
   Program_Cam.ViewLeft.value = 0
   Program_Cam.ViewRight.value = screenWidth
   Program_Cam.ViewTop.value = 0
   Program_Cam.ViewButtom.value = l_3_1
   if _application.Orientation == ScreenOrientation_Portrait then
      Program_Cam.CameraPosition.value = Vector3(0, 0, 420)
      Mask.Rectangle = RectFProperty(RectF(240, 348, 480, 560))
      ProgramGroup.Position.x = -Program_Cam.Viewport.width / 2
      ProgramGroup.Position.y = Program_Cam.Viewport.height / 2 - ManilaTitleBarHeight
      ItemSizeWidth = 148.5
      ItemSizeHeight = 142
      LVPositionX = 17
      LVPositionY = 4
      LVWidth = 445.5
      LVHeight = 540
      APNameHeight = 124
      IndictorPositionX = 465
   else
      if _application.Orientation == ScreenOrientation_Landscape then
         Program_Cam.CameraPosition.value = Vector3(0, 0, 224)
         Mask.Rectangle = RectFProperty(RectF(-500, -500, 2000, 2000))
         ProgramGroup.Position.x = -Program_Cam.Viewport.width / 2
         ProgramGroup.Position.y = Program_Cam.Viewport.height / 2
         ItemSizeWidth = 134
         ItemSizeHeight = 134
         LVPositionX = 141
         LVPositionY = -4
         LVWidth = 536
         LVHeight = 366
         APNameHeight = 120
         IndictorPositionX = 657
      end
   end
   ResetListViewContent()
end

trace("Load Programs_Landscape.lua end")

⌨️ 快捷键说明

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