📄 calendardayviewscript.luac.lua
字号:
-- Decompiled using luadec 0.6 by sztupy (http://winmo.sztupy.hu)
-- Command line was: -l ;0,0,2,24,31;0,0,2;0,0,0,3,11;0,0,0,0,0,0,0,10;0,0,0,0,0,0,0,10;0,0,4,7,10,13,16,19;0,4,7,10,13,16,19;0,0,6,9,12,15,18;0,4,7,10,13,16;;0,4,7,10;0,4,7,10;0,7,12;;;;17;0,19,22,31,73,77,81;;;;11;;;20;2,11;;;0,0,0,3; 21639bb8_manila.luac
trace("DayView Scripts start")
require("theme")
require("ScrollPhysics")
DayListPhysics = nil
ActiveGroup = DayGroup1
NextGroup = DayGroup2
ResetListView = function(l_1_0, l_1_1)
local l_1_2 = SequentialLayout()
l_1_2:SetItemSize(CalendarControl.DayViewW, CalendarControl.DAYVIEWH, 0)
l_1_2:SetHeaderSize(CalendarControl.DayViewW, CalendarControl.DAYVIEWHEADERH, 0)
l_1_0:SetLayout(l_1_2)
trace("ResetListView start")
local l_1_3 = VectorNotifyint()
local l_1_4 = SequentialLibraryGeneratorint(l_1_3, l_1_0:GetMovie(), l_1_0.ComponentLibraryName, l_1_0.ComponentLibraryID)
if l_1_1 then
l_1_4:SetHeaderComponent(l_1_0:GetMovie(), l_1_0.ComponentLibraryName, 14)
l_1_4.GroupFunction:connect(GroupFunction, l_1_0)
l_1_4.ExtendInternalGetHeaderSize:connect(ExtendInternalGetHeaderSize, l_1_0)
l_1_4.ExtendInternalGetItemSize:connect(ExtendInternalGetItemSize, l_1_0)
l_1_4.HeaderCreated:connect(HandleWeatherItemCreated)
l_1_4.HeaderDestroyed:connect(HandleWeatherItemDestroyed)
l_1_4.RecycleHeaders = true
end
l_1_4.ItemCreated:connect(HandleDayAppItemCreated)
l_1_4.ItemDestroyed:connect(HandleDayAppItemDestroyed)
l_1_4.RecycleItems = true
l_1_0:SetGenerator(l_1_4)
trace("ResetListView end")
return l_1_3
end
RemoveGenerator = function(l_2_0, l_2_1)
local l_2_2 = l_2_0:GetGenerator()
if l_2_1 ~= nil then
local c = l_2_1:GetCount()
for i = 1, c do
l_2_1:pop_back()
end
end
if l_2_2 ~= nil then
l_2_0:SetGenerator(nil)
end
end
GroupFunction = function(l_3_0, l_3_1, l_3_2)
trace("GroupFunction Data2 " .. l_3_2)
local l_3_3 = 0
local l_3_4 = l_3_0:GetGenerator():GetCount() - 1
trace("GroupFunction count" .. l_3_4)
if l_3_2 == l_3_4 then
l_3_3 = -1
end
return l_3_3
end
ExtendInternalGetHeaderSize = function(l_4_0, l_4_1, l_4_2, l_4_3, l_4_4, l_4_5, l_4_6)
trace("ExtendInternalGetHeaderSize" .. l_4_4)
local l_4_7 = l_4_0:GetGenerator():GetDataByRealizedIndex(l_4_4)
trace("ExtendInternalGetHeaderSize data=" .. l_4_7)
if l_4_7 == 0 then
l_4_3.y = 0
l_4_5.value.y = 0
else
l_4_3.y = CalendarControl.DAYVIEWHEADERH
l_4_5.value.y = CalendarControl.DAYVIEWHEADERH
end
l_4_5.value.x = l_4_3.x
l_4_5.value.z = l_4_3.z
l_4_6.value = true
end
ExtendInternalGetItemSize = function(l_5_0, l_5_1, l_5_2, l_5_3, l_5_4, l_5_5, l_5_6)
trace("HandleExtendInternalGetItemSize" .. l_5_4)
local l_5_7 = l_5_0:GetGenerator():GetDataByRealizedIndex(l_5_4)
trace("HandleExtendInternalGetItemSize data=" .. l_5_7 .. "count=" .. l_5_0:GetGenerator():GetCount())
if l_5_7 == l_5_0:GetGenerator():GetCount() - 1 then
l_5_5.value.y = 0
else
l_5_5.value.y = CalendarControl.DAYVIEWH
end
l_5_5.value.x = l_5_2.x
l_5_5.value.z = l_5_2.z
l_5_6.value = true
end
HandleWeatherItemCreated = function(l_6_0, l_6_1)
trace("HandleWeatherItemCreated")
local l_6_2 = l_6_1.Namespace
local l_6_3 = l_6_2:FindName("CityName")
local l_6_4 = l_6_2:FindName("Condition")
local l_6_5 = l_6_2:FindName("ForecastValue")
local l_6_6 = l_6_2:FindName("Temperature")
local l_6_7 = l_6_2:FindName("Weather")
if l_6_0 == 0 then
l_6_3._visible = false
l_6_4._visible = false
l_6_5._visible = false
l_6_6._visible = false
l_6_7._visible = false
l_6_1._visible = false
else
l_6_1._visible = true
l_6_3._visible = true
l_6_4._visible = true
l_6_5._visible = true
l_6_6._visible = true
InitializeWeatherIcon(l_6_7, false)
SetDayWeatherIcon(CalendarControl.selectedYear, CalendarControl.selectedMonth, CalendarControl.selectedDay, l_6_1)
end
end
HandleWeatherItemDestroyed = function(l_7_0)
trace("HandleWeatherItemDestroyed")
local l_7_1 = l_7_0.Namespace
local l_7_2 = l_7_1:FindName("CityName")
local l_7_3 = l_7_1:FindName("Condition")
local l_7_4 = l_7_1:FindName("ForecastValue")
local l_7_5 = l_7_1:FindName("Temperature")
local l_7_6 = l_7_1:FindName("Weather")
l_7_2._visible = false
l_7_3._visible = false
l_7_4._visible = false
l_7_5._visible = false
l_7_6._visible = false
l_7_2 = nil
l_7_3 = nil
l_7_4 = nil
l_7_5 = nil
l_7_6 = nil
trace("HandleWeatherItemDestroyed end")
end
HandleDayAppItemCreated = function(l_8_0, l_8_1)
trace("create item start--------" .. l_8_0)
local l_8_2 = l_8_1.Namespace
local l_8_3 = l_8_2:FindName("Time")
local l_8_4 = l_8_2:FindName("Subject")
local l_8_5 = l_8_2:FindName("Separater")
local l_8_6 = l_8_2:FindName("Icon")
l_8_5.Size.width = CalendarControl.DayViewW
trace("line w=" .. l_8_5.Size.width)
l_8_5.TextureCoords:set(0, 0, l_8_5.Size.width / 2, 1)
l_8_5._visible = true
l_8_3._visible = true
if l_8_0 == 0 then
l_8_6._visible = true
l_8_6:SetTextureRef("button")
l_8_3.Position.x = CalendarControl.DAYVIEW_ICONW + 2 * CalendarControl.DAYVIEW_ICONDX
l_8_3.Position.y = -(CalendarControl.DAYVIEWH - l_8_3.Size.height) / 2
l_8_3.String = Locale:GetString("IDS_CALENDAR_NEWAPPOINTMENT")
l_8_4._visible = false
l_8_1.Focusable = true
l_8_1.OnSelected:connect(HandleDayAppItemPress)
l_8_1.OnDeselected:connect(HandleDayAppItemRelease)
else
local l_8_7 = AppointmentData[l_8_0 - 1]
if l_8_7 ~= nil then
l_8_6._visible = false
l_8_3.String = l_8_7.Time
l_8_3.Position.x = 0
l_8_3.Position.y = CalendarControl.DAYTIMEPOSY
l_8_4.String = l_8_7.Subject
l_8_4._visible = true
l_8_1.Focusable = true
else
l_8_5._visible = false
l_8_6._visible = false
l_8_3._visible = false
l_8_4._visible = false
end
end
trace("create item end--------")
end
HandleDayAppItemDestroyed = function(l_9_0)
trace("HandleDayAppItemDestroyed")
local l_9_1 = l_9_0.Namespace
local l_9_2 = l_9_1:FindName("Time")
local l_9_3 = l_9_1:FindName("Subject")
local l_9_4 = l_9_1:FindName("Separater")
local l_9_5 = l_9_1:FindName("Icon")
l_9_2._visible = false
l_9_3._visible = false
l_9_4._visible = false
l_9_5._visible = false
l_9_2 = nil
l_9_3 = nil
l_9_4 = nil
l_9_5 = nil
trace("HandleDayAppItemDestroyed end")
end
HandleDayAppItemKeyDown = function(l_10_0, l_10_1, l_10_2)
if l_10_1.Code == KeyCode_Return or l_10_1.Code == KeyCode_Space then
HandleAppointmentSelection()
l_10_2.value = true
end
end
HandleDayAppItemPress = function(l_11_0)
trace("HandleDayAppItemPress")
local l_11_1 = l_11_0.Namespace
local l_11_2 = l_11_1:FindName("Icon")
local l_11_3 = l_11_1:FindName("Time")
l_11_2:SetTextureRef("button_down")
end
HandleDayAppItemRelease = function(l_12_0)
trace("HandleDayAppItemRelease")
local l_12_1 = l_12_0.Namespace
local l_12_2 = l_12_1:FindName("Icon")
local l_12_3 = l_12_1:FindName("Time")
l_12_2:SetTextureRef("button")
end
HandleDayAppSelection = function(l_13_0)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -