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

📄 peopleselectcontact_landscape.luac.lua

📁 htc manila 2 sourcecode
💻 LUA
字号:
-- Decompiled using luadec 0.4 by sztupy (http://winmo.sztupy.hu)
-- Command line was: -l ;0;0,4;0,0,27,35,38;0;0;0;; 53a71ad6_manila.luac 

trace("Load ContactPicker_Landscape.lua begin")
require("Common\\LayoutInfo")
_LayoutInfo = LayoutInfo()
PeopleSelect_ScreenRotation = class(RotationTemplate)
PeopleSelect_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("+++++++[PeopleSelect_ScreenRotation] : __init")
end

PeopleSelect_ScreenRotation.OnScreenRotation = function(l_2_0)
   trace("+++++++[PeopleSelect_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, 636))
      LVHeight = 576
      LetterGroup._visible = true
      LetterGroup.Position.x = 435
      PeopleLetterPickerListView.Viewport.y = 624
      CharacterDialogGroup.Position.x = -251
      CharacterDialogGroup.Position.y = -154
      l_2_0:ResetLetterListView()
      SearchGroup._visible = true
      SearchIcon._visible = fasle
      SearchIconHitArea._visible = fasle
      l_2_0:ResetSearchGroup()
      AllPeopleGroup.Position.value = Vector3(-240, 228, 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))
         LetterGroup._visible = true
         LetterGroup.Position.x = 755
         PeopleLetterPickerListView.Viewport.y = 314
         CharacterDialogGroup.Position.x = -411
         CharacterDialogGroup.Position.y = -74
         l_2_0:ResetLetterListView()
         SearchGroup._visible = fasle
         SearchIcon._visible = fasle
         SearchIconHitArea._visible = fasle
         l_2_0:ResetSearchGroup()
         AllPeopleGroup.Position.value = Vector3(-400, 127, 0)
         LVPositionX = 0
         LVWidth = 800
         ItemSizeWidth = 800
         ItemSizeHeight = 81
      end
   end
   l_2_0:ResetListViewContent(_application.Orientation)
end

PeopleSelect_ScreenRotation.ResetListViewContent = function(l_3_0, l_3_1)
   trace("+++++++[PeopleSelect_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 = nil
   local l_3_4 = 0
   l_3_4 = l_3_0._Listview:GetGenerator():GetCount()
   local l_3_5 = l_3_0._Listview:GetGenerator()
   for i = 0, l_3_4 - 1 do
      l_3_3 = l_3_5:GetItem(i)
      if l_3_3 then
         _Namespace = l_3_3.Namespace
         local sel = _Namespace:FindName("Select")
         if sel then
            if l_3_1 == ScreenOrientation_Portrait then
               sel.Position.x = 380
            elseif l_3_1 == ScreenOrientation_Landscape then
               sel.Position.x = 680
            end
         end
         local line = _Namespace:FindName("line")
         if line then
            line.Size.width = ItemSizeWidth
            trace("Seperator width :" .. tostring(line.Size.width))
            line.TextureCoords:set(0, 0, ItemSizeWidth / 2, 1)
         end
      end
   end
end

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

PeopleSelect_ScreenRotation.ResetLetterListView = function(l_5_0)
   trace("PeopleSelect_ScreenRotation:ResetLetterListView")
   if l_5_0.LetterPickerObj == nil then
      return 
   end
   if _application.Orientation == ScreenOrientation_Portrait then
      l_5_0.LetterPickerObj:ReSetItem(20, 624)
      l_5_0.LetterPickerObj:Generate()
   else
      if _application.Orientation == ScreenOrientation_Landscape then
         l_5_0.LetterPickerObj:ReSetItem(12, 314)
         l_5_0.LetterPickerObj:Generate()
      end
   end
end

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

PeopleSelect_ScreenRotation.ResetSearchGroup = function(l_7_0)
   trace("PeopleSelect_ScreenRotation:ResetSearchGroup")
   if l_7_0.SearchObj == nil then
      return 
   end
   if _application.Orientation == ScreenOrientation_Portrait then
      l_7_0.SearchObj:EnableSearchContacts()
      l_7_0.SearchObj.InputBox:SetShowWindowFlag(false)
   else
      if _application.Orientation == ScreenOrientation_Landscape then
         l_7_0.SearchObj:DisableInputBox()
         l_7_0.SearchObj.InputBox:SetShowWindowFlag(false)
      end
   end
end

trace("Load PeopleSelectScript_Landscape.lua end")

⌨️ 快捷键说明

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