Elaztek Developer Hub
Blamite Game Engine - blam!  00406.12.10.23.1457.blamite
The core library for the Blamite Game Engine.
quit.hpp
Go to the documentation of this file.
1 #include "../console.h"
2 
4 #include "core.h"
5 
7 {
14  {
15  public:
17  {
18  name = "quit";
19  description = "Quits the game.";
20  aliases = { "exit", "qqq" };
21 
23  }
24 
25  BlamResult Execute(std::vector<std::string> arguments)
26  {
27  SendMessage(Blam::GetWin32MainWindowHandle(), WM_QUIT, NULL, NULL);
28 
29  return BlamResult::Success_OK;
30  }
31  };
32 }
BlamCommandType::Builtin
@ Builtin
A command that is hard-coded into the engine.
BlamConsoleCommand::description
std::string description
An optional description of the command. Shown when using the classify command.
Definition: console.h:34
Blam::Resources::Console::QuitCommand::QuitCommand
QuitCommand()
Definition: quit.hpp:16
logger.h
Blam::GetWin32MainWindowHandle
BLAM HWND GetWin32MainWindowHandle()
Retrieves the main window handle of the application.
Definition: main.cpp:542
BlamConsoleCommand
Class used to represent a console command.
Definition: console.h:31
NULL
Add a fourth parameter to bake specific font ranges NULL
Definition: README.txt:57
Blam::Resources::Console::QuitCommand
Class for the quit command.
Definition: quit.hpp:13
BlamConsoleCommand::name
std::string name
The name of the console command.
Definition: console.h:33
BlamConsoleCommand::type
BlamCommandType type
The type of command this is. See #Blam::Resources::Console::BlamCommandType for more information.
Definition: console.h:38
Blam::Resources::Console::QuitCommand::Execute
BlamResult Execute(std::vector< std::string > arguments)
Called upon command execution.
Definition: quit.hpp:25
BlamConsoleCommand::aliases
std::vector< std::string > aliases
A list of aliases for the command. Executing any of these instead of the command name will behave the...
Definition: console.h:36
Blam::Resources::Console
Namespace for things relating to the debug console.
Definition: abort.hpp:5