Advertisement
Guest User

Untitled

a guest
May 27th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.48 KB | None | 0 0
  1. local function LoadDialog(parent)
  2.     local movieFile = '/movies/loading_screens/uef/uef_load_u0001.sfd'
  3.     local color = 'FFbadbdb'
  4.     local loadingPref = Prefs.GetFromCurrentProfile('LoadingFaction')
  5.     local factions = import('/lua/factions.lua').Factions
  6.    
  7.     if loadingPref == 1 then thefaction = 'uef', randommovie = 'u000' .. Random(1,3) end
  8.     if loadingPref == 2 then thefaction = 'aeon', randommovie = 'a000' .. Random(1,3) end
  9.     if loadingPref == 3 then thefaction = 'cybran', randommovie = 'c000' .. Random(1,3) end
  10.     if loadingPref == 4 then thefaction = 'seraphim', randommovie = 's000' .. Random(1,3) end
  11.        
  12.     if factions[loadingPref] and factions[loadingPref].loadingMovie then
  13.         movieFile = '/movies/loading_screens/' .. thefaction .. '/' .. thefaction .. '_load_' .. randommovie .. '.sfd'
  14.         color = factions[loadingPref].loadingColor
  15.     end
  16.    
  17.     local movie = Movie(parent, movieFile)
  18.     LayoutHelpers.FillParent(movie, parent)
  19.     movie:Loop(true)
  20.     movie:Play()
  21.  
  22.     local text = '::  ' .. LOC('<LOC LOAD_' .. randommovie .. '>') .. '  ::'
  23.     local textControl = UIUtil.CreateText(movie, text, 20, UIUtil.bodyFont)
  24.     textControl:SetColor(color)
  25.     LayoutHelpers.AtCenterIn(textControl, parent, 200)
  26.     import('/lua/maui/effecthelpers.lua').Pulse(textControl, 1, 0, .8)
  27.  
  28.     ConExecute('UI_RenderUnitBars true')
  29.     ConExecute('UI_NisRenderIcons true')
  30.     ConExecute('ren_SelectBoxes true')
  31.     HideGameUI('off')
  32.  
  33.     return movie
  34. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement