added main menus, improved shading
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
|
||||
#include "fgui/fgui.h"
|
||||
#include "input.h"
|
||||
#include "mainmenu.h"
|
||||
#include "networking.h"
|
||||
#include "tier0/network.h"
|
||||
#include "tier0/platform.h"
|
||||
@@ -99,7 +100,7 @@ void IEngine::Init()
|
||||
}
|
||||
if (!SteamAPI_Init())
|
||||
{
|
||||
V_printf("failed to init steam\n");
|
||||
Plat_FatalErrorFunc("failed to init steam\n");
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -116,12 +117,13 @@ void IEngine::Init()
|
||||
// Init IO
|
||||
IVideo::Init();
|
||||
IInput::Init();
|
||||
IInput::SetMouseMode(MOUSE_MODE_GAME);
|
||||
IInput::SetInputMode(INPUT_MODE_MENU);
|
||||
IFGUI::Init();
|
||||
};
|
||||
|
||||
INetworking::Init();
|
||||
|
||||
|
||||
// load game
|
||||
IServer::LoadGame("funnygame");
|
||||
|
||||
@@ -132,6 +134,10 @@ void IEngine::Init()
|
||||
// execute default config
|
||||
IConsole::AddCommand("exec default.cfg;");
|
||||
IConsole::Execute();
|
||||
|
||||
MainMenu()->Init();
|
||||
|
||||
IConsoleUI::Init();
|
||||
|
||||
};
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -146,6 +152,7 @@ void IEngine::Frame(float fDelta)
|
||||
INetworking::Frame();
|
||||
if (!ICommandLine::CheckParam("-dedicated"))
|
||||
{
|
||||
MainMenu()->Frame();
|
||||
IFGUI::Frame();
|
||||
IVideo::Frame(fDelta);
|
||||
}
|
||||
@@ -156,6 +163,7 @@ void IEngine::Frame(float fDelta)
|
||||
//-----------------------------------------------------------------------------
|
||||
void IEngine::Shutdown()
|
||||
{
|
||||
MainMenu()->Deinit();
|
||||
INetworking::Deinit();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user