types.hpp is UI-free: theme moves to util/imgui/theme.hpp, ImGui conversions and dummy values to layout.hpp
The model and edit layers no longer include ImGui or localization headers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ab276f6f08
commit
901c11691b
14 files changed
+68
-47
No files matched your search
@@ -1,34 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include <glm/gtc/type_ptr.hpp>
|
||||
#include <imgui/imgui.h>
|
||||
|
||||
#include "strings.hpp"
|
||||
|
||||
namespace anm2ed::types::theme
|
||||
{
|
||||
#define THEMES \
|
||||
X(LIGHT, LABEL_THEME_LIGHT) \
|
||||
X(DARK, LABEL_THEME_DARK) \
|
||||
X(CLASSIC, LABEL_THEME_CLASSIC)
|
||||
|
||||
enum Type
|
||||
{
|
||||
#define X(symbol, string) symbol,
|
||||
THEMES
|
||||
#undef X
|
||||
COUNT
|
||||
};
|
||||
|
||||
constexpr StringType STRINGS[] = {
|
||||
#define X(symbol, string) string,
|
||||
THEMES
|
||||
#undef X
|
||||
};
|
||||
|
||||
#undef THEMES
|
||||
}
|
||||
|
||||
namespace anm2ed::types::shortcut
|
||||
{
|
||||
@@ -112,22 +84,4 @@ namespace anm2ed::types
|
||||
};
|
||||
|
||||
constexpr auto ID_NONE = -1;
|
||||
|
||||
constexpr ImVec2 to_imvec2(const glm::vec2& v) noexcept { return {v.x, v.y}; }
|
||||
constexpr glm::vec2 to_vec2(const ImVec2& v) noexcept { return {v.x, v.y}; }
|
||||
constexpr glm::ivec2 to_ivec2(const ImVec2& v) noexcept { return {v.x, v.y}; }
|
||||
constexpr ImVec4 to_imvec4(const glm::vec4& v) noexcept { return {v.x, v.y, v.z, v.w}; }
|
||||
constexpr glm::vec4 to_vec4(const ImVec4& v) noexcept { return {v.x, v.y, v.z, v.w}; }
|
||||
|
||||
template <typename T> constexpr T& dummy_value()
|
||||
{
|
||||
static T value{};
|
||||
return value;
|
||||
}
|
||||
|
||||
template <typename T> constexpr T& dummy_value_negative()
|
||||
{
|
||||
static T value{-1};
|
||||
return value;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user