654 lines
13 KiB
C++
654 lines
13 KiB
C++
#pragma once
|
|
|
|
#include <imgui.h>
|
|
|
|
namespace XCEngine {
|
|
namespace Editor {
|
|
namespace UI {
|
|
|
|
inline ImVec2 DockHostFramePadding() {
|
|
return ImVec2(4.0f, 2.0f);
|
|
}
|
|
|
|
inline ImVec2 DockHostItemInnerSpacing() {
|
|
return ImVec2(0.0f, 4.0f);
|
|
}
|
|
|
|
inline float DockHostWindowBorderSize() {
|
|
return 0.0f;
|
|
}
|
|
|
|
inline float DockHostTabBarBorderSize() {
|
|
return 0.0f;
|
|
}
|
|
|
|
inline float DockHostTabBarOverlineSize() {
|
|
return 0.0f;
|
|
}
|
|
|
|
inline ImVec4 DockTabColor() {
|
|
return ImVec4(0.17f, 0.17f, 0.17f, 1.00f);
|
|
}
|
|
|
|
inline ImVec4 DockTabHoveredColor() {
|
|
return ImVec4(0.21f, 0.21f, 0.21f, 1.00f);
|
|
}
|
|
|
|
inline ImVec4 DockTabSelectedColor() {
|
|
return ImVec4(0.24f, 0.24f, 0.24f, 1.00f);
|
|
}
|
|
|
|
inline ImVec4 DockTabSelectedOverlineColor() {
|
|
return ImVec4(0.62f, 0.62f, 0.62f, 0.70f);
|
|
}
|
|
|
|
inline ImVec4 DockTabDimmedColor() {
|
|
return ImVec4(0.16f, 0.16f, 0.16f, 1.00f);
|
|
}
|
|
|
|
inline ImVec4 DockTabDimmedSelectedColor() {
|
|
return ImVec4(0.20f, 0.20f, 0.20f, 1.00f);
|
|
}
|
|
|
|
inline ImVec4 DockTabDimmedSelectedOverlineColor() {
|
|
return ImVec4(0.44f, 0.44f, 0.44f, 0.55f);
|
|
}
|
|
|
|
inline ImVec2 PanelWindowPadding() {
|
|
return ImVec2(0.0f, 0.0f);
|
|
}
|
|
|
|
inline ImVec4 HierarchyInspectorPanelBackgroundColor() {
|
|
return ImVec4(0.235f, 0.235f, 0.235f, 1.0f);
|
|
}
|
|
|
|
inline ImVec2 ToolbarPadding() {
|
|
return ImVec2(8.0f, 6.0f);
|
|
}
|
|
|
|
inline ImVec2 ToolbarItemSpacing() {
|
|
return ImVec2(6.0f, 6.0f);
|
|
}
|
|
|
|
inline float StandardPanelToolbarHeight() {
|
|
return 34.0f;
|
|
}
|
|
|
|
inline float ProjectPanelToolbarHeight() {
|
|
return 34.0f;
|
|
}
|
|
|
|
inline float ToolbarSearchTrailingSpacing() {
|
|
return 4.0f;
|
|
}
|
|
|
|
inline float ToolbarRowGap() {
|
|
return 2.0f;
|
|
}
|
|
|
|
inline ImVec2 AssetGridSpacing() {
|
|
return ImVec2(8.0f, 10.0f);
|
|
}
|
|
|
|
inline ImVec2 DefaultPanelContentPadding() {
|
|
return ImVec2(8.0f, 6.0f);
|
|
}
|
|
|
|
inline ImVec2 HierarchyPanelContentPadding() {
|
|
return ImVec2(10.0f, 6.0f);
|
|
}
|
|
|
|
inline float InspectorSectionContentIndent() {
|
|
return 12.0f;
|
|
}
|
|
|
|
inline float InspectorPropertyLabelInset() {
|
|
return 12.0f;
|
|
}
|
|
|
|
inline float InspectorPropertyControlColumnStart() {
|
|
return 236.0f;
|
|
}
|
|
|
|
inline float InspectorPropertyLabelControlGap() {
|
|
return 20.0f;
|
|
}
|
|
|
|
inline ImVec2 ControlFramePadding() {
|
|
return ImVec2(3.0f, 0.0f);
|
|
}
|
|
|
|
inline float ControlRowHeightOffset() {
|
|
return 1.0f;
|
|
}
|
|
|
|
inline ImVec2 InspectorComponentControlSpacing() {
|
|
return ImVec2(6.0f, 3.0f);
|
|
}
|
|
|
|
inline float InspectorPropertyControlTrailingInset() {
|
|
return 8.0f;
|
|
}
|
|
|
|
inline float CompoundControlSpacing() {
|
|
return 4.0f;
|
|
}
|
|
|
|
inline float SliderValueFieldWidth() {
|
|
return 64.0f;
|
|
}
|
|
|
|
inline float LinearSliderTrackThickness() {
|
|
return 2.0f;
|
|
}
|
|
|
|
inline float LinearSliderGrabRadius() {
|
|
return 5.0f;
|
|
}
|
|
|
|
inline float LinearSliderHorizontalPadding() {
|
|
return 5.0f;
|
|
}
|
|
|
|
inline ImVec4 LinearSliderTrackColor() {
|
|
return ImVec4(0.30f, 0.30f, 0.30f, 1.0f);
|
|
}
|
|
|
|
inline ImVec4 LinearSliderFillColor() {
|
|
return ImVec4(0.66f, 0.66f, 0.66f, 1.0f);
|
|
}
|
|
|
|
inline ImVec4 LinearSliderGrabColor() {
|
|
return ImVec4(0.78f, 0.78f, 0.78f, 1.0f);
|
|
}
|
|
|
|
inline ImVec4 LinearSliderGrabHoveredColor() {
|
|
return ImVec4(0.88f, 0.88f, 0.88f, 1.0f);
|
|
}
|
|
|
|
inline ImVec4 LinearSliderGrabActiveColor() {
|
|
return ImVec4(0.95f, 0.95f, 0.95f, 1.0f);
|
|
}
|
|
|
|
inline ImVec2 InspectorPanelContentPadding() {
|
|
return ImVec2(10.0f, 0.0f);
|
|
}
|
|
|
|
inline ImVec2 AssetPanelContentPadding() {
|
|
return ImVec2(10.0f, 10.0f);
|
|
}
|
|
|
|
inline float ProjectBrowserHeaderHeight() {
|
|
return 28.0f;
|
|
}
|
|
|
|
inline float ProjectNavigationDefaultWidth() {
|
|
return 248.0f;
|
|
}
|
|
|
|
inline float ProjectNavigationMinWidth() {
|
|
return 180.0f;
|
|
}
|
|
|
|
inline float ProjectBrowserMinWidth() {
|
|
return 260.0f;
|
|
}
|
|
|
|
inline float PanelSplitterHitThickness() {
|
|
return 4.0f;
|
|
}
|
|
|
|
inline float PanelSplitterVisibleThickness() {
|
|
return 2.0f;
|
|
}
|
|
|
|
inline ImVec4 PanelSplitterIdleColor() {
|
|
return ImVec4(0.14f, 0.14f, 0.14f, 1.0f);
|
|
}
|
|
|
|
inline ImVec4 PanelSplitterHoveredColor() {
|
|
return PanelSplitterIdleColor();
|
|
}
|
|
|
|
inline ImVec4 PanelSplitterActiveColor() {
|
|
return PanelSplitterIdleColor();
|
|
}
|
|
|
|
inline ImVec2 ProjectNavigationPanePadding() {
|
|
return ImVec2(10.0f, 6.0f);
|
|
}
|
|
|
|
inline ImVec2 ProjectBrowserPanePadding() {
|
|
return ImVec2(10.0f, 8.0f);
|
|
}
|
|
|
|
inline ImVec2 NavigationTreeNodeFramePadding() {
|
|
return ImVec2(4.0f, 1.0f);
|
|
}
|
|
|
|
inline float CompactNavigationTreeItemSpacingY() {
|
|
return 0.0f;
|
|
}
|
|
|
|
inline float CompactNavigationTreeIndentSpacing() {
|
|
return 14.0f;
|
|
}
|
|
|
|
inline float NavigationTreeIconSize() {
|
|
return 18.0f;
|
|
}
|
|
|
|
inline float NavigationTreePrefixWidth() {
|
|
return 18.0f;
|
|
}
|
|
|
|
inline float NavigationTreePrefixStartOffset() {
|
|
return -5.0f;
|
|
}
|
|
|
|
inline float NavigationTreePrefixLabelGap() {
|
|
return 2.0f;
|
|
}
|
|
|
|
inline float DisclosureArrowScale() {
|
|
return 0.14f;
|
|
}
|
|
|
|
inline ImVec4 NavigationTreePrefixColor(bool selected = false, bool hovered = false) {
|
|
if (selected) {
|
|
return ImVec4(0.86f, 0.86f, 0.86f, 1.0f);
|
|
}
|
|
if (hovered) {
|
|
return ImVec4(0.76f, 0.76f, 0.76f, 1.0f);
|
|
}
|
|
return ImVec4(0.62f, 0.62f, 0.62f, 1.0f);
|
|
}
|
|
|
|
struct TreeViewStyle {
|
|
ImVec2 framePadding = NavigationTreeNodeFramePadding();
|
|
float itemSpacingY = -1.0f;
|
|
float indentSpacing = -1.0f;
|
|
float prefixStartOffset = NavigationTreePrefixStartOffset();
|
|
float prefixLabelGap = NavigationTreePrefixLabelGap();
|
|
};
|
|
|
|
inline TreeViewStyle NavigationTreeStyle() {
|
|
TreeViewStyle style;
|
|
style.itemSpacingY = CompactNavigationTreeItemSpacingY();
|
|
style.indentSpacing = CompactNavigationTreeIndentSpacing();
|
|
style.framePadding = NavigationTreeNodeFramePadding();
|
|
style.prefixStartOffset = NavigationTreePrefixStartOffset();
|
|
style.prefixLabelGap = NavigationTreePrefixLabelGap();
|
|
return style;
|
|
}
|
|
|
|
inline TreeViewStyle HierarchyTreeStyle() {
|
|
return NavigationTreeStyle();
|
|
}
|
|
|
|
inline TreeViewStyle ProjectFolderTreeStyle() {
|
|
return NavigationTreeStyle();
|
|
}
|
|
|
|
inline ImVec4 ProjectPanelBackgroundColor() {
|
|
return DockTabSelectedColor();
|
|
}
|
|
|
|
inline ImVec4 ProjectPanelToolbarBackgroundColor() {
|
|
return ProjectPanelBackgroundColor();
|
|
}
|
|
|
|
inline ImVec4 ProjectNavigationPaneBackgroundColor() {
|
|
return ProjectPanelBackgroundColor();
|
|
}
|
|
|
|
inline ImVec4 ProjectBrowserSurfaceColor() {
|
|
return ImVec4(0.20f, 0.20f, 0.20f, 1.0f);
|
|
}
|
|
|
|
inline ImVec4 ProjectBrowserHeaderBackgroundColor() {
|
|
return ProjectPanelBackgroundColor();
|
|
}
|
|
|
|
inline ImVec4 ProjectBrowserPaneBackgroundColor() {
|
|
return ProjectBrowserSurfaceColor();
|
|
}
|
|
|
|
inline ImVec4 ToolbarBackgroundColor() {
|
|
return ImVec4(0.19f, 0.19f, 0.19f, 1.0f);
|
|
}
|
|
|
|
inline ImVec2 SearchFieldFramePadding() {
|
|
return ImVec2(7.0f, 4.0f);
|
|
}
|
|
|
|
inline float SearchFieldFrameRounding() {
|
|
return 2.0f;
|
|
}
|
|
|
|
inline ImU32 PanelDividerColor() {
|
|
return ImGui::GetColorU32(PanelSplitterIdleColor());
|
|
}
|
|
|
|
inline float PanelDividerThickness() {
|
|
return 1.0f;
|
|
}
|
|
|
|
inline ImVec4 EmptyStateSubtitleColor() {
|
|
return ImVec4(0.55f, 0.55f, 0.55f, 1.0f);
|
|
}
|
|
|
|
inline ImVec4 HintTextColor() {
|
|
return ImVec4(0.53f, 0.53f, 0.53f, 1.0f);
|
|
}
|
|
|
|
inline ImVec2 BreadcrumbSegmentPadding() {
|
|
return ImVec2(4.0f, 1.0f);
|
|
}
|
|
|
|
inline float BreadcrumbSegmentSpacing() {
|
|
return 3.0f;
|
|
}
|
|
|
|
inline ImVec4 BreadcrumbSegmentTextColor(bool current = false, bool hovered = false) {
|
|
if (hovered) {
|
|
return ImVec4(0.90f, 0.90f, 0.90f, 1.0f);
|
|
}
|
|
if (current) {
|
|
return ImVec4(0.84f, 0.84f, 0.84f, 1.0f);
|
|
}
|
|
return ImVec4(0.72f, 0.72f, 0.72f, 1.0f);
|
|
}
|
|
|
|
inline ImVec4 BreadcrumbSeparatorColor() {
|
|
return HintTextColor();
|
|
}
|
|
|
|
inline float EmptyStateLineOffset() {
|
|
return 20.0f;
|
|
}
|
|
|
|
inline ImVec2 InspectorSectionFramePadding() {
|
|
return ImVec2(6.0f, 4.0f);
|
|
}
|
|
|
|
inline ImVec2 InspectorSectionItemSpacing() {
|
|
return ImVec2(6.0f, 0.0f);
|
|
}
|
|
|
|
inline ImVec2 InspectorActionButtonPadding() {
|
|
return ImVec2(8.0f, 5.0f);
|
|
}
|
|
|
|
inline ImVec2 PopupWindowPadding() {
|
|
return ImVec2(12.0f, 10.0f);
|
|
}
|
|
|
|
inline ImVec2 ComboPopupWindowPadding() {
|
|
return ImVec2(6.0f, 1.0f);
|
|
}
|
|
|
|
inline ImVec2 ComboPopupItemSpacing() {
|
|
return ImVec2(0.0f, 0.0f);
|
|
}
|
|
|
|
inline float ComboPopupRounding() {
|
|
return 1.0f;
|
|
}
|
|
|
|
inline float ComboPopupBorderSize() {
|
|
return 1.0f;
|
|
}
|
|
|
|
inline ImVec4 ComboPopupBackgroundColor() {
|
|
return ImVec4(1.0f, 1.0f, 1.0f, 1.0f);
|
|
}
|
|
|
|
inline ImVec4 ComboPopupTextColor() {
|
|
return ImVec4(0.14f, 0.14f, 0.14f, 1.0f);
|
|
}
|
|
|
|
inline ImVec4 ComboPopupTextDisabledColor() {
|
|
return ImVec4(0.55f, 0.55f, 0.55f, 1.0f);
|
|
}
|
|
|
|
inline ImVec4 ComboPopupItemColor() {
|
|
return ImVec4(0.0f, 0.0f, 0.0f, 0.0f);
|
|
}
|
|
|
|
inline ImVec4 ComboPopupItemHoveredColor() {
|
|
return ImVec4(0.0f, 0.0f, 0.0f, 0.045f);
|
|
}
|
|
|
|
inline ImVec4 ComboPopupItemActiveColor() {
|
|
return ImVec4(0.0f, 0.0f, 0.0f, 0.08f);
|
|
}
|
|
|
|
inline ImVec4 ComboPopupCheckMarkColor() {
|
|
return ImVec4(0.20f, 0.20f, 0.20f, 1.0f);
|
|
}
|
|
|
|
inline float PopupWindowRounding() {
|
|
return 5.0f;
|
|
}
|
|
|
|
inline float PopupWindowBorderSize() {
|
|
return 0.0f;
|
|
}
|
|
|
|
inline float PopupFrameRounding() {
|
|
return 4.0f;
|
|
}
|
|
|
|
inline float PopupFrameBorderSize() {
|
|
return 1.0f;
|
|
}
|
|
|
|
inline ImVec4 PopupBackgroundColor() {
|
|
return ImVec4(1.0f, 1.0f, 1.0f, 1.0f);
|
|
}
|
|
|
|
inline ImVec4 PopupBorderColor() {
|
|
return ImVec4(0.0f, 0.0f, 0.0f, 0.10f);
|
|
}
|
|
|
|
inline ImVec4 PopupTextColor() {
|
|
return ImVec4(0.14f, 0.14f, 0.14f, 1.0f);
|
|
}
|
|
|
|
inline ImVec4 PopupTextDisabledColor() {
|
|
return ImVec4(0.55f, 0.55f, 0.55f, 1.0f);
|
|
}
|
|
|
|
inline ImVec4 PopupItemColor() {
|
|
return ImVec4(0.0f, 0.0f, 0.0f, 0.0f);
|
|
}
|
|
|
|
inline ImVec4 PopupItemHoveredColor() {
|
|
return ImVec4(0.0f, 0.0f, 0.0f, 0.06f);
|
|
}
|
|
|
|
inline ImVec4 PopupItemActiveColor() {
|
|
return ImVec4(0.0f, 0.0f, 0.0f, 0.10f);
|
|
}
|
|
|
|
inline ImVec4 PopupFrameColor() {
|
|
return ImVec4(1.0f, 1.0f, 1.0f, 1.0f);
|
|
}
|
|
|
|
inline ImVec4 PopupFrameHoveredColor() {
|
|
return ImVec4(0.965f, 0.965f, 0.965f, 1.0f);
|
|
}
|
|
|
|
inline ImVec4 PopupFrameActiveColor() {
|
|
return ImVec4(0.94f, 0.94f, 0.94f, 1.0f);
|
|
}
|
|
|
|
inline ImVec4 PopupButtonColor() {
|
|
return ImVec4(0.95f, 0.95f, 0.95f, 1.0f);
|
|
}
|
|
|
|
inline ImVec4 PopupButtonHoveredColor() {
|
|
return ImVec4(0.90f, 0.90f, 0.90f, 1.0f);
|
|
}
|
|
|
|
inline ImVec4 PopupButtonActiveColor() {
|
|
return ImVec4(0.86f, 0.86f, 0.86f, 1.0f);
|
|
}
|
|
|
|
inline ImVec4 PopupCheckMarkColor() {
|
|
return ImVec4(0.20f, 0.20f, 0.20f, 1.0f);
|
|
}
|
|
|
|
inline ImVec2 AssetTileSize() {
|
|
return ImVec2(104.0f, 82.0f);
|
|
}
|
|
|
|
inline float HierarchyOverflowButtonWidth() {
|
|
return 26.0f;
|
|
}
|
|
|
|
inline ImVec2 ProjectBackButtonSize() {
|
|
return ImVec2(28.0f, 0.0f);
|
|
}
|
|
|
|
inline ImVec2 DialogActionButtonSize() {
|
|
return ImVec2(80.0f, 0.0f);
|
|
}
|
|
|
|
inline ImVec2 AssetDragPreviewSize() {
|
|
return ImVec2(24.0f, 20.0f);
|
|
}
|
|
|
|
inline float AssetTileRounding() {
|
|
return 2.0f;
|
|
}
|
|
|
|
inline ImVec4 AssetTileIdleFillColor() {
|
|
return ImVec4(1.0f, 1.0f, 1.0f, 0.02f);
|
|
}
|
|
|
|
inline ImVec4 AssetTileIdleBorderColor() {
|
|
return ImVec4(1.0f, 1.0f, 1.0f, 0.05f);
|
|
}
|
|
|
|
inline ImVec4 AssetTileHoverFillColor() {
|
|
return ImVec4(1.0f, 1.0f, 1.0f, 0.04f);
|
|
}
|
|
|
|
inline ImVec4 AssetTileSelectedFillColor() {
|
|
return ImVec4(0.61f, 0.61f, 0.61f, 0.12f);
|
|
}
|
|
|
|
inline ImVec4 AssetTileSelectedBorderColor() {
|
|
return ImVec4(0.74f, 0.74f, 0.74f, 0.43f);
|
|
}
|
|
|
|
inline ImVec4 AssetTileDraggedOverlayColor() {
|
|
return ImVec4(0.0f, 0.0f, 0.0f, 0.24f);
|
|
}
|
|
|
|
inline ImVec2 AssetTileIconOffset() {
|
|
return ImVec2(12.0f, 10.0f);
|
|
}
|
|
|
|
inline ImVec2 AssetTileIconSize() {
|
|
return ImVec2(32.0f, 24.0f);
|
|
}
|
|
|
|
inline ImVec2 FolderAssetTileIconSize() {
|
|
return ImVec2(72.0f, 72.0f);
|
|
}
|
|
|
|
inline ImVec2 FolderAssetTileIconOffset() {
|
|
return ImVec2(0.0f, 2.0f);
|
|
}
|
|
|
|
inline float AssetTileIconTextGap() {
|
|
return 4.0f;
|
|
}
|
|
|
|
inline ImVec2 AssetTileTextPadding() {
|
|
return ImVec2(6.0f, 10.0f);
|
|
}
|
|
|
|
inline ImVec4 AssetTileTextColor(bool selected = false) {
|
|
return selected ? ImVec4(0.93f, 0.93f, 0.93f, 1.0f) : ImVec4(0.76f, 0.76f, 0.76f, 1.0f);
|
|
}
|
|
|
|
inline ImVec4 BuiltInFolderIconTabColor() {
|
|
return ImVec4(0.77f, 0.77f, 0.77f, 1.0f);
|
|
}
|
|
|
|
inline ImVec4 BuiltInFolderIconTopColor() {
|
|
return ImVec4(0.82f, 0.82f, 0.82f, 1.0f);
|
|
}
|
|
|
|
inline ImVec4 BuiltInFolderIconBodyColor() {
|
|
return ImVec4(0.72f, 0.72f, 0.72f, 1.0f);
|
|
}
|
|
|
|
inline ImVec4 AssetFileIconFillColor() {
|
|
return ImVec4(0.46f, 0.46f, 0.46f, 1.0f);
|
|
}
|
|
|
|
inline ImVec4 AssetFileIconLineColor() {
|
|
return ImVec4(0.74f, 0.74f, 0.74f, 0.90f);
|
|
}
|
|
|
|
inline ImVec4 AssetFileFoldColor() {
|
|
return ImVec4(0.92f, 0.92f, 0.92f, 0.16f);
|
|
}
|
|
|
|
inline ImVec4 ConsoleRowHoverFillColor() {
|
|
return ImVec4(1.0f, 1.0f, 1.0f, 0.03f);
|
|
}
|
|
|
|
inline float MenuBarStatusRightPadding() {
|
|
return 20.0f;
|
|
}
|
|
|
|
inline ImVec4 MenuBarStatusIdleColor() {
|
|
return ImVec4(0.62f, 0.62f, 0.62f, 1.0f);
|
|
}
|
|
|
|
inline ImVec4 MenuBarStatusDirtyColor() {
|
|
return ImVec4(0.82f, 0.82f, 0.82f, 1.0f);
|
|
}
|
|
|
|
inline ImVec2 VectorAxisInputSpacing() {
|
|
return ImVec2(6.0f, 0.0f);
|
|
}
|
|
|
|
inline ImVec2 VectorAxisControlSpacing() {
|
|
return ImVec2(0.0f, 0.0f);
|
|
}
|
|
|
|
inline float VectorAxisResetButtonExtraWidth() {
|
|
return 3.0f;
|
|
}
|
|
|
|
inline ImVec4 VectorAxisButtonColor() {
|
|
return ImVec4(0.28f, 0.28f, 0.28f, 1.0f);
|
|
}
|
|
|
|
inline ImVec4 VectorAxisButtonHoveredColor() {
|
|
return ImVec4(0.34f, 0.34f, 0.34f, 1.0f);
|
|
}
|
|
|
|
inline ImVec4 ToolbarButtonColor(bool active) {
|
|
return active ? ImVec4(0.33f, 0.33f, 0.33f, 1.0f) : ImVec4(0.24f, 0.24f, 0.24f, 1.0f);
|
|
}
|
|
|
|
inline ImVec4 ToolbarButtonHoveredColor(bool active) {
|
|
return active ? ImVec4(0.38f, 0.38f, 0.38f, 1.0f) : ImVec4(0.30f, 0.30f, 0.30f, 1.0f);
|
|
}
|
|
|
|
inline ImVec4 ToolbarButtonActiveColor() {
|
|
return ImVec4(0.42f, 0.42f, 0.42f, 1.0f);
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|