LoadResource("fonts.xml")

-- Shared resources
LoadResource("GUI_Resource.xml")
LoadResource("Sound.xml")
LoadResource("Music.xml")

Sound:SetSoundVolume(0)
Sound:SetMusicVolume(0)

LoadResource("GameResource.xml")
LoadResource("ChipsAnim.xml")

LoadParticles("effects.xml")
LoadEffects("effects.xml")

LoadParticles("fakel_eff.xml")
LoadEffects("fakel_eff.xml")

LoadParticles("StringEffects.xml")
LoadEffects("StringEffects.xml")

LoadParticles("ShieldEffects.xml")
LoadEffects("ShieldEffects.xml")

LoadParticles("MenuParticles.xml")
LoadEffects("MenuParticles.xml")

LoadParticles("MapEffects.xml")
LoadEffects("MapEffects.xml")

GUI:LoadText("text.xml")

LoadResource("Map_Resource.xml")
LoadResource("Menu_Resource.xml")

-- GUI Layers
GUI:LoadLayers("Map_GUI.xml")
GUI:LoadLayers("Menu_GUI.xml")
GUI:LoadLayers("Stat_GUI.xml")
GUI:LoadLayers("MenuInGame_GUI.xml")
GUI:LoadLayers("GameField_GUI.xml")
GUI:LoadLayers("Help_GUI.xml")
--GUI:LoadLayers("TestLayer.xml")
GUI:LoadLayers("Shield_GUI.xml")
GUI:LoadLayers("History_GUI.xml")

-- Animation
--LoadResource("FieldResource.xml")
LoadParticles("MultEffects.xml")
LoadEffects("MultEffects.xml")
LoadAnimation()
GUI:LoadLayers("MultTest.xml")

-- Profiles
local namesWidget = GUI:getLayer("Profiles"):getWidget("Names")
local numOfPlayers = gameInfo:getNumberOfPlayers()-1
for i = 0, numOfPlayers do
	local playerName = gameInfo:getPlayerName(i)
	namesWidget:AcceptMessage(Message("Add", playerName))
end

--namesWidget:AcceptMessage(Message("Select", gameInfo:getName()))
--GUI:getLayer("Menu"):getWidget("ProfileButton"):AcceptMessage(Message("SetProfile", gameInfo:getName()))

local animationWidget = GUI:getLayer("Mult"):getWidget("Mult")
UploadResource("ANIMATION_PANEL")
UploadResource("ANIMATION_FADE")
SetArtefactScene(6)
animationWidget:AcceptMessage(Message("Play", "Greece"))
animationWidget:AcceptMessage(Message("UploadResources"))
animationWidget:setColor(Color(255, 255, 255, 255))
animationWidget:AcceptMessage(Message("Active", 0))
animationWidget:AcceptMessage(Message("BlackScreen", 0))
animationWidget:AcceptMessage(Message("Reset"))


Screen:pushLayer( GUI:getLayer("Gallery") )
--Screen:pushLayer( GUI:getLayer("Mult") )

--UploadResourceGroup("Menu")
--Screen:pushLayer( GUI:getLayer("Menu") )
--Sound:FadeInTrack("Menu", 2.0, true)

