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

📄 1.lua

📁 htc manila 2 sourcecode
💻 LUA
📖 第 1 页 / 共 2 页
字号:
-- Decompiled using luadec 0.6 by sztupy (http://winmo.sztupy.hu)
-- Command line was: -l 58;;;0,0,0,0,0,0,1;;;;;;0,0,2,9,16;;;;;;0,0,0,0,0,0,1,6,15,20,21,33,34,34,95,96,126;;;;;;;17,26,96;;;;;;;;;;;;0,0,6,16;;;;;;;;;;;; 1c684cd8_manila_137E.luac 

TimeTable = {}
machineStatus_OnTimeChanged2 = function()
   if DataBindingEnabled then
      if machineStatus.CurrentTime.Value.IsTwentyFourHour then
         ListTimeText.Position.x = -7
         ListTimeText.String = machineStatus.CurrentTime.Value:GetTimeString(TimeFormatOptions_Default)
         ListAMPM._visible = false
      else
         ListTimeText.Position.x = -40
         ListTimeText.String = machineStatus.CurrentTime.Value:GetTimeString(TimeFormatOptions_ExcludeTimeMarker)
         ListAMPM.String = machineStatus.CurrentTime.Value:GetTimeString("tt")
         ListAMPM._visible = true
      end
   else
      ListTimeText.String = "12:59"
   end
end

if DataBindingEnabled then
   ListTimeText.onPress:connect(OnTimePressed)
   ListTimeText.onRelease:connect(OnTimeReleased)
   ListTimeText.onReleaseOutside:connect(OnTimeReleasedOutside)
   ListAMPM.onPress:connect(OnTimePressed)
   ListAMPM.onRelease:connect(OnTimeReleased)
   ListAMPM.onReleaseOutside:connect(OnTimeReleasedOutside)
   machineStatus.CurrentTime.OnValueChanged:connect(machineStatus_OnTimeChanged2)
   machineStatus.TwentyFourHourTime.OnValueChanged:connect(machineStatus_OnTimeChanged2)
   machineStatus.TimeZone.OnValueChanged:connect(machineStatus_OnTimeChanged2)
end
machineStatus_OnTimeChanged2()

SingleGroup = {
  Group = nil,
  DesiredVisibility = false,
  Initialize = function(l_2_0, l_2_1)
     l_2_0.Group = l_2_1
     l_2_0.DesiredVisibility = l_2_0.Group._visible
  end,
  InitializeAnimation = function(l_3_0, l_3_1, l_3_2, l_3_3, l_3_4, l_3_5)
   local l_3_6 = 35
   if l_3_5 ~= nil and l_3_5 then
      if l_3_1 ~= nil then
         l_3_0.Group.Position:ClearInterpolate()
         l_3_0.Group.Position.y = l_3_1
         l_3_0.Group.Center:ClearInterpolate()
         l_3_0.Group.Center.y = -l_3_1
      end
      if l_3_2 ~= nil then
         l_3_0.Group.Rotation:ClearInterpolate()
         l_3_0.Group.Rotation.x = l_3_2
      end
      if l_3_3 ~= nil then
         l_3_0.Group.Opacity:ClearInterpolate()
         l_3_0.Group.Opacity.value = l_3_3
         if l_3_3 == 0 then
            l_3_0.Group._visible = false
         else
            l_3_0.Group._visible = true
         end
      end
   else
     if l_3_1 ~= nil then
        if MultiGroup.appointmentcount > 3 or _application.Orientation == ScreenOrientation_Portrait then
           l_3_0.Group.Position:Interpolate(Vector3(l_3_0.Group.Position.x, l_3_1, l_3_0.Group.Position.z), l_3_6, 0, Interpolate_EaseOutExpo)
        end
        l_3_0.Group.Center:Interpolate(Vector3(l_3_0.Group.Center.x, -l_3_1, l_3_0.Group.Center.z), l_3_6, 0, Interpolate_EaseOutExpo)
     end
     if l_3_2 ~= nil then
        l_3_0.Group.Rotation:Interpolate(Vector3(l_3_2, l_3_0.Group.Rotation.y, l_3_0.Group.Rotation.z), l_3_6, 0, Interpolate_EaseOutExpo)
     end
     if l_3_3 ~= nil then
        if l_3_3 == 0 then
           l_3_0.Group.Opacity:Interpolate(l_3_3, l_3_6, 0, Interpolate_EaseOutExpo, loadstring(l_3_0.Group.InstanceName .. "._visible = false;"))
        else
           l_3_0.Group._visible = true
           l_3_0.Group.Opacity:Interpolate(l_3_3, l_3_6, 0, Interpolate_EaseOutExpo)
        end
     end
   end
   if l_3_4 ~= nil then
      l_3_0.DesiredVisibility = l_3_4
   end
  end,
  
  Visible = function(l_4_0)
   return l_4_0.DesiredVisibility
  end,

  new = function(l_5_0, l_5_1)
    if not l_5_1 then
       l_5_1 = {}
    end
    setmetatable(l_5_1, l_5_0)
    l_5_0.__index = l_5_0
    return l_5_1
  end
}


RotateDownOnDownKey = function(l_6_0, l_6_1, l_6_2)
   if l_6_1.Code == KeyCode_Down then
      l_6_0.onKeyDown:disconnect(RotateDownOnDownKey)
      MultiGroup:Rotate(false)
   end
   l_6_2.value = false
end

RotateUpOnUpKey = function(l_7_0, l_7_1, l_7_2)
   if l_7_1.Code == KeyCode_Up then
      l_7_0.onKeyDown:disconnect(RotateUpOnUpKey)
      MultiGroup:Rotate(true)
   end
   l_7_2.value = false
end


MultiGroup = {appointmentcount = 0, Group1Animation = nil, Group2Animation = nil, GroupAppointment0 = nil, GroupAppointment1 = nil, GroupAppointment2 = nil, GroupAppointment3 = nil, GroupAppointment4 = nil, GroupNoAppointmentsAnimation = nil, GroupClockTabs = nil, CurrentItem = 1, FirstSide = true,
  Initialized = false,
  Initialize = function(l_8_0, l_8_1, l_8_2, l_8_3, l_8_4, l_8_5, l_8_6, l_8_7, l_8_8, l_8_9)
   if not Initialized then
      l_8_0.Group1Animation = SingleGroup:new()
      l_8_0.Group1Animation:Initialize(l_8_1)
      l_8_0.Group2Animation = SingleGroup:new()
      l_8_0.Group2Animation:Initialize(l_8_2)
      l_8_0.GroupAppointment0 = SingleGroup:new()
      l_8_0.GroupAppointment0:Initialize(l_8_3)
      l_8_0.GroupAppointment1 = SingleGroup:new()
      l_8_0.GroupAppointment1:Initialize(l_8_4)
      l_8_0.GroupAppointment2 = SingleGroup:new()
      l_8_0.GroupAppointment2:Initialize(l_8_5)
      l_8_0.GroupAppointment3 = SingleGroup:new()
      l_8_0.GroupAppointment3:Initialize(l_8_6)
      l_8_0.GroupAppointment4 = SingleGroup:new()
      l_8_0.GroupAppointment4:Initialize(l_8_7)
      l_8_0.GroupNoAppointmentsAnimation = SingleGroup:new()
      l_8_0.GroupNoAppointmentsAnimation:Initialize(l_8_8)
      l_8_0.GroupClockTabs = SingleGroup:new()
      l_8_0.GroupClockTabs:Initialize(l_8_9)
      Initialized = true
      return true
   end
   return false
  end,

  GetHeight = function(l_9_0, l_9_1)
   local l_9_2 = l_9_1.Group.InstanceName
   local l_9_3 = l_9_1.Group.Namespace:FindName(l_9_2 .. "_SBar1")
   local l_9_4 = l_9_1.Group.Namespace:FindName(l_9_2 .. "_SBar2")
   return l_9_4.Position.y - l_9_3.Position.y
  end,

  GetItemY = function(l_10_0, l_10_1)
   if l_10_1 == 9 then
      return 232 + (l_10_0.CurrentItem - 1) * 500
   elseif l_10_1 == 1 then
      return l_10_1 * -70 + 115 + (l_10_0.CurrentItem - 1) * 164
   elseif l_10_1 == 2 then
      return l_10_1 * -70 + 115 + (l_10_0.CurrentItem - 1) * 164
   elseif l_10_1 == 6 then
      return -100 + (l_10_0.CurrentItem - 1) * 164
   else
      return l_10_1 * -80 + 140 + (l_10_0.CurrentItem - 1) * 164
   end
  end,

  GetItemRotation = function(l_11_0, l_11_1)
   if l_11_1 == 9 then
      return (l_11_0.CurrentItem - 1) * -90
   else
      return 0
   end
  end,

  GetItemOpacity = function(l_12_0, l_12_1)
   if l_12_1 == 9 then
      return 100 - (l_12_0.CurrentItem - 1) * 100
   elseif l_12_1 >= 6 then
      return l_12_0.CurrentItem * 100 - 100
   else
      return 100
   end
  end,

  ConnectKeyRotation = function(l_13_0, l_13_1, l_13_2, l_13_3)
   l_13_3.Group.onKeyDown:disconnect(RotateDownOnDownKey)
   l_13_3.Group.onKeyDown:disconnect(RotateUpOnUpKey)
   if l_13_0.CurrentItem == 1 then
     if l_13_1 == l_13_2 then
       l_13_3.Group.onKeyDown:connect(RotateDownOnDownKey)
     end
   else
      if l_13_1 == 1 then
         l_13_3.Group.onKeyDown:connect(RotateUpOnUpKey)
      end
   end
  end,

  InitializeIndexAnimation = function(l_14_0, l_14_1, l_14_2, l_14_3, l_14_4, l_14_5)
   local my = MultiGroup:GetItemY(l_14_1)
   local mr = MultiGroup:GetItemRotation(l_14_1)
   local mo = l_14_2 and MultiGroup:GetItemOpacity(l_14_1) or 0
   if l_14_1 == 9 then
      l_14_4 = my
   end
   if l_14_3 ~= nil then
      l_14_3:InitializeAnimation(l_14_4, mr, mo , l_14_2, l_14_5)
   end
  end,

  InitializeFullAnimation = function(l_15_0, l_15_1, l_15_2, l_15_3, l_15_4, l_15_5)
   local l_15_6 = true
   local l_15_7 = l_15_2 == nil and l_15_0.Group2Animation:Visible() or l_15_2
   Update_arrow()
   if l_15_3 then
      l_15_0.appointmentcount = l_15_3
   end
   local l_15_8 = l_15_0.appointmentcount
   l_15_8 = l_15_8 == 0
   local l_15_9 = true
   local l_15_10 = 0
   if l_15_6 then
      l_15_10 = l_15_10 + 1
   end
   if l_15_7 then
      l_15_10 = l_15_10 + 1
   end
   l_15_10 = l_15_10 + l_15_0.appointmentcount
   if l_15_8 then
      l_15_10 = l_15_10 + 1
   end
   local l_15_11 = 0
   local l_15_12, l_15_13 = nil, nil
   if l_15_0.CurrentItem == 1 then
      l_15_12 = 50
      l_15_0.MaxShowCount = 4
   else
      l_15_12 = NotificationShiftY
      l_15_0.MaxShowCount = 7
   end
   if l_15_0.MaxShowCount < l_15_10 then
      l_15_10 = l_15_0.MaxShowCount
   end
   l_15_11 = l_15_11 + 1
   l_15_0:InitializeIndexAnimation(l_15_11, l_15_6, l_15_0.Group1Animation, l_15_12, l_15_5)
   l_15_12 = l_15_12 + MultiGroup:GetHeight(l_15_0.Group1Animation)
   l_15_0:ConnectKeyRotation(l_15_11, l_15_10, l_15_0.Group1Animation)
   l_15_11 = l_15_11 + (l_15_7 and 1 or 0)
   l_15_0:InitializeIndexAnimation(l_15_11, l_15_7, l_15_0.Group2Animation, l_15_12, l_15_5)
   l_15_12 = l_15_12 + (l_15_7 and MultiGroup:GetHeight(l_15_0.Group2Animation) or 0)
   l_15_0:ConnectKeyRotation(l_15_11, l_15_10, l_15_0.Group2Animation)
   local l_15_14 = l_15_0.MaxShowCount - (l_15_11)
   local l_15_15 = l_15_0.appointmentcount
   if l_15_14 < l_15_15 then
      l_15_15 = l_15_14
   end
   if l_15_15 < 0 then
      l_15_15 = 0
   end
   if l_15_15 > 5 then
      l_15_15 = 5
   end
   trace("index = " .. tostring(l_15_11))
   trace("MaxAppointment_count = " .. tostring(l_15_14))
   trace("showappointment_count = " .. tostring(l_15_15))
   local l_15_16 = l_15_15 > 0
   l_15_11 = l_15_11 + (l_15_16 and 1 or 0)
   l_15_0:InitializeIndexAnimation(l_15_11, l_15_16, l_15_0.GroupAppointment0, l_15_12, l_15_5)
   l_15_12 = l_15_12 + (l_15_16 and MultiGroup:GetHeight(l_15_0.GroupAppointment0) or 0)
   l_15_0:ConnectKeyRotation(l_15_11, l_15_10, l_15_0.GroupAppointment0)
   if l_15_16 then
      l_15_15 = l_15_15 - 1
   end
   l_15_16 = l_15_15 > 0
   l_15_11 = l_15_11 + (l_15_16 and 1 or 0)
   l_15_0:InitializeIndexAnimation(l_15_11, l_15_16, l_15_0.GroupAppointment1, l_15_12, l_15_5)
   l_15_12 = l_15_12 + (l_15_16 and MultiGroup:GetHeight(l_15_0.GroupAppointment1) or 0)
   l_15_0:ConnectKeyRotation(l_15_11, l_15_10, l_15_0.GroupAppointment1)
   if l_15_16 then
      l_15_15 = l_15_15 - 1
   end
   l_15_16 = l_15_15 > 0
   l_15_11 = l_15_11 + (l_15_16 and 1 or 0)
   l_15_0:InitializeIndexAnimation(l_15_11, l_15_16, l_15_0.GroupAppointment2, l_15_12, l_15_5)
   l_15_12 = l_15_12 + (l_15_16 and MultiGroup:GetHeight(l_15_0.GroupAppointment2) or 0)
   l_15_0:ConnectKeyRotation(l_15_11, l_15_10, l_15_0.GroupAppointment2)
   if l_15_16 then
      l_15_15 = l_15_15 - 1
   end
   l_15_16 = l_15_15 > 0
   l_15_11 = l_15_11 + (l_15_16 and 1 or 0)
   l_15_0:InitializeIndexAnimation(l_15_11, l_15_16, l_15_0.GroupAppointment3, l_15_12, l_15_5)
   l_15_12 = l_15_12 + (l_15_16 and MultiGroup:GetHeight(l_15_0.GroupAppointment3) or 0)
   l_15_0:ConnectKeyRotation(l_15_11, l_15_10, l_15_0.GroupAppointment3)
   if l_15_16 then
      l_15_15 = l_15_15 - 1
   end
   l_15_16 = l_15_15 > 0
   l_15_11 = l_15_11 + (l_15_16 and 1 or 0)
   l_15_0:InitializeIndexAnimation(l_15_11, l_15_16, l_15_0.GroupAppointment4, l_15_12, l_15_5)
   l_15_12 = l_15_12 + (l_15_16 and MultiGroup:GetHeight(l_15_0.GroupAppointment4) or 0)
   l_15_0:ConnectKeyRotation(l_15_11, l_15_10, l_15_0.GroupAppointment4)
   if l_15_16 then
      l_15_15 = l_15_15 - 1
   end
   l_15_11 = l_15_11 + ((l_15_8 and 0) or (l_15_6 and 1) or 0)
   l_15_0:InitializeIndexAnimation(l_15_11, l_15_8, l_15_0.GroupNoAppointmentsAnimation, l_15_12, l_15_5)
   l_15_12 = l_15_12 + (l_15_8 and MultiGroup:GetHeight(l_15_0.GroupNoAppointmentsAnimation) or 0)
   l_15_0:ConnectKeyRotation(l_15_11, l_15_10, l_15_0.GroupNoAppointmentsAnimation)
   if _application.Orientation == ScreenOrientation_Portrait then
      l_15_0:InitializeIndexAnimation(9, l_15_9, l_15_0.GroupClockTabs, nil, l_15_5)
   end
   if l_15_10 == 2 then
      down_arrow.Position.y = downPosition2
   elseif l_15_10 == 3 then
      down_arrow.Position.y = downPosition3
   elseif l_15_10 == 4 then
      down_arrow.Position.y = downPosition4
   elseif l_15_10 == 5 then
      down_arrow.Position.y = downPosition5
   end
  end,

  Rotate = function(l_16_0, l_16_1, l_16_2)
   if not Initialized then
      return 
   end
   if l_16_1 == false then
      l_16_0.CurrentItem = 2
   elseif l_16_1 == true then
      l_16_0.CurrentItem = 1
   elseif l_16_1 == nil then
      if l_16_0.CurrentItem == 1 then
         l_16_0.CurrentItem = 2
      else
         l_16_0.CurrentItem = 1
      end
   end
   if l_16_0.CurrentItem == 1 then
      down_arrow._visible = true
      up_arrow._visible = false
      if l_16_2 == nil or not l_16_2 then
         Tabs.Opacity:Interpolate(0, 100, 0, 40, Interpolate_Linear, nil)
         alarm_clock.Opacity:Interpolate(100, 30, 30, Interpolate_Linear)
         Date.Opacity:Interpolate(100, 30, 30, Interpolate_Linear)
         ListTime.Opacity:Interpolate(0, 20, 0, Interpolate_Linear)
      else
         Tabs.Opacity:ClearInterpolate()
         Tabs.Opacity.value = 100
         alarm_clock.Opacity:ClearInterpolate()
         alarm_clock.Opacity.value = 100
         Date.Opacity:ClearInterpolate()
         Date.Opacity.value = 100
         ListTime.Opacity:ClearInterpolate()
         ListTime.Opacity.value = 0
      end
   else

⌨️ 快捷键说明

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