📄 ringtone.luac.lua
字号:
-- Decompiled using luadec 0.7 by sztupy (http://winmo.sztupy.hu)
-- Command line was: -l ;;;;;;;;;0,0,4,8,19;;0,4,8;; 2b3fde6f_manila.luac
require("transitions")
require("RadioButtonControl")
require("scrollphysics")
require("machine_status_svc")
Sound_RingToneManager = RingToneManager()
if 2000 == _application.Store:GetIntValue(Lifetime_Application, "Component.Ringtone.Source") then
RingtoneCollection = Sound_RingToneManager:LoadSounds4Alarm()
else
RingtoneCollection = Sound_RingToneManager:GetAllRingtones()
end
OnLeftSoftKeyPress = function()
_application.Store:SetStringValue(Lifetime_Application, "WorldClock.AlarmEdit.RingtoneName", RingtoneForm_SelectedRingtone)
_application.Store:SetStringValue(Lifetime_Application, "WorldClock.AlarmEdit.RingtoneFile", RingtoneForm_SelectedFilepath)
Sound_RingToneManager:StopPlayingRingtone()
_application.Navigation:NavigateBack()
end
OnRightSoftKeyPress = function()
Sound_RingToneManager:StopPlayingRingtone()
_application.Navigation:NavigateBack()
end
RingtoneForm_init = function()
_application:SetRightSoftkey(Softkey(Locale:GetString("IDS_CANCEL"), OnLeftSoftKeyPress))
_application:SetLeftSoftkey(Softkey(Locale:GetString("IDS_DONE"), OnLeftSoftKeyPress))
RingtoneForm_SelectedRingtone = _application.Store:GetStringValue(Lifetime_Application, "WorldClock.AlarmEdit.RingtoneName")
RingtoneForm_SelectedFilepath = _application.Store:GetStringValue(Lifetime_Application, "WorldClock.AlarmEdit.RingtoneFile")
Flag = {}
_request.NavigateInFrom:connect(RingtoneForm_OnNavigateIn)
_request.NavigateOutTo:connect(RingtoneForm_OnNavigateOut)
end
RingtoneForm_OnNavigateIn = function(l_4_0)
RingtoneList_init(RingtoneListView, RingtoneCollection, RingtoneSelector)
Transition(l_4_0, "In")
end
RingtoneForm_OnPageInit = function()
Transition("Arbitrary", "In")
end
RingtoneForm_OnPostPageInit = function()
Transition("Arbitrary", "In")
end
RingtoneForm_OnNavigateOut = function(l_7_0)
_application.Store:SetIntValue(Lifetime_Application, "Component.Ringtone.Source", 0)
_request.NavigateInFrom:disconnect(RingtoneForm_OnNavigateIn)
_request.NavigateOutTo:disconnect(RingtoneForm_OnNavigateOut)
Transition(l_7_0, "Out")
end
RingtoneList_init = function(l_8_0, l_8_1, l_8_2)
RingtoneList_ListView = l_8_0
RingtoneList_Collection = l_8_1
RingtoneList_SelectedElement = nil
RingtoneList_ItemListLayout = TileLayout()
RingtoneList_ItemListLayout.SelectionNode = l_8_2
RingtoneList_ItemListLayout:SetItemSize(480, 80, 0)
RingtoneList_ListView:SetLayout(RingtoneList_ItemListLayout)
RingtoneList_ItemListGenerator = LibraryGeneratorRingTone(RingtoneList_Collection, RingtoneList_ListView:GetMovie(), RingtoneList_ListView.ComponentLibraryName, RingtoneList_ListView.ComponentLibraryID)
RingtoneList_ItemListGenerator.ItemCreated:connect(RingtoneList_OnItemCreated)
RingtoneList_ItemListGenerator.ItemDestroyed:connect(RingtoneList_OnItemDestroyed)
RingtoneListView:SetGenerator(RingtoneList_ItemListGenerator)
if Ringtone_Landscape ~= nil then
Ringtone_Landscape._generator = RingtoneList_ItemListGenerator
end
RingtoneList_ListView:Focus()
RingtoneList_ListScrollPhysics = ScrollPhysics(RingtoneList_ListView, RingtoneList_ListView, RingtoneList_OnListViewItemSelected)
RingtoneList_ListScrollPhysics:ConnectMouseEvents()
end
RingtoneList_OnItemCreated = function(l_9_0, l_9_1)
local l_9_2 = l_9_1.Namespace:FindName("RingtoneText")
local l_9_3 = l_9_1.Namespace:FindName("RadioIcon")
if Ringtone_Landscape ~= nil then
Ringtone_Landscape:AdjustListviewItemLayout(l_9_0, l_9_1)
end
l_9_2.String = l_9_0.DisplayName
if l_9_2.String == RingtoneForm_SelectedRingtone then
RadioButton_Initialize(l_9_1, true)
RingtoneList_SelectedElement = l_9_1
else
RadioButton_Initialize(l_9_1, false)
end
end
RingtoneList_OnItemDestroyed = function(l_10_0)
if l_10_0 == RingtoneList_SelectedElement then
RingtoneList_SelectedElement = nil
end
end
RingtoneList_OnListViewItemSelected = function(l_11_0)
local l_11_1 = RingtoneList_ItemListGenerator:GetItem(l_11_0)
local l_11_2 = RingtoneList_ItemListGenerator:GetData(l_11_0)
if RingtoneList_SelectedElement ~= nil then
RadioButton_ToggleValue(RingtoneList_SelectedElement)
end
RadioButton_ToggleValue(l_11_1)
RingtoneList_SelectedElement = l_11_1
RingtoneForm_SelectedRingtone = l_11_2.DisplayName
RingtoneForm_SelectedFilepath = l_11_2.FilePath
Sound_RingToneManager:PlayRingtone(l_11_2)
end
main = function()
objs3D = {}
objs3D[1] = Camera2D
setOffScreen()
RingtoneForm_init()
if _application.Store:GetStringValue(Lifetime_Permanent, "EnableLandscape") == "true" then
trace("[Ringtone] : EnableLandscape")
require("scripts\\Component\\Ringtone_Landscape")
Ringtone_Landscape = Ringtone_ScreenRotation(Camera2D, Ringtone_Mask, RingtoneListView, RingtoneSelector)
end
end
main()
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -