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

📄 dynamic.luac.lua

📁 htc manila 2 sourcecode
💻 LUA
字号:
-- Decompiled using luadec 0.7 by sztupy (http://winmo.sztupy.hu)
-- Command line was: -l ;0,4;0,2,5;;0,0,0,0,0,0,1;;;;; 616b03bf_manila.luac 

if DYNAMIC_LUA_LOADED == nil then
   trace("Loading Dynamic Script\n")
   DYNAMIC_LUA_LOADED = true
   Dynamic_LoadFontInfoTable = function(l_1_0)
      trace("Start Loading Fonts\n")
      for i_1,i_2 in ipairs(l_1_0) do
         for i_3,i_4 in ipairs(i_2.nodes) do
            trace("---------------------\n")
            trace("LoadFontInfoTable: " .. i_1 .. "," .. i_3 .. ":" .. i_4.InstanceName .. "\n")
            if i_2.fontPath ~= nil then
               trace("Font Path: " .. orangeFontPath .. i_2.fontPath.file .. "\n")
               i_4.FontPath = orangeFontPath .. i_2.fontPath.file
               trace("Font Name: " .. i_2.fontPath.name .. "\n")
               i_4.FontName = i_2.fontPath.name
            end
            if i_2.fontSize ~= nil then
               trace("Font Size: " .. i_2.fontSize .. "\n")
               i_4.FontSize = i_2.fontSize
            end
            if i_2.fontColor ~= nil then
               i_4.Color = i_2.fontColor
            end
         end
      end
      trace("Done Loading Fonts\n")
   end
   Dynamic_LoadImage = function(l_2_0)
      local l_2_1 = Image()
      local l_2_2 = l_2_1:LoadFile(l_2_0)
      if l_2_2 == false then
         trace("Failed to load image: " .. l_2_0 .. "\n")
         return nil
      end
      return l_2_1
   end
   Dynamic_SetImageAttributes = function(l_3_0, l_3_1, l_3_2)
      if l_3_0 == nil then
         trace("node is null!\n")
      end
      if l_3_1 ~= nil then
         trace("Setting " .. l_3_0.InstanceName .. " Texture coords to " .. l_3_1.X .. "," .. l_3_1.Y .. "," .. l_3_1.W .. "," .. l_3_1.H .. "\n")
         l_3_0.TextureCoords:set(l_3_1.X, l_3_1.Y, l_3_1.W, l_3_1.H)
      end
      if l_3_2 ~= nil then
         trace("Setting " .. l_3_0.InstanceName .. " Size to " .. l_3_2.width .. "," .. l_3_2.height .. "\n")
         l_3_0.Size.width = l_3_2.width
         l_3_0.Size.height = l_3_2.height
      end
   end
   Dynamic_LoadImageOnNode = function(l_4_0, l_4_1, l_4_2, l_4_3, l_4_4)
      local l_4_5 = nil
      local l_4_6 = l_4_2
      if l_4_1 ~= nil then
         l_4_5 = Dynamic_LoadImage(l_4_1)
         if l_4_5 ~= nil then
            l_4_0:SetTexture(l_4_5)
         end
         if l_4_3 ~= nil then
            if l_4_6 ~= nil then
               trace("Dynamic_LoadImage: Warning!  uv and textureCoords set (uv will be ignored)\n")
            end
            l_4_6 = Dynamic_GetUV(l_4_3, l_4_5)
            if l_4_6 == nil then
               l_4_6 = Dynamic_GetUV(l_4_3)
            end
         end
      end
      Dynamic_SetImageAttributes(l_4_0, l_4_6, l_4_4)
      return l_4_5
   end
   Dynamic_GetUV = function(l_5_0, l_5_1)
      if l_5_1 == nil then
         l_5_1 = Dynamic_CreateImageSize(l_5_0)
      end
      if l_5_1.Width == 0 or l_5_1.Height == 0 then
         trace("Warning! Image width or height is 0 in Dynamic_GetUV\n")
         return nil
      end
      trace("Create uv: " .. l_5_0.left .. "," .. l_5_0.top .. "," .. l_5_0.right .. "," .. l_5_0.bottom .. "," .. l_5_1.Width .. "," .. l_5_1.Height .. "\n")
      return {X = l_5_0.left / l_5_1.Width, Y = l_5_0.top / l_5_1.Height, W = l_5_0.right / l_5_1.Width, H = l_5_0.bottom / l_5_1.Height}
   end
   Dynamic_GetNextPowerTwo = function(l_6_0)
      local l_6_1 = 2
      while l_6_1 < l_6_0 and l_6_1 <= 512 do
         l_6_1 = l_6_1 * 2
      end
      return l_6_1
   end

   Dynamic_CreateImageSize = function(l_7_0)
      imageSize = {}
      imageSize.Width = Dynamic_GetNextPowerTwo(l_7_0.right)
      imageSize.Height = Dynamic_GetNextPowerTwo(l_7_0.bottom)
      return imageSize
   end
   Dynamic_SetupFocusFunctions = function(l_8_0, l_8_1, l_8_2, l_8_3, l_8_4)
      if l_8_4 == true then
         if l_8_1 ~= nil then
            l_8_0.onPress:connect(l_8_1)
         end
         if l_8_2 ~= nil then
            l_8_0.onRelease:connect(l_8_2)
         end
         if l_8_3 ~= nil then
            l_8_0.onReleaseOutside:connect(l_8_3)
         end
      else
         if l_8_1 ~= nil then
            l_8_0.onPress:disconnect(l_8_1)
         end
         if l_8_2 ~= nil then
            l_8_0.onRelease:disconnect(l_8_2)
         end
         if l_8_3 ~= nil then
            l_8_0.onReleaseOutside:disconnect(l_8_3)
         end
      end
   end
end

⌨️ 快捷键说明

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