39extern std::vector<std::string>
s_Logs;
41#if __cplusplus >= 202002L && defined(__cpp_lib_format)
47#define FUNC_FORMAT_AVAILABLE 1
53#define FUNC_FORMAT_AVAILABLE 0
56#if __cplusplus < 202002L
58 "std::format is not supported by your compiler configuration. Please consider using -std=c++20 or later."
60#define FUNC_FMT(...) std::format(__VA_ARGS__)
75 std::println("ASSERTION FAILED(DEBUG) at line {} in file {}", \
76 __LINE__, __FILE__); \
84 std::println("VERIFICATION FAILED at line {} in file {}", \
85 __LINE__, __FILE__); \
99#define FUNC_AOV_EX(x, str) \
102 std::println("VERIFICATION FAILED: "); \
108#define FUNC_AOV_EX(x, str) \
111 FUNC_FATAL("VERIFICATION FAILED, description:"); \
125#define FUNC_DASS(x) \
128 std::println("STRIPPED ASSERTION FAILED at line {} in file {}", \
129 __LINE__, __FILE__); \
140#define PUSH_LOG(prefix, ...) \
142 s_Logs.emplace_back(std::string(prefix) + FUNC_FMT(__VA_ARGS__)); \
150#define FUNC_DBG(...) \
152 std::println("\033[36m[Debug]: {}\033[0m", FUNC_FMT(__VA_ARGS__)); \
153 PUSH_LOG("[Debug]: ", __VA_ARGS__); \
163#define FUNC_INF(...) \
165 std::println("\033[34m[Info]: {}\033[0m", FUNC_FMT(__VA_ARGS__)); \
166 PUSH_LOG("[Info]: ", __VA_ARGS__); \
173#define FUNC_WARN(...) \
175 std::println("\033[33m[Warn]: {}\033[0m", FUNC_FMT(__VA_ARGS__)); \
176 PUSH_LOG("[Warn]: ", __VA_ARGS__); \
183#define FUNC_GRAY(...) \
185 std::println("\033[90m[Note]: {}\033[0m", FUNC_FMT(__VA_ARGS__)); \
186 PUSH_LOG("[Note]: ", __VA_ARGS__); \
193#define FUNC_ERR(...) \
195 std::println("\033[1;35m[Error]: {}\033[0m", FUNC_FMT(__VA_ARGS__)); \
196 PUSH_LOG("[Error]: ", __VA_ARGS__); \
203#define FUNC_FATAL(...) \
205 std::println("\033[1;31m[FATAL]: {}\033[0m", FUNC_FMT(__VA_ARGS__)); \
206 PUSH_LOG("[FATAL]: ", __VA_ARGS__); \
215 return IM_COL32(255 - r, 255 - g, 255 - b, 255);
219#ifndef WIN32_LEAN_AND_MEAN
220#define WIN32_LEAN_AND_MEAN
228#define strncasecmp _strnicmp
229#define strcasecmp _stricmp
239 nullptr,
"open", path.string().c_str(),
nullptr,
nullptr, SW_SHOW);
240#elif defined(__APPLE__)
241 std::system((
"open " + path.string() +
" &").c_str());
242#elif defined(__linux__)
243 std::system((
"xdg-open " + path.string() +
" &").c_str());
ImGui/OpenGL/GLFW integration utilities and file dialog wrapper.
std::vector< std::string > s_Logs
Definition MacroUtils.cc:4
ImGuiCol InvertedImCol(uint8_t r, uint8_t g, uint8_t b)
Definition MacroUtils.h:214
#define FUNC_ERR(...)
A non-fatal, recoverable from error.
Definition MacroUtils.h:193
void OpenFileExplorer(const std::filesystem::path &path)
Definition MacroUtils.h:236