📄 1.lua
字号:
-- Decompiled using luadec 0.7 by sztupy (http://winmo.sztupy.hu)
-- Command line was: -l ;;;0,4;0,5,15;0,5;;0,0,0,10;;;0,0,8,17;;; 755a84ef_manila_1A22.luac
trace("Loaded Landscape Menu Script\n")
require("common")
MapItemUI = {}
ItemUI = class()
ItemUI.__init = function(l_1_0, l_1_1, l_1_2, l_1_3, l_1_4)
l_1_0.Text = l_1_1
l_1_0.Texture = l_1_2
l_1_0.App = l_1_3
l_1_0.Arguments = l_1_4
end
HandleItemPressed = function(l_2_0)
trace("Hit: " .. MapItemUI[l_2_0.Tag.Data].Text .. "\n")
if _config_os == "windowsmobile" then
Shell_NavigateTo(MapItemUI[l_2_0.Tag.Data].App, MapItemUI[l_2_0.Tag.Data].Arguments)
end
end
HitIndex = function(l_3_0)
local l_3_1 = IconListGenerator:GetItem(l_3_0)
HandleItemPressed(l_3_1)
end
HandleMouseDown = function(l_4_0)
local l_4_1 = IconListView:GetIndexAtMousePoint(l_4_0._xmouse, l_4_0._ymouse)
if l_4_1 == -1 then
trace("Couldn't find index in listview\n")
else
local l_4_2 = IconListGenerator:GetItem(l_4_1)
l_4_2:Focus()
end
end
HandleMouseRelease = function(l_5_0)
local l_5_1 = IconListView:GetIndexAtMousePoint(l_5_0._xmouse, l_5_0._ymouse)
if l_5_1 == -1 then
trace("Couldn't find index in listview\n")
else
if l_5_1 == IconListGenerator.SelectedIndex then
HitIndex(l_5_1)
end
end
end
HandleKey = function(l_6_0, l_6_1, l_6_2)
if l_6_1.Code == KeyCode_Return then
HandleItemPressed(l_6_0)
l_6_2.value = true
end
end
HandleKeyRoot = function(l_7_0, l_7_1, l_7_2)
trace("Key: " .. tostring(l_7_1.Code) .. "\n")
local l_7_3 = IconListGenerator.SelectedIndex
if l_7_1.Code >= KeyCode_A and l_7_1.Code <= KeyCode_Z then
trace("Launching Contact List\n")
Shell_NavigateTo(ShellLocation_ContactList)
l_7_2.value = true
return
elseif (l_7_1.Code >= KeyCode_Zero and l_7_1.Code <= KeyCode_Nine) or l_7_1.Code >= KeyCode_NumPad0 and l_7_1.Code <= KeyCode_NumPad9 then
trace("Launching Dialer\n")
Shell_NavigateTo(ShellLocation_Dialer)
l_7_2.value = true
return
elseif l_7_1.Code == KeyCode_Right then
if IconListGenerator.SelectedIndex == 3 then
IconListGenerator.SelectedIndex = 4
l_7_2.value = true
elseif IconListGenerator.SelectedIndex == 7 then
IconListGenerator.SelectedIndex = 0
l_7_2.value = true
end
elseif l_7_1.Code == KeyCode_Left then
if IconListGenerator.SelectedIndex == 4 then
IconListGenerator.SelectedIndex = 3
l_7_2.value = true
elseif IconListGenerator.SelectedIndex == 0 then
IconListGenerator.SelectedIndex = 7
l_7_2.value = true
end
elseif l_7_1.Code == KeyCode_Space then
if IconListGenerator.SelectedIndex == 7 then
IconListGenerator.SelectedIndex = 0
else
IconListGenerator.SelectedIndex = IconListGenerator.SelectedIndex + 1
end
l_7_2.value = true
end
if l_7_2.value == true and l_7_3 ~= IconListGenerator.SelectedIndex then
trace("Changed index from " .. tostring(l_7_3) .. " to " .. tostring(IconListGenerator.SelectedIndex) .. "\n")
IconListView:FocusItems()
else
trace("Key Not Handled\n")
end
end
HandleSelected = function(l_8_0)
l_8_0.Namespace:FindName("Selector")._visible = true
end
HandleDeselected = function(l_9_0)
l_9_0.Namespace:FindName("Selector")._visible = false
end
HandleItemCreated = function(l_10_0, l_10_1)
l_10_1.Tag = {}
l_10_1.Tag.Data = l_10_0
local l_10_2 = l_10_1.Namespace:FindName("Icon")
l_10_2:SetTextureRef(MapItemUI[l_10_0].Texture)
local l_10_3 = l_10_1.Namespace:FindName("Text")
l_10_3.String = MapItemUI[l_10_0].Text
l_10_1.Focusable = true
l_10_1.onKeyDown:connect(HandleKey)
l_10_1.OnSelected:connect(HandleSelected)
l_10_1.OnDeselected:connect(HandleDeselected)
end
Settings_HandleItemDestroyed = function(l_11_0)
l_11_0.onKeyDown:disconnect(HandleKey)
l_11_0.OnSelected:disconnect(HandleSelected)
l_11_0.OnDeselected:disconnect(HandleDeselected)
end
CreatePage = function()
EmailItemUI = ItemUI("[[IDS_EMAIL]]", "Icon_newEmail", ShellLocation_EmailNewMessage, "")
MessagesItemUI = ItemUI("[[IDS_MESSAGE]]", "Icon_newSMS", "\\windows\\tmail.exe", "-service \"SMS\" -to \"\"")
FavoritesItemUI = ItemUI("[[IDS_FAVORITES]]", "Icon_Favorites", ShellLocation_Opera, "/Bookmarks")
WebItemUI = ItemUI("[[IDS_WEBSEARCH]]", "Icon_webSearch", ShellLocation_Opera, "")
AppointmentItemUI = ItemUI("[[IDS_APPOINTMENT]]", "Icon_appointment", "\\windows\\poutlook.exe", "calendar -new")
TasksItemUI = ItemUI("[[IDS_TASKS]]", "Icon_newTask", "\\windows\\poutlook.exe", "tasks -new")
NotesItemUI = ItemUI("[[IDS_NOTE]]", "Icon_newNote", "\\windows\\notes.exe", "-n")
ContactItemUI = ItemUI("[[IDS_CONTACT]]", "Icon_newContact", "\\windows\\poutlook.exe", "contacts -new")
MapItemUI = {[0] = EmailItemUI, [1] = MessagesItemUI, [2] = FavoritesItemUI, [3] = WebItemUI, [4] = AppointmentItemUI, [5] = TasksItemUI, [6] = NotesItemUI, [7] = ContactItemUI}
IconListLayout = TileLayout()
IconListLayout:SetItemSize(150, 170, 0)
IconListLayout.DisableVirtualization = true
IconListView:SetLayout(IconListLayout)
FakeCollection = VectorNotifyint()
for i = 0, 7 do
FakeCollection:push_back(i)
end
IconListGenerator = LibraryGeneratorint(FakeCollection, IconListView:GetMovie(), IconListView.ComponentLibraryName, IconListView.ComponentLibraryID)
IconListGenerator.RecycleItems = true
IconListGenerator.ItemCreated:connect(HandleItemCreated)
IconListGenerator.ItemDestroyed:connect(HandleItemDestroyed)
IconListView:SetGenerator(IconListGenerator)
IconListView.onMouseDown:connect(HandleMouseDown)
IconListView.onMouseUp:connect(HandleMouseRelease)
KeyboardHandler.onKeyDown:connect(HandleKeyRoot)
IconListView:Focus()
if _config_os == "windowsmobile" then
_application:SetLeftSoftkey(Softkey("", nil))
_application:SetRightSoftkey(Softkey("", nil))
end
end
CreatePage()
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -