stockrearrangepage_landscape.luac.lua
来自「htc manila 2 sourcecode」· LUA 代码 · 共 156 行
LUA
156 行
-- Decompiled using luadec 1.0 by sztupy (http://winmo.sztupy.hu)
-- Command line was: -l2 ;;4;27,40,70,80,98;14,45; 2aad45dc_manila.luac
-- Minor Q16.16 conversion error
trace("Load StockRearrangePage_Landscape.lua : BEGIN")
require("Common\\LayoutInfo")
_LayoutInfo = LayoutInfo()
StockRearrangePage_ScreenRotation = class(RotationTemplate)
StockRearrangePage_ScreenRotation.__init = function(l_1_0, l_1_1, l_1_2, l_1_3, l_1_4, l_1_5, l_1_6)
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
l_1_0._DragBackground = l_1_5
l_1_0._DragMask = l_1_6
RotationTemplate.__init(l_1_0)
trace("+++++++[ConfigListView_ScreenRotation] : __init")
end
StockRearrangePage_ScreenRotation.OnScreenRotation = function(l_2_0)
trace("+++++++[ConfigListView_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)
l_2_0._Camera3D.Position.x = -screenWidth / 2
l_2_0._Camera3D.Position.y = (l_2_1) / 2
end
MoveDownArea.Position.y = -(screenHeight - 2 * SystemTitlebarHeight - ManilaTitleBarHeight - ItemSizeHeight)
if _application.Orientation == ScreenOrientation_Portrait then
trace("+++++++ Device is in Portrait Mode ")
if _application.Navigation.TabVisibility then
l_2_0._Mask.Rectangle = RectFProperty(RectF(0, 60, 480, 567))
LVHeight = 567
else
l_2_0._Mask.Rectangle = RectFProperty(RectF(0, 60, 480, 643))
LVHeight = 643
end
LVPositionX = 0
LVPositionY = -58
LVWidth = 480
ItemSizeWidth = 480
ItemSizeHeight = 80
ControlListViewGroup.Scale = Vector3Property(Vector3(1, 1, 1))
else
if _application.Orientation == ScreenOrientation_Landscape then
trace("+++++++ Device is in Landscape Mode ")
l_2_0._Mask.Rectangle = RectFProperty(RectF(-500, 60, 2000, 2000))
LVPositionX = 0
LVPositionY = -58
LVWidth = 800
LVHeight = 320
ItemSizeWidth = 800
ItemSizeHeight = 80
ControlListViewGroup.Scale = Vector3Property(Vector3(1.6666564941406, 1, 1))
end
end
l_2_0._DragMask.Size.width = ItemSizeWidth
l_2_0._DragBackground.Size.width = ItemSizeWidth
l_2_0:ResetListViewContent(_application.Orientation)
end
StockRearrangePage_ScreenRotation.ResetListViewContent = function(l_3_0, l_3_1)
trace("+++++++[ConfigListView_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
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.6999969482422, 1, 1))
end
end
end
local l_3_4 = nil
if l_3_0._Listview:TypeOf("SequentialListView") then
l_3_4 = true
else
l_3_4 = false
end
local l_3_5 = 0
if l_3_4 then
l_3_5 = l_3_0._Listview:GetGenerator():GetRealizedItemCount()
else
l_3_5 = l_3_0._Listview:GetGenerator():GetCount()
end
local l_3_6 = l_3_0._Listview:GetGenerator()
for i = 0, l_3_5 - 1 do
local item = l_3_6:GetItem(i)
if item then
l_3_0:AdjustListviewItemLayout(nil, item)
end
end
end
StockRearrangePage_ScreenRotation.AdjustListviewItemLayout = function(l_4_0, l_4_1, l_4_2)
trace("+++++++[StockRearrangePage_ScreenRotation] : ResetListviewItemLayout Beginning")
if l_4_2 ~= nil then
status = _application.Orientation
_Namespace = l_4_2.Namespace
local l_4_3 = _Namespace:FindName("Selector")
if l_4_3 then
if status == ScreenOrientation_Portrait then
l_4_3.Scale = Vector3Property(Vector3(1, 1, 1))
else
if status == ScreenOrientation_Landscape then
l_4_3.Scale = Vector3Property(Vector3(1.6999969482422, 1, 1))
end
end
end
local l_4_4 = _Namespace:FindName("MovingAreaIcon")
if l_4_4 then
if status == ScreenOrientation_Portrait then
l_4_4.Position.x = 418
else
if status == ScreenOrientation_Landscape then
l_4_4.Position.x = 738
end
end
end
Seperator = _Namespace:FindName("DottedLine")
if Seperator then
Seperator.Size.width = ItemSizeWidth
Seperator.TextureCoords:set(0, 0, ItemSizeWidth / 2, 1)
end
trace("+++++++[StockRearrangePage_ScreenRotation] : ResetListviewItemLayout Finished")
end
end
trace("Load StockRearrangePage_Landscape.lua : END")
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?