stocksettingpage_landscape.luac.lua
来自「htc manila 2 sourcecode」· LUA 代码 · 共 172 行
LUA
172 行
-- Decompiled using luadec 1.0 by sztupy (http://winmo.sztupy.hu)
-- Command line was: -l2 ;;7,119-152,185;27,40,76,86,86,87,105; 0141d1c3_manila.luac
trace("Load StocksettingPage_Landscape.lua : BEGIN")
require("Common\\LayoutInfo")
_LayoutInfo = LayoutInfo()
StockSettingPage_ScreenRotation = class(RotationTemplate)
StockSettingPage_ScreenRotation.__init = function(l_1_0, l_1_1, l_1_2, l_1_3, l_1_4, l_1_5)
l_1_0._OptionGroup1 = l_1_4
l_1_0._OptionGroup2 = l_1_5
l_1_0._Camera3D = l_1_3
l_1_0._Camera2D = l_1_2
l_1_0._Mask = l_1_1
RotationTemplate.__init(l_1_0)
trace("+++++++[StockSettingPage_ScreenRotation] : __init")
end
StockSettingPage_ScreenRotation.OnScreenRotation = function(l_2_0)
trace("+++++++[StockSettingPage_ScreenRotation] : OnScreenRotation")
local l_2_1 = screenHeight - 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
trace("+++++++ Device is in Portrait Mode ")
if _application.Navigation.TabVisibility then
l_2_0._Mask.Rectangle = RectFProperty(RectF(0, 60, 480, 561))
LVHeight = 561
else
l_2_0._Mask.Rectangle = RectFProperty(RectF(0, 60, 480, 637))
LVHeight = 637
end
ItemSizeWidth = 480
ItemSizeHeight = 80
l_2_0._OptionGroup1.Position.x = -225
l_2_0._OptionGroup1.Position.y = 290
local l_2_2 = l_2_0._OptionGroup1.Namespace:FindName("Separator")
l_2_2.Size.width = 480
l_2_2 = l_2_0._OptionGroup1.Namespace:FindName("CheckBoxGroup1")
l_2_2.Position.x = 0
l_2_0._OptionGroup2.Position.x = -225
l_2_0._OptionGroup2.Position.y = 150
l_2_2 = l_2_0._OptionGroup2.Namespace:FindName("Separator2")
l_2_2.Size.width = 480
l_2_2 = l_2_0._OptionGroup2.Namespace:FindName("CheckBoxGroup2")
l_2_2.Position.x = 0
else
if _application.Orientation == ScreenOrientation_Landscape then
trace("+++++++ Device is in Landscape Mode ")
l_2_0._Mask.Rectangle = RectFProperty(RectF(-500, 60, 2000, 2000))
ItemSizeWidth = 800
ItemSizeHeight = 80
l_2_0._OptionGroup1.Position.x = -400
l_2_0._OptionGroup1.Position.y = 130
local l_2_3 = l_2_0._OptionGroup1.Namespace:FindName("Separator")
l_2_3.Size.width = 800
l_2_3 = l_2_0._OptionGroup1.Namespace:FindName("CheckBoxGroup1")
l_2_3.Position.x = 320
l_2_0._OptionGroup2.Position.x = -400
l_2_0._OptionGroup2.Position.y = -10
l_2_3 = l_2_0._OptionGroup2.Namespace:FindName("Separator2")
l_2_3.Size.width = 800
l_2_3 = l_2_0._OptionGroup2.Namespace:FindName("CheckBoxGroup2")
l_2_3.Position.x = 320
end
end
end
StockSettingPage_ScreenRotation.ResetListViewContent = function(l_3_0, l_3_1)
trace("+++++++[StockSettingPage_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
trace("+++++++ Device is in Portrait Mode : Reset Selector Scale ")
l_3_3.Scale = Vector3Property(Vector3(1, 1, 1))
else
if l_3_0._application.Orientation == ScreenOrientation_Landscape then
trace("+++++++ Device is in Landscape Mode : Increase Selector Scale ")
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, l_3_6 = nil, nil
local l_3_7 = 0
if l_3_4 then
l_3_7 = l_3_0._Listview:GetGenerator():GetRealizedItemCount()
else
l_3_7 = l_3_0._Listview:GetGenerator():GetCount()
end
local l_3_8 = l_3_0._Listview:GetGenerator()
for i = 0, l_3_7 - 1 do
l_3_5 = l_3_8:GetItem(i)
if l_3_5 then
_Namespace = l_3_5.Namespace
Selector = _Namespace:FindName("Selector")
if Selector then
if l_3_1 == ScreenOrientation_Portrait then
trace(" [ResetListViewContent] Device is in Portrait Mode : Set Selector Scale ")
Selector.Scale = Vector3Property(Vector3(1, 1, 1))
elseif l_3_1 == ScreenOrientation_Landscape then
trace(" [ResetListViewContent] Device is in Landscape Mode : Set Selector Scale ")
Selector.Scale = Vector3Property(Vector3(1.6999969482422, 1, 1))
end
end
DeleteMarkElement = _Namespace:FindName("deleteMark")
if DeleteMarkElement then
trace(" [ResetListViewContent] Set Delete Mark Background Width ")
DeleteMarkElement.Size.width = ItemSizeWidth
end
CheckBoxElement = _Namespace:FindName("CheckBox")
if CheckBoxElement then
if l_3_1 == ScreenOrientation_Portrait then
trace(" [ResetListViewContent] Device is in Portrait Mode : Set Check Box's Position ")
CheckBoxElement.Position.x = 400
elseif l_3_1 == ScreenOrientation_Landscape then
trace(" [ResetListViewContent] Device is in Landscape Mode : Set Check Box's Position ")
CheckBoxElement.Position.x = 720
end
end
CheckBoxSelectElement = _Namespace:FindName("SpriteX")
if CheckBoxSelectElement then
if l_3_1 == ScreenOrientation_Portrait then
trace(" [ResetListViewContent] Device is in Portrait Mode : Set Selected Check Box's Position ")
CheckBoxSelectElement.Position.x = 400.5
elseif l_3_1 == ScreenOrientation_Landscape then
trace(" [ResetListViewContent] Device is in Landscape Mode : Set Selected Check Box's Position ")
CheckBoxSelectElement.Position.x = 720.5
end
end
Seperator = _Namespace:FindName("DottedLine")
if Seperator then
trace(" [ResetListViewContent] Set Separator Width ")
Seperator.Size.width = ItemSizeWidth
Seperator.TextureCoords:set(0, 0, ItemSizeWidth / 2, 1)
end
end
end
end
trace("Load StockSettingPage_Landscape.lua : END")
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?