📄 weathercitylocaltime.luac.lua
字号:
-- Decompiled using luadec 1.0 by sztupy (http://winmo.sztupy.hu)
-- Command line was: -l2 ;29-52,38-52,42-52,58-92,67-92,71-92;;;;0,12;; 7b275d5d_manila.luac
trace("Load weathercityLocalTime")
require("class")
require("audio_manager_svc")
CityLocalTime = class()
CityLocalTime.HandleTimeChanged = function(l_1_0)
trace("[CityLocalTime] : HandleTimeChanged")
if l_1_0._DisableUpdate then
return
end
if l_1_0.forecast then
trace("[CityLocalTime] : City Name = " .. l_1_0.forecast.city.cityName)
if l_1_0.machinestatus.CurrentTime.Value.IsTwentyFourHour then
local l_1_1 = l_1_0.forecast:GetLocalTime():GetTimeString(TimeFormatOptions_Default)
local l_1_2 = l_1_0.forecast:GetLocalTime():GetDateString(Locale:GetString("IDS_WEATHERDATEFORMAT"))
local l_1_3 = l_1_2 .. ", " .. l_1_1
trace("[CityLocalTime] : _string = " .. l_1_3)
l_1_0.timetext.String = l_1_3
l_1_0.timeAMPM._visible = false
else
local l_1_4 = l_1_0.forecast:GetLocalTime():GetTimeString(TimeFormatOptions_ExcludeTimeMarker)
local l_1_5 = l_1_0.forecast:GetLocalTime():GetDateString(Locale:GetString("IDS_WEATHERDATEFORMAT"))
local l_1_6 = l_1_5 .. ", " .. l_1_4
trace("[CityLocalTime] : _string = " .. l_1_6)
l_1_0.timetext.String = l_1_6
l_1_0.timeAMPM.String = l_1_0.forecast:GetLocalTime():GetTimeString("tt")
l_1_0.timeAMPM._visible = true
end
l_1_0.timetext._visible = true
l_1_0:resize()
else
trace("[CityLocalTime] : HandleTimeChanged 444")
l_1_0.timetext._visible = false
l_1_0.timeAMPM._visible = false
end
end
CityLocalTime.Reset = function(l_2_0, l_2_1)
trace("[CityLocalTime] : Reset")
if not l_2_0.forecast then
l_2_0.forecast = l_2_1
l_2_0:HandleTimeChanged()
else
l_2_0.forecast = l_2_1
end
end
CityLocalTime.Update = function(l_3_0)
trace("[CityLocalTime] : Update")
l_3_0._DisableUpdate = false
l_3_0:HandleTimeChanged()
end
CityLocalTime.DisableUpdate = function(l_4_0)
trace("[CityLocalTime] : DisableUpdate")
l_4_0._DisableUpdate = true
end
CityLocalTime.resize = function(l_5_0)
trace("[CityLocalTime] : resize")
if l_5_0.timeAMPM._visible then
local l_5_2 = MusicHelper_GetStringWidth(l_5_0.timeAMPM, l_5_0.timeAMPM.String)
local l_5_3 = MusicHelper_GetStringWidth(l_5_0.timetext, l_5_0.timetext.String)
l_5_0.timeAMPM.Size.width = l_5_2
l_5_0.timetext.Size.width = l_5_3
l_5_0.timetext.Position.x = (480 - (l_5_3 + l_5_2)) * 0.5
l_5_0.timeAMPM.Position.x = l_5_0.timetext.Position.x + l_5_3 + 10
else
local l_5_2 = MusicHelper_GetStringWidth(l_5_0.timetext, l_5_0.timetext.String)
l_5_0.timetext.Size.width = l_5_2
l_5_0.timetext.Position.x = (480 - l_5_2) * 0.5
end
end
CityLocalTime.__init = function(l_6_0, l_6_1, l_6_2, l_6_3, l_6_4)
trace("[CityLocalTime] : __init")
if l_6_1 then
l_6_0.machinestatus = l_6_1
else
l_6_0.machinestatus = MachineStatus()
end
l_6_0.forecast = l_6_2
l_6_0.machinestatus.CurrentTime.OnValueChanged:connect(l_6_0.HandleTimeChanged, l_6_0)
l_6_0.machinestatus.TwentyFourHourTime.OnValueChanged:connect(l_6_0.HandleTimeChanged, l_6_0)
l_6_0.machinestatus.TimeZone.OnValueChanged:connect(l_6_0.HandleTimeChanged, l_6_0)
l_6_0.timetext = l_6_3
l_6_0.timeAMPM = l_6_4
l_6_0.timetext._visible = false
l_6_0.timeAMPM._visible = false
l_6_0._DisableUpdate = false
l_6_0:HandleTimeChanged()
end
trace("Load weathercityLocalTime end")
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -