48 lines
1.3 KiB
C++
48 lines
1.3 KiB
C++
#pragma once
|
|
|
|
#include "Support/EnvironmentFlags.h"
|
|
|
|
#include <XCEngine/UI/DrawData.h>
|
|
|
|
#include <cstdint>
|
|
|
|
namespace XCEngine::UI::Editor::App {
|
|
|
|
struct EditorWindowScreenPoint {
|
|
std::int32_t x = 0;
|
|
std::int32_t y = 0;
|
|
};
|
|
|
|
struct EditorWindowScreenRect {
|
|
std::int32_t left = 0;
|
|
std::int32_t top = 0;
|
|
std::int32_t right = 0;
|
|
std::int32_t bottom = 0;
|
|
|
|
[[nodiscard]] std::int32_t Width() const {
|
|
return right - left;
|
|
}
|
|
|
|
[[nodiscard]] std::int32_t Height() const {
|
|
return bottom - top;
|
|
}
|
|
|
|
[[nodiscard]] bool Contains(const EditorWindowScreenPoint& point) const {
|
|
return point.x >= left && point.x < right &&
|
|
point.y >= top && point.y < bottom;
|
|
}
|
|
};
|
|
|
|
inline constexpr float kBorderlessTitleBarHeightDips = 28.0f;
|
|
|
|
inline const ::XCEngine::UI::UIColor kShellSurfaceColor(0.10f, 0.10f, 0.10f, 1.0f);
|
|
inline const ::XCEngine::UI::UIColor kShellBorderColor(0.15f, 0.15f, 0.15f, 1.0f);
|
|
inline const ::XCEngine::UI::UIColor kShellTextColor(0.92f, 0.92f, 0.92f, 1.0f);
|
|
inline const ::XCEngine::UI::UIColor kShellMutedTextColor(0.70f, 0.70f, 0.70f, 1.0f);
|
|
|
|
inline bool IsEditorWindowVerboseRuntimeTraceEnabled() {
|
|
return IsEnvironmentFlagEnabled("XCUIEDITOR_VERBOSE_TRACE");
|
|
}
|
|
|
|
} // namespace XCEngine::UI::Editor::App
|