📄 5.lua
字号:
-- Decompiled using luadec 0.7 by sztupy (http://winmo.sztupy.hu)
-- Command line was: -l ;;;;0,0,16;0,16;0,7;0,7;15;;0,20;0,42;0,4,9,21;;;;; 6c422ab4_manila_704A.luac
fCollectionJustReset = false
HandleMouseReleaseInList = function(l_1_0, l_1_1)
ThumbnailList:GetGenerator():SelectObject(l_1_0)
l_1_1.value = true
end
OnItemSelected = function(l_2_0)
l_2_0:Focus()
end
OnHeadItemSelected = function(l_3_0)
l_3_0:Focus()
end
HandleItemCreated = function(l_4_0, l_4_1)
trace("Item generated!\n")
l_4_1.Focusable = true
l_4_1.onKeyUp:connect(OnKeyDown)
l_4_1.OnSelected:connect(OnItemSelected)
local l_4_2 = l_4_1.Namespace:FindName("ThumbnailPicture")
l_4_2.onRelease:connect(HandleMouseReleaseInList)
trace("ThumbnailPicture found\n")
SetContactPicture(l_4_2, l_4_0, true)
if fCollectionJustReset then
fCollectionJustReset = false
SetLastIndex()
end
end
HandleHeadItemCreated = function(l_5_0)
trace("Head item generated!\n")
l_5_0.Focusable = true
l_5_0.onKeyDown:connect(OnKeyDown)
l_5_0.OnSelected:connect(OnHeadItemSelected)
local l_5_1 = l_5_0.Namespace:FindName("AddNewContactImage")
l_5_1.onRelease:connect(HandleMouseReleaseInList)
if fCollectionJustReset and ThumbnailList:GetGenerator():GetCount() == 1 then
fCollectionJustReset = false
ThumbnailList:GetGenerator().SelectedIndex = 0
end
end
HandleItemDestroyed = function(l_6_0)
trace("Item destroyed!\n")
local l_6_1 = l_6_0.Namespace:FindName("ThumbnailPicture")
l_6_0.onKeyUp:disconnect(OnKeyDown)
l_6_0.OnSelected:disconnect(OnItemSelected)
l_6_1.onRelease:disconnect(HandleMouseReleaseInList)
end
HandleHeadItemDestroyed = function(l_7_0)
trace("Head item destroyed!\n")
local l_7_1 = l_7_0.Namespace:FindName("AddNewContactImage")
l_7_0.onKeyDown:disconnect(OnKeyDown)
l_7_0.OnSelected:disconnect(OnHeadItemSelected)
l_7_1.onRelease:disconnect(HandleMouseReleaseInList)
end
OnCollectionReset = function()
trace("Got a collection reset event\n")
_application.Store:SetIntValue(Lifetime_Application, "People.LastSelectedIndex", 0)
fCollectionJustReset = true
local l_8_0 = ThumbnailList:GetGenerator()
if l_8_0.Collection:GetCount() == 0 then
l_8_0:SetHeadItemComponent(ThumbnailList:GetMovie(), ThumbnailList.ComponentLibraryName, 16)
HideAddFavoriteIcon(false)
else
if l_8_0.Collection:GetCount() < MaxFavorites then
l_8_0:SetHeadItemComponent(nil, "", -1)
HideAddFavoriteIcon(false)
else
l_8_0:SetHeadItemComponent(nil, "", -1)
HideAddFavoriteIcon(true)
end
end
collectgarbage("collect")
DidFavoriteChange = false
end
OnSelectedIndexChanged = function(l_9_0, l_9_1)
trace("Selected index changed from " .. l_9_0 .. " to " .. l_9_1 .. "\n")
if l_9_1 == -1 then
SelectedItemDetails._visible = false
return
end
_application.Store:SetIntValue(Lifetime_Application, "People.LastSelectedIndex", l_9_1)
SetIndexName(Name, l_9_1)
trace("Assigned the selected contact's name\n")
SetIndexNumber(Number, l_9_1)
trace("Assigned the selected contact's number\n")
ShowContactIcon(l_9_1)
SelectedItemDetails._visible = true
end
SetConnectMethod = function(l_10_0)
if l_10_0 == 0 and ThumbnailList:GetGenerator().Collection:GetCount() == 0 then
trace("@@@### index = 0 or Contact count > MaxFavorites")
else
local l_10_1 = ThumbnailList:GetGenerator():GetData(l_10_0)
if l_10_1.BusinessTelephoneNumber:HasValue() then
iconArray[2].Tag.cm = ContactPropertyID_BusinessTelephoneNumber
else
if l_10_1.BusinessTelephoneNumber2:HasValue() then
iconArray[2].Tag.cm = ContactPropertyID_BusinessTelephoneNumber2
end
end
if l_10_1.HomeTelephoneNumber:HasValue() then
iconArray[3].Tag.cm = ContactPropertyID_HomeTelephoneNumber
else
if l_10_1.HomeTelephoneNumber2:HasValue() then
iconArray[3].Tag.cm = ContactPropertyID_HomeTelephoneNumber2
end
end
if l_10_1.EmailAddress1:HasValue() then
iconArray[5].Tag.cm = ContactPropertyID_EmailAddress1
else
if l_10_1.EmailAddress2:HasValue() then
iconArray[5].Tag.cm = ContactPropertyID_EmailAddress2
else
if l_10_1.EmailAddress3:HasValue() then
iconArray[5].Tag.cm = ContactPropertyID_EmailAddress3
end
end
end
if l_10_1.SMS:HasValue() then
iconArray[4].Tag.cm = ContactPropertyID_SMS
else
if l_10_1.MMS:HasValue() then
iconArray[4].Tag.cm = ContactPropertyID_MMS
end
end
end
end
ShowContactIcon = function(l_11_0)
trace("@@@### ShowContactIcon Start")
for i_1,i_2 in pairs(iconArray) do
iconArray[i_2.Tag.index].Tag.enable = false
iconArray[i_2.Tag.index]._visible = false
end
if ThumbnailList:HasGenerator() then
if l_11_0 == 0 and ThumbnailList:GetGenerator().Collection:GetCount() == 0 then
else
local l_11_1 = ThumbnailList:GetGenerator():GetData(l_11_0)
if l_11_1.BusinessTelephoneNumber:HasValue() then
iconArray[2].Tag.enable = true
iconArray[2]._visible = true
end
if l_11_1.HomeTelephoneNumber:HasValue() then
iconArray[3].Tag.enable = true
iconArray[3]._visible = true
end
if l_11_1.EmailAddress1:HasValue() then
iconArray[5].Tag.enable = true
iconArray[5]._visible = true
iconArray[5].Tag.EmailValue = l_11_1.EmailAddress1:GetValue()
end
if l_11_1.MobileTelephoneNumber:HasValue() then
iconArray[1].Tag.enable = true
iconArray[1]._visible = true
end
if l_11_1.SMS:HasValue() then
iconArray[4].Tag.enable = true
iconArray[4]._visible = true
end
ShiftIcons()
end
end
end
ConnectViaDesireMethod = function(l_12_0)
local l_12_1 = ThumbnailList:GetGenerator().SelectedIndex
local l_12_2 = ThumbnailList:GetGenerator():GetCount()
if l_12_1 < 0 and l_12_2 ~= MaxFavorites then
return
end
local l_12_3 = ThumbnailList:GetGenerator():GetData(l_12_1)
if l_12_3 ~= nil then
l_12_3:ConnectVia(l_12_0)
end
end
HideAddFavoriteIcon = function(l_13_0)
if l_13_0 == nil then
l_13_0 = not AddFavoriteGroup._visible
end
if ThumbnailList:GetGenerator().Collection:GetCount() == 0 then
ThumbnailListContainer._visible = false
else
ThumbnailListContainer._visible = true
end
if _application.Orientation == ScreenOrientation_Portrait then
AddFavoriteGroup.Position.value = Vector3(422, -70, 0)
if l_13_0 then
AddFavoriteGroup._visible = false
ThumbnailListContainer.Position.value = Vector3(422, -84, 0)
ThumbnailList.Viewport.value = Vector3(58, 500, 0)
ThumbnailListMask.Rectangle = RectFProperty(RectF(0, -27, 58, 696))
else
AddFavoriteGroup._visible = true
ThumbnailListContainer.Position.value = Vector3(422, -134, 0)
ThumbnailList.Viewport.value = Vector3(58, 436, 0)
ThumbnailListMask.Rectangle = RectFProperty(RectF(0, 0, 58, 696))
end
else
if _application.Orientation == ScreenOrientation_Landscape then
AddFavoriteGroup.Position.value = Vector3(727, -10, 0)
if l_13_0 then
AddFavoriteGroup._visible = false
ThumbnailListContainer.Position.value = Vector3(727, -24, 0)
ThumbnailList.Viewport.value = Vector3(58, 340, 0)
ThumbnailListMask.Rectangle = RectFProperty(RectF(0, -27, 58, 696))
else
AddFavoriteGroup._visible = true
ThumbnailListContainer.Position.value = Vector3(727, -88, 0)
ThumbnailList.Viewport.value = Vector3(58, 276, 0)
ThumbnailListMask.Rectangle = RectFProperty(RectF(0, 0, 58, 696))
end
end
end
end
HandleAddFavoriteOnPress = function(l_14_0, l_14_1)
AddFavoriteGroup.Scale:Interpolate(Vector3(1, 1, 1), Vector3(0.79998779296875, 0.79998779296875, 0.79998779296875), 0, 0, Interpolate_Linear)
end
HandleAddFavoriteOnRelease = function(l_15_0, l_15_1)
AddFavoriteGroup.Scale:Interpolate(Vector3(0.79998779296875, 0.79998779296875, 0.79998779296875), Vector3(1, 1, 1), 0, 0, Interpolate_Linear)
AddFavorite()
end
HandleAddFavoriteOnReleaseOutside = function(l_16_0, l_16_1)
AddFavoriteGroup.Scale:Interpolate(Vector3(0.79998779296875, 0.79998779296875, 0.79998779296875), Vector3(1, 1, 1), 0, 0, Interpolate_Linear)
end
AddFavoriteFeedback = HitFeedback(AddFavoriteGroup)
AddFavoriteFrame.onPress:connect(HandleAddFavoriteOnPress)
AddFavoriteFrame.onRelease:connect(HandleAddFavoriteOnRelease)
AddFavoriteFrame.onReleaseOutside:connect(HandleAddFavoriteOnReleaseOutside)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -