diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-07-17 22:33:00 +0100 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-07-17 22:33:00 +0100 |
commit | ca5db71e8215a6c5660fe03088a6d7349f55f817 (patch) | |
tree | 534b79d2599475b1da3edb4f232223d9e32d3174 /NorthstarDedicatedTest/sourceconsole.h | |
parent | 51d3d4a40c8579e29571bc80d35bbb62fa50661b (diff) | |
download | NorthstarLauncher-ca5db71e8215a6c5660fe03088a6d7349f55f817.tar.gz NorthstarLauncher-ca5db71e8215a6c5660fe03088a6d7349f55f817.zip |
add support for custom convars and concommands
Diffstat (limited to 'NorthstarDedicatedTest/sourceconsole.h')
-rw-r--r-- | NorthstarDedicatedTest/sourceconsole.h | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/NorthstarDedicatedTest/sourceconsole.h b/NorthstarDedicatedTest/sourceconsole.h index 7815cd03..79ab2267 100644 --- a/NorthstarDedicatedTest/sourceconsole.h +++ b/NorthstarDedicatedTest/sourceconsole.h @@ -1,8 +1,8 @@ #pragma once #include "pch.h" #include "sourceinterface.h" - -void InitialiseSourceConsole(HMODULE baseAddress); +#include "spdlog/sinks/base_sink.h" +#include <map> class EditablePanel { @@ -87,4 +87,21 @@ public: CConsoleDialog* m_pConsole; }; -extern SourceInterface<CGameConsole>* g_pSourceGameConsole;
\ No newline at end of file +extern SourceInterface<CGameConsole>* g_SourceGameConsole; + +// spdlog logger +class SourceConsoleSink : public spdlog::sinks::base_sink<std::mutex> +{ +private: + std::map<spdlog::level::level_enum, SourceColor> logColours; + +public: + SourceConsoleSink(); + +protected: + void sink_it_(const spdlog::details::log_msg& msg) override; + void flush_() override; +}; + +void InitialiseSourceConsole(HMODULE baseAddress); +void InitialiseConsoleOnInterfaceCreation();
\ No newline at end of file |