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

📄 graphicclock.luac.lua

📁 htc manila 2 sourcecode
💻 LUA
字号:
-- Decompiled using luadec 0.4 by sztupy (http://winmo.sztupy.hu)
-- Command line was: -l ;0;0;0,8,14,20,26,32; 58e354b3_manila.luac 

GraphicClock = class()
GraphicClock.__init = function(l_1_0, l_1_1, l_1_2, l_1_3, l_1_4, l_1_5, l_1_6, l_1_7, l_1_8)
   l_1_0.Time = l_1_1
   l_1_0.SprHourBg = l_1_2
   l_1_0.SprHourDigit1 = l_1_3
   l_1_0.SprHourDigit2 = l_1_4
   l_1_0.SprMinuteBg = l_1_5
   l_1_0.SprMinuteDigit1 = l_1_6
   l_1_0.SprMinuteDigit2 = l_1_7
   l_1_0.SprTimeMark = l_1_8
   l_1_0:LoadImagePack75()
end

GraphicClock.LoadImagePack75 = function(l_2_0)
   l_2_0.AmImgBg = "\\Windows\\HTC\\Assets\\Images\\WorldClock\\Clock_white_bg.qtc"
   l_2_0.AmImgTimeMark = "\\Windows\\HTC\\Assets\\Images\\WorldClock\\AMPM_black.qtc"
   l_2_0.AmImgDigit = "\\Windows\\HTC\\Assets\\Images\\WorldClock\\012_black.qtc"
   l_2_0.PmImgBg = "\\Windows\\HTC\\Assets\\Images\\WorldClock\\Clock_black_bg.qtc"
   l_2_0.PmImgTimeMark = "\\Windows\\HTC\\Assets\\Images\\WorldClock\\AMPM_white.qtc"
   l_2_0.PmImgDigit = "\\Windows\\HTC\\Assets\\Images\\WorldClock\\012_white.qtc"
   l_2_0.TimeMarkUv = {AM = {Left = 0, Top = 0, Right = 0.84375, Bottom = 0.265625}, PM = {Left = 0, Top = 0.265625, Right = 0.84375, Bottom = 0.53125}}
   l_2_0.DigitUv = {}
   l_2_0.DigitUv["0"] = {Left = 0, Top = 0, Right = 0.056625366210938, Bottom = 0.75}
   l_2_0.DigitUv["1"] = {Left = 0.056625366210938, Top = 0, Right = 0.11326599121094, Bottom = 0.75}
   l_2_0.DigitUv["2"] = {Left = 0.11326599121094, Top = 0, Right = 0.16990661621094, Bottom = 0.75}
   l_2_0.DigitUv["3"] = {Left = 0.16990661621094, Top = 0, Right = 0.22654724121094, Bottom = 0.75}
   l_2_0.DigitUv["4"] = {Left = 0.22654724121094, Top = 0, Right = 0.28318786621094, Bottom = 0.75}
   l_2_0.DigitUv["5"] = {Left = 0.28318786621094, Top = 0, Right = 0.33982849121094, Bottom = 0.75}
   l_2_0.DigitUv["6"] = {Left = 0.33982849121094, Top = 0, Right = 0.39646911621094, Bottom = 0.75}
   l_2_0.DigitUv["7"] = {Left = 0.39646911621094, Top = 0, Right = 0.45310974121094, Bottom = 0.75}
   l_2_0.DigitUv["8"] = {Left = 0.45310974121094, Top = 0, Right = 0.50975036621094, Bottom = 0.75}
   l_2_0.DigitUv["9"] = {Left = 0.50975036621094, Top = 0, Right = 0.56639099121094, Bottom = 0.75}
   l_2_0.HourDigit2Left = {ShowDigit1 = l_2_0.SprHourDigit2.Position.x, HideDigit1 = (l_2_0.SprHourDigit1.Position.x + l_2_0.SprHourDigit2.Position.x) / 2}
end

GraphicClock.Update = function(l_3_0)
   local l_3_1 = string.format("%02d%02d", l_3_0.Time.Hour, l_3_0.Time.Minute)
   local l_3_2 = string.sub(l_3_1, 1, 1)
   local l_3_3 = string.sub(l_3_1, 2, 2)
   local l_3_4 = string.sub(l_3_1, 3, 3)
   local l_3_5 = string.sub(l_3_1, 4, 4)
   l_3_0.SprTimeMark._visible = not l_3_0.Time.IsTwentyFourHour
   if l_3_0.Time:GetActualHour() < 18 and l_3_0.Time:GetActualHour() > 5 then
      l_3_0.SprHourBg:SetTexture(l_3_0.AmImgBg)
      l_3_0.SprHourDigit1:SetTexture(l_3_0.AmImgDigit)
      l_3_0.SprHourDigit2:SetTexture(l_3_0.AmImgDigit)
      l_3_0.SprMinuteBg:SetTexture(l_3_0.AmImgBg)
      l_3_0.SprMinuteDigit1:SetTexture(l_3_0.AmImgDigit)
      l_3_0.SprMinuteDigit2:SetTexture(l_3_0.AmImgDigit)
      l_3_0.SprTimeMark:SetTexture(l_3_0.AmImgTimeMark)
   else
      l_3_0.SprHourBg:SetTexture(l_3_0.PmImgBg)
      l_3_0.SprHourDigit1:SetTexture(l_3_0.PmImgDigit)
      l_3_0.SprHourDigit2:SetTexture(l_3_0.PmImgDigit)
      l_3_0.SprMinuteBg:SetTexture(l_3_0.PmImgBg)
      l_3_0.SprMinuteDigit1:SetTexture(l_3_0.PmImgDigit)
      l_3_0.SprMinuteDigit2:SetTexture(l_3_0.PmImgDigit)
      l_3_0.SprTimeMark:SetTexture(l_3_0.PmImgTimeMark)
   end
   if l_3_0.Time:GetActualAM() then
      l_3_0.SprTimeMark.TextureCoords:set(l_3_0.TimeMarkUv.AM.Left, l_3_0.TimeMarkUv.AM.Top, l_3_0.TimeMarkUv.AM.Right, l_3_0.TimeMarkUv.AM.Bottom)
   else
      l_3_0.SprTimeMark.TextureCoords:set(l_3_0.TimeMarkUv.PM.Left, l_3_0.TimeMarkUv.PM.Top, l_3_0.TimeMarkUv.PM.Right, l_3_0.TimeMarkUv.PM.Bottom)
   end
   if l_3_2 == "0" then
      l_3_0.SprHourDigit1._visible = false
      l_3_0.SprHourDigit2.TextureCoords:set(l_3_0.DigitUv[l_3_3].Left, l_3_0.DigitUv[l_3_3].Top, l_3_0.DigitUv[l_3_3].Right, l_3_0.DigitUv[l_3_3].Bottom)
      l_3_0.SprHourDigit2.Position.x = l_3_0.HourDigit2Left.HideDigit1
   else
      l_3_0.SprHourDigit1.TextureCoords:set(l_3_0.DigitUv[l_3_2].Left, l_3_0.DigitUv[l_3_2].Top, l_3_0.DigitUv[l_3_2].Right, l_3_0.DigitUv[l_3_2].Bottom)
      l_3_0.SprHourDigit1._visible = true
      l_3_0.SprHourDigit2.TextureCoords:set(l_3_0.DigitUv[l_3_3].Left, l_3_0.DigitUv[l_3_3].Top, l_3_0.DigitUv[l_3_3].Right, l_3_0.DigitUv[l_3_3].Bottom)
      l_3_0.SprHourDigit2.Position.x = l_3_0.HourDigit2Left.ShowDigit1
   end
   l_3_0.SprMinuteDigit1.TextureCoords:set(l_3_0.DigitUv[l_3_4].Left, l_3_0.DigitUv[l_3_4].Top, l_3_0.DigitUv[l_3_4].Right, l_3_0.DigitUv[l_3_4].Bottom)
   l_3_0.SprMinuteDigit2.TextureCoords:set(l_3_0.DigitUv[l_3_5].Left, l_3_0.DigitUv[l_3_5].Top, l_3_0.DigitUv[l_3_5].Right, l_3_0.DigitUv[l_3_5].Bottom)
end


⌨️ 快捷键说明

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