📄 20.lua
字号:
-- Decompiled using luadec 0.6 by sztupy (http://winmo.sztupy.hu)
-- Command line was: -l ;;0,4;0,0,4;0,4;0,6,8,9;0,5,11;0,8;0,1;;0,6,12,16,18;0,17;;0,0,0,0,0,0,0,0,4,8,12,16,20,24;0,4,8,12;0,4,8,12;0,4,8,10;0,0,14,18,22,26,30,34,39,59,66,103,111;0,2;11;11;11;11;11;11;7;;;;;; 1f3be060_manila_9C5A.luac
trace("Loading Communications Settings Script\n")
require("theme")
require("OnOffButtonControl")
CommunicationsSettings_MapVisibleElements = {}
CommunicationsSettings_MapSettingsItemUI = {}
if _config_os == "windowsmobile" then
require("machine_status_svc")
CommunicationsSettings_MachineStatus = MachineStatus()
CommunicationsSettings_Manager = SettingsItemManager()
end
SettingsItemUI = class()
SettingsItemUI.__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_7, l_1_8)
l_1_0.Text = l_1_1
l_1_0.DetailTextOn = l_1_2
l_1_0.DetailTextOff = l_1_3
l_1_0.Texture = l_1_4
l_1_0.TextureWidth = l_1_5
l_1_0.TextureHeight = l_1_6
l_1_0.IconWidth = l_1_7
l_1_0.IconHeight = l_1_8
l_1_0.RefreshNeeded = false
end
IsDisabled = function(l_2_0)
local l_2_1 = l_2_0.Namespace:FindName("ControlGroup")
return SyncIsVisible ~= true
end
UpdateDisabledUI = function(l_3_0, l_3_1)
local l_3_2 = l_3_0.Namespace:FindName("ControlGroup")
if l_3_1 then
SyncIsVisible = false
else
SyncIsVisible = true
end
end
CommunicationsSettings_ToggleRealValue = function(l_4_0)
local l_4_1 = l_4_0.Namespace:FindName("OnOffButtonComponent")
if l_4_1 ~= nil and not IsDisabled(l_4_0) then
OnOffButton_ToggleValue(l_4_1)
CommunicationsSettings_UpdateTextToValue(l_4_0)
if _config_os == "windowsmobile" then
CommunicationsSettings_SetRealSettingValue(l_4_0.Tag.Data, l_4_1.Tag.Value)
CommunicationsSettings_MapSettingsItemUI[l_4_0.Tag.Data.Type].RefreshNeeded = true
SyncTimer:Stop()
SyncTimer:Start()
end
end
end
CommunicationsSettings_HitIndex = function(l_5_0)
local l_5_1 = SettingsItemListView:GetGenerator():GetItem(l_5_0)
local l_5_2 = l_5_1.Tag.Data
if _config_os == "windowsmobile" then
l_5_2 = l_5_1.Tag.Data.Type
end
trace("Hit: " .. CommunicationsSettings_MapSettingsItemUI[l_5_2].Text .. "\n")
local l_5_3 = l_5_1.Namespace:FindName("OnOffButtonComponent")
CommunicationsSettings_ToggleRealValue(l_5_1)
end
CommunicationsSettings_HandleMouseDown = function(l_6_0)
local l_6_1 = SettingsItemListView:GetIndexAtMousePoint(l_6_0._xmouse, l_6_0._ymouse)
if l_6_1 ~= -1 then
local l_6_2 = CommunicationsSettings_ItemListGenerator:GetItem(l_6_1)
if not IsDisabled(l_6_2) then
l_6_2:Focus()
end
end
end
CommunicationsSettings_HandleMouseRelease = function(l_7_0)
CommunicationsSettings_ToggleRealValue(l_7_0)
local l_7_1 = SettingsItemListView:GetIndexAtMousePoint(l_7_0._xmouse, l_7_0._ymouse)
if l_7_1 ~= -1 and l_7_1 == CommunicationsSettings_ItemListGenerator.SelectedIndex then
CommunicationsSettings_HitIndex(l_7_1)
end
end
CommunicationsSettings_GetRealSettingValue = function(l_8_0)
local l_8_1 = false
if l_8_0.Type == SettingType_AirplaneMode then
l_8_1 = CommunicationsSettings_MachineStatus.FlightModeOff.Value == false
elseif l_8_0.Type == SettingType_Phone then
l_8_1 = CommunicationsSettings_MachineStatus.PhoneRadioOn.Value
elseif l_8_0.Type == SettingType_Bluetooth then
l_8_1 = CommunicationsSettings_MachineStatus.BluetoothStatus.Value ~= BluetoothConnectionStatus_Off
elseif l_8_0.Type == SettingType_WiFi then
l_8_1 = CommunicationsSettings_MachineStatus.WifiOn.Value
elseif l_8_0.Type == SettingType_DataConnections then
l_8_1 = CommunicationsSettings_MachineStatus.DataRadioOn.Value
elseif l_8_0.Type == SettingType_MicrosoftPush then
l_8_1 = CommunicationsSettings_MachineStatus.PushMailOn.Value
end
return l_8_1
end
CommunicationsSettings_SetRealSettingValue = function(l_9_0, l_9_1)
trace("Setting " .. CommunicationsSettings_MapSettingsItemUI[l_9_0.Type].Text .. ": " .. tostring(l_9_1) .. "\n")
if l_9_0.Type == SettingType_AirplaneMode then
CommunicationsSettings_MachineStatus.FlightModeOff.Value = not l_9_1
elseif l_9_0.Type == SettingType_Phone then
CommunicationsSettings_MachineStatus.PhoneRadioOn.Value = l_9_1
elseif l_9_0.Type == SettingType_Bluetooth then
if l_9_1 then
CommunicationsSettings_MachineStatus.BluetoothStatus.Value = BluetoothConnectionStatus_Connectable
else
CommunicationsSettings_MachineStatus.BluetoothStatus.Value = BluetoothConnectionStatus_Off
end
elseif l_9_0.Type == SettingType_WiFi then
CommunicationsSettings_MachineStatus.WifiOn.Value = l_9_1
elseif l_9_0.Type == SettingType_DataConnections then
CommunicationsSettings_MachineStatus.DataRadioOn.Value = l_9_1
elseif l_9_0.Type == SettingType_MicrosoftPush then
CommunicationsSettings_MachineStatus.PushMailOn.Value = l_9_1
end
end
CommunicationsSettings_SyncUIToRealValue = function(l_10_0)
if l_10_0 ~= nil then
local l_10_1 = l_10_0.Namespace:FindName("OnOffButtonComponent")
local l_10_2 = CommunicationsSettings_Manager:GetEnabled(l_10_0.Tag.Data.Type)
local l_10_3 = CommunicationsSettings_GetRealSettingValue(l_10_0.Tag.Data)
local l_10_4 = l_10_1.Tag.Value
trace(CommunicationsSettings_MapSettingsItemUI[l_10_0.Tag.Data.Type].Text .. " enabled? " .. tostring(l_10_2) .. "\n")
trace(CommunicationsSettings_MapSettingsItemUI[l_10_0.Tag.Data.Type].Text .. " value? " .. tostring(l_10_3) .. "\n")
UpdateDisabledUI(l_10_0, not l_10_2)
if l_10_2 ~= true then
l_10_3 = false
end
if l_10_3 ~= l_10_4 then
OnOffButton_ToggleValue(l_10_1)
CommunicationsSettings_UpdateTextToValue(l_10_0)
end
end
end
CommunicationsSettings_OnEnabledChanged = function(l_11_0)
trace("OnEnabledChanged: Type=" .. tostring(l_11_0) .. "\n")
trace(CommunicationsSettings_MapSettingsItemUI[l_11_0].Text .. " Enabled Changed\n")
local l_11_1 = CommunicationsSettings_MapVisibleElements[l_11_0]
CommunicationsSettings_SyncUIToRealValue(l_11_1)
end
CommunicationSettings_HandleOnOffKey = 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
CommunicationsSettings_ToggleRealValue(l_12_0)
l_12_2.value = true
end
end
FreeUnusedAssets = function(l_13_0, l_13_1, l_13_2, l_13_3, l_13_4, l_13_5, l_13_6, l_13_7)
local l_13_8 = l_13_0.Namespace:FindName("TextComponent")
local l_13_9 = l_13_0.Namespace:FindName("TextWithDetailComponent")
local l_13_10 = l_13_0.Namespace:FindName("IconComponent")
local l_13_11 = l_13_0.Namespace:FindName("SliderComponent")
local l_13_12 = l_13_0.Namespace:FindName("OnOffButtonComponent")
local l_13_13 = l_13_0.Namespace:FindName("RadioButtonComponent")
local l_13_14 = l_13_0.Namespace:FindName("CheckboxComponent")
if not l_13_1 then
l_13_8.Duration = 0
else
l_13_8.Duration = 40
end
if not l_13_2 then
l_13_9.Duration = 0
else
l_13_9.Duration = 40
end
if not l_13_3 then
l_13_10.Duration = 0
else
l_13_10.Duration = 40
end
if not l_13_4 then
l_13_11.Duration = 0
else
l_13_11.Duration = 40
end
if not l_13_5 then
l_13_12.Duration = 0
else
l_13_12.Duration = 40
end
if not l_13_6 then
l_13_13.Duration = 0
else
l_13_13.Duration = 40
end
if not l_13_7 then
l_13_14.Duration = 0
else
l_13_14.Duration = 40
end
end
CommunicationSettings_HandleSelected = function(l_14_0)
local l_14_1 = l_14_0.Namespace:FindName("MainText")
local l_14_2 = l_14_0.Namespace:FindName("DetailText")
local l_14_3 = l_14_0.Namespace:FindName("OnText")
local l_14_4 = l_14_0.Namespace:FindName("OffText")
l_14_1.Color = GetMainTextSelectedColor()
l_14_2.Color = GetSubTextSelectedColor()
if l_14_3 ~= nil then
l_14_3.Color = GetOnOffTextSelectedColor()
end
if l_14_4 ~= nil then
l_14_4.Color = GetOnOffTextSelectedColor()
end
end
CommunicationSettings_HandleDeselected = function(l_15_0)
local l_15_1 = l_15_0.Namespace:FindName("MainText")
local l_15_2 = l_15_0.Namespace:FindName("DetailText")
local l_15_3 = l_15_0.Namespace:FindName("OnText")
local l_15_4 = l_15_0.Namespace:FindName("OffText")
l_15_1.Color = GetMainTextUnselectedColor()
l_15_2.Color = GetSubTextUnselectedColor()
if l_15_3 ~= nil then
l_15_3.Color = GetOnOffTextUnselectedColor()
end
if l_15_4 ~= nil then
l_15_4.Color = GetOnOffTextUnselectedColor()
end
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -