diff options
Diffstat (limited to 'src/crepe/api')
-rw-r--r-- | src/crepe/api/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/crepe/api/Config.h | 40 |
2 files changed, 41 insertions, 0 deletions
diff --git a/src/crepe/api/CMakeLists.txt b/src/crepe/api/CMakeLists.txt index e74bb41..f262019 100644 --- a/src/crepe/api/CMakeLists.txt +++ b/src/crepe/api/CMakeLists.txt @@ -16,6 +16,7 @@ target_sources(crepe PUBLIC target_sources(crepe PUBLIC FILE_SET HEADERS FILES # AudioSource.h BehaviorScript.h + Config.h Script.h GameObject.h GameObject.hpp diff --git a/src/crepe/api/Config.h b/src/crepe/api/Config.h new file mode 100644 index 0000000..24b5529 --- /dev/null +++ b/src/crepe/api/Config.h @@ -0,0 +1,40 @@ +#pragma once + +#include "../util/log.h" + +namespace crepe::api { + +class Config { +private: + Config() = default; +public: + ~Config() = default; + +public: + //! Retrieve handle to global Config instance + static Config & get_instance() { + static Config instance; + return instance; + } + +public: + //! Logging-related settings + struct { + /** + * \brief Log level + * + * Only messages with equal or higher priority than this value will be + * logged. + */ + util::LogLevel level = util::LogLevel::INFO; + /** + * \brief Colored log output + * + * Enables log coloring using ANSI escape codes. + */ + bool color = true; + } log; +}; + +} + |