-------------------------------------------------
-- Main Menu
-------------------------------------------------
include( "MPGameDefaults" );
-------------------------------------------------
-- Script Body
-------------------------------------------------
local bHideUITest = true;
local bHideGridExamples = true;
local bHideLoadGame = true;
local bHidePreGame = true;
local fTime = 0;
-- MAC_PORT local i1, i2 = string.find( UI.GetVersionInfo(), " " );
-- MAC_PORT versionNumber = string.sub(UI.GetVersionInfo(), 1, i2-1);
versionNumber = UI.GetVersionInfo(); -- MAC_PORT
Controls.VersionNumber:SetText(versionNumber);
function ShowHideHandler( bIsHide, bIsInit )
if( not bIsHide ) then
Controls.Civ5Logo:SetTexture( "CivilzationV_Logo.dds" );
-- This is a catch all to ensure that mods are not activated at this point in the UI.
-- Also, since certain maps and settings will only be available in either the modding or multiplayer
-- screen, we want to ensure that "safe" settings are loaded that can be used for either SP, MP or Mods.
-- Activating the DLC (there doesn't have to be any) will make sure no mods are active and all the user's
-- purchased content is available
if (not ContextPtr:IsHotLoad()) then
UIManager:SetUICursor( 1 );
Modding.ActivateDLC();
PreGame.LoadPreGameSettings();
UIManager:SetUICursor( 0 );
-- Send out an event to continue on, as the ActivateDLC may have swapped out the UI
Events.SystemUpdateUI( SystemUpdateUIType.RestoreUI, "MainMenu" );
end
else
Controls.Civ5Logo:UnloadTexture();
end
[b]-- Controls.ModsButton:SetHide( true ); -- MAC_PORT - rickb Comment this line out to re-enable mods. Happy modding![/b]
end
ContextPtr:SetShowHideHandler( ShowHideHandler );
-------------------------------------------------
-- Event Handler: ConnectedToNetworkHost
-------------------------------------------------
-------------------------------------------------
-- StartGame Button Handler
-------------------------------------------------
function SinglePlayerClick()
UIManager:QueuePopup( Controls.SinglePlayerScreen, PopupPriority.SinglePlayerScreen );
end
Controls.SinglePlayerButton:RegisterCallback( Mouse.eLClick, SinglePlayerClick );
….