From 58dfdba241b501d4b1b9688b44ee775507ec325b Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Mon, 21 Oct 2024 10:39:31 +0200 Subject: add Config + wip rework color --- src/crepe/api/CMakeLists.txt | 1 + src/crepe/api/Config.h | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 src/crepe/api/Config.h (limited to 'src/crepe/api') diff --git a/src/crepe/api/CMakeLists.txt b/src/crepe/api/CMakeLists.txt index 86623de..68c4b72 100644 --- a/src/crepe/api/CMakeLists.txt +++ b/src/crepe/api/CMakeLists.txt @@ -6,5 +6,6 @@ target_sources(crepe PUBLIC target_sources(crepe PUBLIC FILE_SET HEADERS FILES # AudioSource.h BehaviorScript.h + Config.h ) diff --git a/src/crepe/api/Config.h b/src/crepe/api/Config.h new file mode 100644 index 0000000..d6ee8e8 --- /dev/null +++ b/src/crepe/api/Config.h @@ -0,0 +1,27 @@ +#pragma once + +#include "../util/log.h" + +namespace crepe::api { + +class Config { +private: + Config() = default; +public: + ~Config() = default; + +public: + static Config & get_instance() { + static Config instance; + return instance; + } + +public: + struct { + util::log_level level = util::log_level::INFO; + bool color = true; + } log; +}; + +} + -- cgit v1.2.3