⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 peopleallscript.luac.lua

📁 htc manila 2 sourcecode
💻 LUA
📖 第 1 页 / 共 2 页
字号:
-- Decompiled using luadec 0.6 by sztupy (http://winmo.sztupy.hu)
-- Command line was: -l ;0,47;;;;;7,13,18,20,22;7,13,18,20,22;4,8,12,16,20,24,30;;0,4,8,12,16,20,24;0,7,11;0,7,11;0,22;;;0,4,19;;;;0,7;0,19;;0,28,49;;0,13;;13,14;14;;;123;2;;6;19,52; 4ddaea6e_manila.luac 

trace("Load PeopleAllGlobal")
require("machine_status_svc")
require("LetterPicker")
require("transitions")
require("people\\ContactObject")
require("People\\PeopleSIMDialog")
require("people\\PeopleSearchGroup")
require("people\\PeopleImageLoader")
require("people\\PeopleIndicatorLoader")
require("gc\\AutoGC")
require("theme")
require("MyFaves_manager_v1_5_svc")
ContactObj = nil
SearchObj = nil
LetterPickerObj = nil
PicLoader = nil
IndLoader = nil
AutoGCObj = nil
SSelector = nil
FSelector = nil
gbClearCategry = true
PageIsDestroyed = false
gbRequireLandscape = false
_PeopleAll_ScreenRotation = nil
MyFavesUtilityObj = nil
bMyFavesTurnOn = false
bSelected = false
PeopleFrom = {All = 1, Device = 2, SIM = 3, Updated = 4}
GCCounter = 10
DespDx = 100
objs3D = {}
objs3D[1] = Camera3D
objs2D = {}
objs2D[1] = SearchGroup
setOffScreen()
OnNavigateOut = function(l_1_0)
   PageIsDestroyed = true
   _application.OnVisibilityChanged:disconnect(HandleVisibilityChanged)
   _request.NavigateOutTo:disconnect(OnNavigateOut)
   sprCover.onPress:disconnect(HandleEatsEventsCover)
   sprCover.onRelease:disconnect(HandleEatsEventsCover)
   sprCover.onReleaseOutside:disconnect(HandleEatsEventsCover)
   PeopelAll_CancelAllAsyncRequest()
   if SearchObj then
      SearchObj:DisableSearchContacts()
      SearchObj:SetHitIconVisibility(false)
      _application.OnSipPanelChanged:disconnect(HandleOnSipPanelChanged)
   end
   local l_1_1 = ContactObj:GetScrollPhysics()
   if l_1_1 ~= nil then
      l_1_1:CancelBehaviorCallback()
   end
   if PicLoader ~= nil then
      PicLoader:StopThread()
      PicLoader = nil
   end
   if IndLoader ~= nil then
      IndLoader:StopThread()
      IndLoader = nil
   end
   ContactObj:DisconnectEvents()
   if AutoGCObj ~= nil then
      AutoGCObj:Stop()
      AutoGCObj = nil
   end
   if gbClearCategry == true then
      ContactObj.ContactList:ClearSelectedCategories()
   end
   Transition(l_1_0, "Out")
end

OnNavigateIn = function(l_2_0)
   _request.NavigateInFrom:disconnect(OnNavigateIn)
   AutoGCObj = AutoGC(true, PeopleAll_OnPreGC, PeopleAll_OnPostGC)
   Transition(l_2_0, "In")
end

_request.NavigateOutTo:connect(OnNavigateOut)
_request.NavigateInFrom:connect(OnNavigateIn)
PeopleAll_OnPreGC = function(l_3_0)
   if PageIsDestroyed then
      trace("PeopleAllScript PageIsDestroyed PeopleAll_OnPreGC GC canceled\n")
      l_3_0 = false
      return 
   end
   trace("PeopleAllScript OnPreGC " .. gcinfo() .. " KB")
   l_3_0 = true
end

PeopleAll_OnPostGC = function()
   trace("PeopleAllScript OnPostGC " .. gcinfo() .. " KB")
end

PeopleAll_ListPhysicsScrollBehaviorCallback = function(l_5_0)
   if PageIsDestroyed then
      trace("PeopleAllScript PageIsDestroyed PeopleAll_ListPhysicsScrollBehaviorCallback ignored\n")
      return 
   end
   if l_5_0 == GESTURE_PAN_END then
      PeopleAll_UpdatePicture()
      collectgarbage("collect")
   end
end

PeopleAll_UpdatePicture = function()
   if PeopleListView == nil then
      return 
   end
   local l_6_0 = PeopleListView:GetLayout()
   if l_6_0 == nil then
      return 
   end
   local l_6_1 = PeopleListView:GetGenerator()
   if l_6_1 == nil then
      return 
   end
   local l_6_2 = l_6_0:GetVisibleHeadIndex()
   local l_6_3 = l_6_0:GetVisibleCount()
   local l_6_4 = l_6_2 + l_6_3 - 1
   for i = l_6_2, l_6_4 do
      local gi = l_6_1:GetItem(i)
      if gi ~= nil then
        if gi.Tag ~= nil then
          if gi.Tag.Oid ~= nil then
             local l_6_10 = gi.Tag.Oid            
             if gi.Tag.Pic == nil then
                 gi.Tag.Pic = PeopleImageLoader(AsyncPicLoader_CreateInstance(PicLoader), gi.Namespace:FindName("HeaderIcon"), l_6_10)
             end
             if gi.Tag.Ind == nil then
                gi.Tag.Ind = PeopleIndicatorLoader(AsyncIndLoader_CreateInstance(IndLoader), gi.Namespace:FindName("InfoIcon"), gi.Namespace:FindName("Desp"), gi.Namespace:FindName("Name"), l_6_10)
             end
          end
        end
      end
   end
end

PeopelAll_CancelAllAsyncRequest = function()
   if PeopleListView == nil then
      return 
   end
   local l_7_0 = PeopleListView:GetLayout()
   if l_7_0 == nil then
      return 
   end
   local l_7_1 = PeopleListView:GetGenerator()
   if l_7_1 == nil then
      return 
   end
   local l_7_2 = l_7_0:GetVisibleHeadIndex()
   local l_7_3 = l_7_0:GetVisibleCount()
   local l_7_4 = l_7_2 + l_7_3 - 1
   for i = l_7_2, l_7_4 do
      local gi = l_7_1:GetItem(i)
      if gi ~= nil then
         PeopleAll_HandleItemDestroyed(gi)
      end
   end
end

PeopleAll_HandleItemCreated = function(l_8_0, l_8_1)
   local photoframe = l_8_1.Namespace:FindName("PhotoFrame")
   local headerinfo = l_8_1.Namespace:FindName("HeaderIcon")
   local nname = l_8_1.Namespace:FindName("Name")
   local ndesp = l_8_1.Namespace:FindName("Desp")
   local infoicon = l_8_1.Namespace:FindName("InfoIcon")
   local nline = l_8_1.Namespace:FindName("line")
   nline.Size.width = PeopleListView.Viewport.x
   ndesp.Size.width = PeopleListView.Viewport.x - DespDx
   l_8_1.Tag = {}
   photoframe._visible = true
   headerinfo._visible = true
   infoicon._visible = false
   if l_8_0 == -2 then
      photoframe:SetTextureRef("Add_New_Contact")
      nname.String = Locale:GetString("IDS_NEWITEMTITLE")
      nname._visible = true
      ndesp.String = Locale:GetString("IDS_NEWITEMSUB")
      ndesp._visible = true
      l_8_1.Tag.Add = 1
   elseif l_8_0 == -1 then
      ContactObj:SetContactPicture(ContactObj.PeopleEngine:GetMyPicture(), headerinfo)
      nname.String = Locale:GetString("IDS_MYCARDTITLE")
      nname._visible = true
      ndesp.String = Locale:GetString("IDS_MYCARDSUB")
      ndesp._visible = true
      ShowMyContactCard(infoicon)
      if machineStatus == nil then
         machineStatus = MachineStatus()
         machineStatus.ContactPictureFilePath.OnValueChanged:connect(HandleMyPhotoChanged, headerinfo)
      end
      l_8_1.Tag.My = 1
   else
      local gos = ContactObj.ContactList:GetOidStr(l_8_0 + 1)
      local ccn = ContactObj.ContactData:GetItem(l_8_0)
      nname.String = ccn.Name      
      nname.Position.y = -16      
      nname._visible =  true      
      ndesp.String = ""      
      ndesp._visible = false      
      l_8_1.Tag.Oid = gos
      if ccn.From == PeopleFrom.SIM then
         photoframe:SetTextureRef("ContactTypeSIM")
      else
         local thumb = ccn:GetThumbnail()
         if thumb:HasValue() and thumb:GetValue():IsValid() then
            headerinfo:SetTexture(thumb:GetValue().Texture)
            headerinfo.TextureCoords.value = thumb:GetValue().UV
            thumb:GetValue():Clear()
         else
            headerinfo:SetTextureRef("PeoplePlaceholderSmall")
            headerinfo.TextureCoords:set(0, 0, 0.92578125, 0.92578125)
         end
         if not ContactObj:ListPhysicsIsScrolling() then
            l_8_1.Tag.Pic = PeopleImageLoader(AsyncPicLoader_CreateInstance(PicLoader), headerinfo, gos)
            l_8_1.Tag.Ind = PeopleIndicatorLoader(AsyncIndLoader_CreateInstance(IndLoader), infoicon, ndesp, nname, gos)
         end
      end
   end
   l_8_1.OnSelected:connect(HandleItemSelected)
   l_8_1.OnDeselected:connect(HandleItemDeselected)
   if bMyFavesTurnOn == true then
      local mfi = l_8_1.Namespace:FindName("MyFavesIcon")     
      if l_8_0 >= 0 then
         local ccn = ContactObj.ContactData:GetItem(l_8_0)
         if true == MyFavesUtilityObj:IsMyFavesContactyIDForLua(ccn:GetIDForLua()) then
            mfi._visible = true
            mfi.Position.x = screenWidth - 83
         else
            mfi._visible = false
         end
      else
         mfi._visible = false
      end
   end
   l_8_1.Focusable = true
end

ShowMyContactCard = function(l_9_0)
   l_9_0.Size.width = 60
   l_9_0.Size.height = 60
   l_9_0.Position.y = -10
   l_9_0.Position.x = 360
   l_9_0:SetTextureRef("MyContactCard")
   l_9_0.TextureCoords:set(0, 0, 0.78125, 0.78125)
   l_9_0.onPress:connect(MyCardOnPress)
   l_9_0.onRelease:connect(MyCardOnRelease)
   l_9_0.onReleaseOutside:connect(MyCardOnReleaseOutside)
   l_9_0._visible = true
end

PeopleAll_HandleItemDestroyed = function(l_10_0)
   local l_10_1 = l_10_0.Namespace:FindName("PhotoFrame")
   local l_10_2 = l_10_0.Namespace:FindName("HeaderIcon")
   local l_10_3 = l_10_0.Namespace:FindName("Name")
   local l_10_4 = l_10_0.Namespace:FindName("Desp")
   local l_10_5 = l_10_0.Namespace:FindName("InfoIcon")
   local l_10_6 = l_10_0.Namespace:FindName("MyFavesIcon")
   l_10_1._visible = false
   l_10_2._visible = false
   l_10_3._visible = false
   l_10_4._visible = false
   l_10_5._visible = false
   l_10_6._visible = false
   if l_10_0.Tag ~= nil then
      if l_10_0.Tag.Add ~= nil then
         l_10_0.Tag.Add = nil
      end
      if l_10_0.Tag.My ~= nil and machineStatus ~= nil then
         machineStatus.ContactPictureFilePath.OnValueChanged:disconnect(HandleMyPhotoChanged, l_10_2)
      end
      if l_10_0.Tag.Pic ~= nil then
         local l_10_7 = l_10_0.Tag.Pic
         l_10_7.Loader:Cancel()
         l_10_7.Loader = nil
         l_10_0.Tag.Pic = nil
      end
      if l_10_0.Tag.Ind ~= nil then
         local l_10_7 = l_10_0.Tag.Ind
         l_10_7.Loader:Cancel()
         l_10_7.Loader = nil
         l_10_0.Tag.Ind = nil
      end
      if l_10_0.Tag.Oid ~= nil then
         l_10_0.Tag.Oid = nil
      end
      l_10_0.Tag = nil
   end
   l_10_0.OnSelected:disconnect(HandleItemSelected)
   l_10_0.OnDeselected:disconnect(HandleItemDeselected)
end

HandleItemSelected = function(l_11_0)
   trace("[HandleItemSelected]")
   local l_11_1 = l_11_0.Namespace:FindName("Name")
   local l_11_2 = l_11_0.Namespace:FindName("Desp")
   if l_11_1 ~= nil and bSelected == false then
      l_11_1.Color = GetMainTextSelectedColor()
   end
   if l_11_2 ~= nil and bSelected == false then
      l_11_2.Color = GetSubTextSelectedColor()
   end
end

HandleItemDeselected = function(l_12_0)
   trace("[HandleItemDeselected]")
   local l_12_1 = l_12_0.Namespace:FindName("Name")
   local l_12_2 = l_12_0.Namespace:FindName("Desp")
   if l_12_1 ~= nil then
      l_12_1.Color = GetMainTextUnselectedColor()
   end
   if l_12_2 ~= nil then
      l_12_2.Color = GetSubTextUnselectedColor()
   end
end

PeopleAll_HandleItemSelection = function(l_13_0)
   SearchObj:DisableInputBox()

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -