weathericon.luac.lua

来自「htc manila 2 sourcecode」· LUA 代码 · 共 100 行

LUA
100
字号
-- Decompiled using luadec 0.4 by sztupy (http://winmo.sztupy.hu)
-- Command line was: -l ;0;0;;0,0,2,3,6,12,14;0,0,2,6;0;0,0,8,12,19; 74990013_manila.luac 

InitializeWeatherIcon = function(l_1_0, l_1_1)
   StopComponents(l_1_0)
   if l_1_1 then
      l_1_0.Tag = {showWipers = false}
   end
end

StopComponents = function(l_2_0)
   if l_2_0 == nil then
      return 
   end
   StopAll(l_2_0)
   return 
end

StartComponents = function(l_3_0)
   PlayAll(l_3_0)
end

SetWeatherIconState = function(l_4_0, l_4_1)
   local l_4_2 = l_4_0:GetComponentClip()
   local l_4_3 = l_4_2.Namespace
   local l_4_4 = l_4_3:FindName("ActiveInstance")
   if l_4_4.String == "0" then
      local l_4_5 = l_4_3:FindName("IconInstance1")
      local l_4_6 = l_4_5:GetComponentClip()        
      l_4_6.Namespace:FindName("CurrentState").String = tostring(l_4_1)
      local wss = l_4_6.Namespace:FindName("WeatherStateSingleton")
      wss:SetComponentClipCharacter("WeatherState" .. tostring(l_4_1))
      wss._visible = true
      StartComponents(l_4_6)
      l_4_4.String = "1"
      return 
   end
   local l_4_5 = nil
   local l_4_6 = nil
   if l_4_4.String == "1" then
      l_4_5 = l_4_3:FindName("IconInstance1")
      l_4_6 = l_4_3:FindName("IconInstance2")
   else
      l_4_5 = l_4_3:FindName("IconInstance2")
      l_4_6 = l_4_3:FindName("IconInstance1")
   end
   local l_4_7 = l_4_5:GetComponentClip()
   local l_4_8 = l_4_6:GetComponentClip()
  
   SetComponentFrame(l_4_5, 31)
   StartComponents(l_4_5)
   local rc = l_4_7.Namespace:FindName("RainComponent")
   StopComponents(rc)
   rc._visible = false
   local wss = l_4_8.Namespace:FindName("WeatherStateSingleton")
   wss:SetComponentClipCharacter("WeatherState" .. tostring(l_4_1))
   wss._visible = true
   l_4_8.Namespace:FindName("CurrentState").String = tostring(l_4_1)
   SetComponentFrame(l_4_6, 1)
   StartComponents(l_4_8)
   if l_4_4.String == "1" then
      l_4_4.String = "2"
   else
      l_4_4.String = "1"
   end
end

SetWeatherIconStateNoFade = function(l_5_0, l_5_1)
   local l_5_2 = l_5_0:GetComponentClip()
   local l_5_3 = l_5_2.Namespace:FindName("WeatherStateSingleton")
   l_5_2:stop()
   l_5_3:SetComponentClipCharacter("WeatherState" .. tostring(l_5_1))
   l_5_2.Frame = 1
   l_5_2:play()
   l_5_2.Namespace:FindName("CurrentState").String = tostring(l_5_1)
   l_5_2.Namespace:FindName("WiperEnabled").String = "false"
end

SetComponentFrame = function(l_6_0, l_6_1)
   l_6_0:SetFrameAll(l_6_1)
   return 
end

SetStaticWeatherIconState = function(l_7_0, l_7_1)
   local l_7_2 = l_7_0:GetComponentClip().Namespace:FindName("IconInstance1"):GetComponentClip()
   local l_7_3 = l_7_2.Namespace:FindName("WeatherStateSingleton")
   if l_7_3 ~= nil then
      l_7_3._visible = false
   end
   local l_7_4 = l_7_2.Namespace:FindName("WeatherStateSingleton")
   l_7_4:SetComponentClipCharacter("WeatherState" .. l_7_1)
   SetComponentFrame(l_7_0:GetComponentClip().Namespace:FindName("IconInstance1"), 31)
   l_7_4._visible = true
   l_7_0:play()
   l_7_2:play()
   l_7_2.Namespace:FindName("CurrentState").String = tostring(l_7_1)
end


⌨️ 快捷键说明

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