📄 0.lua
字号:
-- Decompiled using luadec 0.7 by sztupy (http://winmo.sztupy.hu)
-- Command line was: -l ;;;;;;;;;;;;;;;; 7346e42c_manila_3B4.luac
trace("Loaded Confirmation Dialog Script\n")
DialogExitType = nil
dialogRequest = nil
AnimateIn = function(l_1_0)
if dialogRequest ~= nil then
return
end
dialogRequest = l_1_0
DialogGroup.Opacity:Interpolate(0, 100, 5, 0, Interpolate_EaseInQuad, AnimateInDone)
end
AnimateInDone = function()
_application.DialogManager:DialogInComplete(dialogRequest)
end
AnimateOut = function(l_3_0)
if l_3_0 ~= dialogRequest then
return
end
DialogGroup.Opacity:Interpolate(100, 0, 5, 0, Interpolate_EaseInQuad, AnimateOutDone)
end
AnimateOutDone = function()
DisconnectEvents()
_application.DialogManager:DialogOutComplete(dialogRequest)
dialogRequest = nil
end
CloseDialog = function(l_5_0)
DialogExitType = l_5_0.Tag.DialogExitType
if _config_os == "windowsmobile" then
_dialog:Exit(DialogExitType)
else
AnimateOut()
end
end
OnButtonPressed = function(l_6_0, l_6_1)
l_6_1.value = true
l_6_0:Focus()
CloseDialog(l_6_0)
end
OnAlphaPressed = function(l_7_0, l_7_1)
l_7_1.value = true
end
OnYesFocusIn = function()
YesHighlight._visible = true
end
OnYesFocusOut = function()
YesHighlight._visible = false
end
OnNoFocusIn = function()
NoHighlight._visible = true
end
OnNoFocusOut = function()
NoHighlight._visible = false
end
HandleKey = function(l_12_0, l_12_1, l_12_2)
if l_12_1.Code == KeyCode_Return or l_12_1.Code == KeyCode_Space then
CloseDialog(l_12_0)
l_12_2.value = true
end
end
ConnectEvents = function()
AlphaBackground.onPress:connect(OnAlphaPressed)
AlphaBackground.onRelease:connect(OnAlphaPressed)
AlphaBackground.onReleaseOutside:connect(OnAlphaPressed)
if YesButtonGroup._visible then
YesButton.onFocusIn:connect(OnYesFocusIn)
YesButton.onFocusOut:connect(OnYesFocusOut)
YesButton.onRelease:connect(OnButtonPressed)
YesButton.onKeyDown:connect(HandleKey)
YesButton.Focusable = true
YesButton.Tag = {}
YesButton.Tag.DialogExitType = DialogExitType_OK
end
if NoButtonGroup._visible then
NoButton.onFocusIn:connect(OnNoFocusIn)
NoButton.onFocusOut:connect(OnNoFocusOut)
NoButton.onRelease:connect(OnButtonPressed)
NoButton.onKeyDown:connect(HandleKey)
NoButton.Focusable = true
NoButton.Tag = {}
NoButton.Tag.DialogExitType = DialogExitType_Cancel
end
if _config_os == "windowsmobile" then
_application.DialogManager.OnDialogIn:connect(AnimateIn)
_application.DialogManager.OnDialogOut:connect(AnimateOut)
end
end
DisconnectEvents = function()
if _config_os == "windowsmobile" then
_application.DialogManager.OnDialogIn:disconnect(AnimateIn)
_application.DialogManager.OnDialogOut:disconnect(AnimateOut)
NoButton.onFocusOut:disconnect(OnNoFocusOut)
YesButton.onFocusOut:disconnect(OnYesFocusOut)
end
end
SetupOkType = function()
NoButtonGroup._visible = false
YesButtonGroup.Position.x = (DialogGroup.Position.x + Background.Size.width) / 2 - YesHighlight.Size.width / 2
YesText.String = "[[IDS_OK]]"
end
if _config_os == "windowsmobile" then
local title = _dialog.URL.Parameters:GetParameter("Title")
local cs = _dialog.URL.Parameters:GetParameter("ContentString")
local ty = _dialog.URL.Parameters:GetParameter("Type")
if title ~= "" then
Title.String = title
end
if cs ~= "" then
Content.String = cs
end
if ty == "OK" then
SetupOkType()
end
_application:SetRightSoftkey(Softkey("", nil))
_application:SetLeftSoftkey(Softkey("", nil))
end
if _application.Store:GetStringValue(Lifetime_Permanent, "EnableLandscape") == "true" then
trace("[modaldialog] : EnableLandscape")
require("modaldialog\\modaldialog_Landscape")
ModalDlg_Rotation(DialogGroup)
end
ConnectEvents()
if NoButton._visible then
NoButton:Focus()
else
YesButton:Focus()
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -