Elaztek Developer Hub
Blamite Game Engine - blam!  00453.06.08.26.0624.blamite
The core library for the Blamite Game Engine.
write_debug_info.hpp
Go to the documentation of this file.
1 #include "../console.h"
2 
6 
8 {
13  {
14  public:
16  {
17  name = "write_debug_info";
18  description = "";
19 
21  }
22 
23  BlamResult Execute(std::vector<std::string> arguments)
24  {
25  std::string text = Blam::UI::GetInfoDisplayWidget()->GetCurrentText();
26 
27  Blam::Logger::LogEvent(text, WSV_NONE, BlamLogVisibility::FileOnly);
28  Blam::Logger::LogEvent("wrote current debug info text to debug.txt");
29 
30  return BlamResult::Success_OK;
31  }
32  };
33 }
ui.h
Blam::Resources::Console::WriteDebugInfoCommand::WriteDebugInfoCommand
WriteDebugInfoCommand()
Definition: write_debug_info.hpp:15
Blam::Logger::LogEvent
BLAM void LogEvent(std::string message)
Logs a message to the log and/or console.
Definition: aliases.cpp:130
BlamConsoleCommand::description
std::string description
An optional description of the command. Shown when using the classify command.
Definition: console.h:36
logger.h
BlamConsoleCommand
Class used to represent a console command.
Definition: console.h:33
BlamUIWidget_InfoDisplay::GetCurrentText
std::string GetCurrentText()
Definition: BlamUIWidget_InfoDisplay.cpp:218
Blam::Resources::Console::WriteDebugInfoCommand
Class for the write_debug_info command.
Definition: write_debug_info.hpp:12
Blam::Resources::Console::WriteDebugInfoCommand::Execute
BlamResult Execute(std::vector< std::string > arguments)
Called upon command execution.
Definition: write_debug_info.hpp:23
BlamConsoleCommand::name
std::string name
The name of the console command.
Definition: console.h:35
Blam::UI::GetInfoDisplayWidget
BLAM BlamUIWidget_InfoDisplay * GetInfoDisplayWidget()
Retrieves the built-in info display widget.
Definition: ui.cpp:354
BlamConsoleCommand::type
BlamCommandType type
The type of command this is. See #Blam::Resources::Console::BlamCommandType for more information.
Definition: console.h:40
Blam::Resources::Console
Namespace for things relating to the debug console.
Definition: abort.hpp:5
BlamUIWidget_InfoDisplay.h
BlamCommandType::Builtin
@ Builtin
A command that is hard-coded into the engine.