peopleallscript_landscape.luac.lua

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

LUA
166
字号
-- Decompiled using luadec 0.4 by sztupy (http://winmo.sztupy.hu)
-- Command line was: -l ;0;0,4;0,0,27,39;0;0;0;; 7f36cc18_manila.luac 

trace("Load PeopleAllScript_Landscape.lua begin")
require("Common\\LayoutInfo")
_LayoutInfo = LayoutInfo()
PeopleAll_ScreenRotation = class(RotationTemplate)
PeopleAll_ScreenRotation.__init = function(l_1_0, l_1_1, l_1_2, l_1_3, l_1_4)
   l_1_0._Listview = l_1_1
   l_1_0._Camera3D = l_1_3
   l_1_0._Camera2D = l_1_2
   l_1_0._Mask = l_1_4
   RotationTemplate.__init(l_1_0)
   l_1_0.LetterPickerObj = nil
   l_1_0.SearchObj = nil
   trace("+++++++[PeopleAll_ScreenRotation] : __init")
end

PeopleAll_ScreenRotation.OnScreenRotation = function(l_2_0)
   trace("+++++++[PeopleAll_ScreenRotation] : OnScreenRotation")
   local l_2_1 = screenHeight
   l_2_1 = l_2_1 - 2 * SystemTitlebarHeight
   if l_2_0._Camera2D then
      l_2_0._Camera2D.Viewport.value = RectF(0, 0, screenWidth, l_2_1)
      l_2_0._Camera2D.ViewLeft.value = 0
      l_2_0._Camera2D.ViewRight.value = screenWidth
      l_2_0._Camera2D.ViewTop.value = 0
      l_2_0._Camera2D.ViewButtom.value = -(l_2_1)
   end
   if l_2_0._Camera3D then
      l_2_0._Camera3D.Viewport.value = RectF(0, 0, screenWidth, l_2_1)
      l_2_0._Camera3D.ViewLeft.value = 0
      l_2_0._Camera3D.ViewRight.value = screenWidth
      l_2_0._Camera3D.ViewTop.value = 0
      l_2_0._Camera3D.ViewButtom.value = l_2_1
      l_2_0._Camera3D.CameraPosition.value = Vector3(0, 0, (l_2_1) / 2)
   end
   if _application.Orientation == ScreenOrientation_Portrait then
      l_2_0._Mask.Rectangle = RectFProperty(RectF(0, 60, 480, 560))
      LVHeight = 544
      SearchGroup._visible = true
      SearchIcon._visible = true
      SearchIconHitArea._visible = true
      l_2_0:ResetSearchGroup()
      LetterGroup._visible = true
      LetterGroup.Position.x = 435
      PeopleLetterPickerListView.Viewport.y = 560
      CharacterDialogGroup.Position.x = -251
      CharacterDialogGroup.Position.y = -154
      l_2_0:ResetLetterListView()
      AllPeopleGroup.Position.value = Vector3(-240, 288, 0)
      LVPositionX = 0
      LVPositionY = 0
      LVWidth = 480
      ItemSizeWidth = 480
      ItemSizeHeight = 81
   else
      if _application.Orientation == ScreenOrientation_Landscape then
         LVPositionY = 0
         LVHeight = 318
         l_2_0._Mask.Rectangle = RectFProperty(RectF(-500, 60, 2000, 2000))
         SearchGroup._visible = fasle
         SearchIcon._visible = fasle
         SearchIconHitArea._visible = fasle
         l_2_0:ResetSearchGroup()
         LetterGroup._visible = true
         LetterGroup.Position.x = 755
         PeopleLetterPickerListView.Viewport.y = 314
         CharacterDialogGroup.Position.x = -461
         CharacterDialogGroup.Position.y = -74
         l_2_0:ResetLetterListView()
         AllPeopleGroup.Position.value = Vector3(-400, 127, 0)
         LVPositionX = 0
         LVWidth = 800
         ItemSizeWidth = 800
         ItemSizeHeight = 81
      end
   end
   l_2_0:ResetListViewContent(_application.Orientation)
end

PeopleAll_ScreenRotation.ResetListViewContent = function(l_3_0, l_3_1)
   trace("+++++++[PeopleAll_ScreenRotation] : ResetListViewContent")
   if not l_3_0._Listview:HasLayout() then
      return 
   end
   l_3_0._Listview.Position.x = LVPositionX
   l_3_0._Listview.Position.y = LVPositionY
   l_3_0._Listview.Viewport.x = LVWidth
   l_3_0._Listview.Viewport.y = LVHeight
   local l_3_2 = Vector3F()
   l_3_2.x = ItemSizeWidth
   l_3_2.y = ItemSizeHeight
   l_3_2.z = 0
   l_3_0._Listview:GetLayout().ItemSize = l_3_2
   local l_3_3 = l_3_0._Listview:GetLayout().SelectionNode
   if l_3_3 then
      if l_3_0._application.Orientation == ScreenOrientation_Portrait then
         if Selector then
            Selector.Scale = Vector3Property(Vector3(1, 1, 1))
         end
         l_3_3.Scale = Vector3Property(Vector3(1, 1, 1))
      else
         if l_3_0._application.Orientation == ScreenOrientation_Landscape then
            l_3_3.Scale = Vector3Property(Vector3(1.7269897460938, 1, 1))
         end
      end
   end
   local l_3_4 = nil
   local l_3_5 = 0
   l_3_5 = l_3_0._Listview:GetGenerator():GetCount()
   local l_3_6 = l_3_0._Listview:GetGenerator()
   for i = 0, l_3_5 - 1 do
      l_3_4 = l_3_6:GetItem(i)
      if l_3_4 then
         _Namespace = l_3_4.Namespace
         Seperator = _Namespace:FindName("line")
         if Seperator then
            Seperator.Size.width = ItemSizeWidth
            trace("Seperator width :" .. tostring(Seperator.Size.width))
            Seperator.TextureCoords:set(0, 0, ItemSizeWidth / 2, 1)
         end
         local something = _Namespace:FindName("MyFavesIcon")
         if something then
           something.Position.x = screenWidth - 83
         end
         
      end
   end
end

PeopleAll_ScreenRotation.SetLetterObj = function(l_4_0, l_4_1)
   l_4_0.LetterPickerObj = l_4_1
end

PeopleAll_ScreenRotation.ResetLetterListView = function(l_5_0)
   trace("PeopleAll_ScreenRotation:ResetLetterListView")
   if l_5_0.LetterPickerObj == nil then
      return 
   end
   if _application.Orientation == ScreenOrientation_Portrait then
      l_5_0.LetterPickerObj:ReSetItem(18, 560)
      l_5_0.LetterPickerObj:Generate()
   else
      if _application.Orientation == ScreenOrientation_Landscape then
         l_5_0.LetterPickerObj:ReSetItem(11, 314)
         l_5_0.LetterPickerObj:Generate()
      end
   end
end

PeopleAll_ScreenRotation.SetSearchObj = function(l_6_0, l_6_1)
   l_6_0.SearchObj = l_6_1
end

PeopleAll_ScreenRotation.ResetSearchGroup = function(l_7_0)
   trace("PeopleAll_ScreenRotation:ResetSearchGroup")
   if l_7_0.SearchObj == nil then
      return 
   end
   l_7_0.SearchObj:DisableSearchContacts()
end

trace("Load PeopleAllScript_Landscape.lua end")

⌨️ 快捷键说明

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