diff --git a/Source/MetaCoreEditor/Private/MetaCoreBuiltinEditorModule.cpp b/Source/MetaCoreEditor/Private/MetaCoreBuiltinEditorModule.cpp index b3808a9..74213f2 100644 --- a/Source/MetaCoreEditor/Private/MetaCoreBuiltinEditorModule.cpp +++ b/Source/MetaCoreEditor/Private/MetaCoreBuiltinEditorModule.cpp @@ -2618,23 +2618,50 @@ private: if (childIds.empty()) { flags |= ImGuiTreeNodeFlags_Leaf; } - if (editorContext.IsObjectSelected(objectId)) { + + const bool isSelected = editorContext.IsObjectSelected(objectId); + if (isSelected) { flags |= ImGuiTreeNodeFlags_Selected; } const bool isModelInstance = gameObject.HasComponent() && !gameObject.GetComponent().SourceModelPath.empty(); - const std::string hierarchyLabel = gameObject.GetName() + (isModelInstance ? " [Model]" : ""); - const auto sourceModelAsset = isModelInstance - ? FindSourceModelAssetForGameObject(editorContext, gameObject) - : std::optional{}; + + // 1:1 对齐 Infernux 装饰样式:模型实例冠以 ◆ 前缀 + std::string hierarchyLabel = gameObject.GetName(); + if (isModelInstance) { + hierarchyLabel = "\u25C6 " + hierarchyLabel; + } + + // 1:1 对齐选中背景色与模型实例的文字红强调色 + if (isSelected) { + ImGui::PushStyleColor(ImGuiCol_Header, ImVec4(0.173F, 0.365F, 0.529F, 1.0F)); + ImGui::PushStyleColor(ImGuiCol_HeaderHovered, ImVec4(0.173F, 0.365F, 0.529F, 1.0F)); + ImGui::PushStyleColor(ImGuiCol_HeaderActive, ImVec4(0.173F, 0.365F, 0.529F, 1.0F)); + } + + bool pushedTextColor = false; + if (isModelInstance) { + ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(235.0F / 255.0F, 87.0F / 255.0F, 87.0F / 255.0F, 1.0F)); + pushedTextColor = true; + } + const bool nodeOpened = ImGui::TreeNodeEx( reinterpret_cast(static_cast(objectId)), flags, "%s", hierarchyLabel.c_str() ); + + if (pushedTextColor) { + ImGui::PopStyleColor(1); + } + + if (isSelected) { + ImGui::PopStyleColor(3); + } + const bool leftClicked = ImGui::IsItemClicked(ImGuiMouseButton_Left); const bool rightClicked = ImGui::IsItemClicked(ImGuiMouseButton_Right); if ((leftClicked || rightClicked) && !ImGui::IsItemToggledOpen()) { @@ -2647,6 +2674,7 @@ private: if (isModelInstance && ImGui::IsItemHovered()) { ImGui::BeginTooltip(); ImGui::TextDisabled("Model Instance"); + const auto sourceModelAsset = FindSourceModelAssetForGameObject(editorContext, gameObject); if (sourceModelAsset.has_value()) { ImGui::Text("Source: %s", sourceModelAsset->RelativePath.filename().string().c_str()); } else { @@ -4365,7 +4393,20 @@ void DrawDirectoryTree( const std::string label = dir.empty() ? fallback : dir.filename().string(); if (!MatchesAssetFilter(label) && !HasVisibleChildren(assetDatabaseService, dir)) return; const bool isSelectedDirectory = editorContext.GetSelectedProjectDirectory() == dir; - if (ImGui::TreeNodeEx(dir.generic_string().c_str(), ImGuiTreeNodeFlags_OpenOnArrow | ImGuiTreeNodeFlags_SpanFullWidth | (isSelectedDirectory ? ImGuiTreeNodeFlags_Selected : 0), "%s", label.c_str())) { + + if (isSelectedDirectory) { + ImGui::PushStyleColor(ImGuiCol_Header, ImVec4(0.173F, 0.365F, 0.529F, 1.0F)); + ImGui::PushStyleColor(ImGuiCol_HeaderHovered, ImVec4(0.173F, 0.365F, 0.529F, 1.0F)); + ImGui::PushStyleColor(ImGuiCol_HeaderActive, ImVec4(0.173F, 0.365F, 0.529F, 1.0F)); + } + + const bool nodeOpened = ImGui::TreeNodeEx(dir.generic_string().c_str(), ImGuiTreeNodeFlags_OpenOnArrow | ImGuiTreeNodeFlags_SpanFullWidth | (isSelectedDirectory ? ImGuiTreeNodeFlags_Selected : 0), "%s", label.c_str()); + + if (isSelectedDirectory) { + ImGui::PopStyleColor(3); + } + + if (nodeOpened) { if (ImGui::IsItemClicked()) editorContext.SetSelectedProjectDirectory(dir); for (const auto& d : assetDatabaseService.GetDirectoriesUnder(dir)) { if (d.parent_path() == dir) DrawDirectoryTree(editorContext, assetDatabaseService, d, d.filename().string().c_str()); @@ -4406,7 +4447,17 @@ public: ImGui::TextDisabled("目录: %s", selectedDirectory.generic_string().c_str()); ImGui::Separator(); for (const auto& d : assetDatabaseService->GetDirectoriesUnder(selectedDirectory)) { - if (MatchesAssetFilter(d.filename().string()) && ImGui::Selectable(("[Dir] " + d.filename().string()).c_str(), selectedDirectory == d)) { + const bool isSelected = selectedDirectory == d; + if (isSelected) { + ImGui::PushStyleColor(ImGuiCol_Header, ImVec4(0.173F, 0.365F, 0.529F, 1.0F)); + ImGui::PushStyleColor(ImGuiCol_HeaderHovered, ImVec4(0.173F, 0.365F, 0.529F, 1.0F)); + ImGui::PushStyleColor(ImGuiCol_HeaderActive, ImVec4(0.173F, 0.365F, 0.529F, 1.0F)); + } + const bool clicked = MatchesAssetFilter(d.filename().string()) && ImGui::Selectable(("[Dir] " + d.filename().string()).c_str(), isSelected); + if (isSelected) { + ImGui::PopStyleColor(3); + } + if (clicked) { editorContext.SetSelectedProjectDirectory(d); } if (ImGui::BeginPopupContextItem(nullptr, ImGuiPopupFlags_MouseButtonRight)) { @@ -4430,7 +4481,16 @@ public: if (!MatchesAssetFilter(a.RelativePath.filename().string()) && !MatchesAssetFilter(a.Type)) continue; const std::string label = a.RelativePath.filename().string() + " [" + a.Type + "]"; const bool selected = selectedAssetGuid == a.Guid; - if (ImGui::Selectable(label.c_str(), selected)) { + if (selected) { + ImGui::PushStyleColor(ImGuiCol_Header, ImVec4(0.173F, 0.365F, 0.529F, 1.0F)); + ImGui::PushStyleColor(ImGuiCol_HeaderHovered, ImVec4(0.173F, 0.365F, 0.529F, 1.0F)); + ImGui::PushStyleColor(ImGuiCol_HeaderActive, ImVec4(0.173F, 0.365F, 0.529F, 1.0F)); + } + const bool clicked = ImGui::Selectable(label.c_str(), selected); + if (selected) { + ImGui::PopStyleColor(3); + } + if (clicked) { editorContext.SelectAsset(MetaCoreSelectedAssetState{ a.Guid, a.RelativePath, @@ -4510,7 +4570,16 @@ public: editorContext.GetSelectedAssetSubId() == subId; const std::string generatedLabel = "↳ " + generatedEntry.Name + " [" + generatedEntry.SecondaryText + "]"; - if (ImGui::Selectable(generatedLabel.c_str(), generatedSelected)) { + if (generatedSelected) { + ImGui::PushStyleColor(ImGuiCol_Header, ImVec4(0.173F, 0.365F, 0.529F, 1.0F)); + ImGui::PushStyleColor(ImGuiCol_HeaderHovered, ImVec4(0.173F, 0.365F, 0.529F, 1.0F)); + ImGui::PushStyleColor(ImGuiCol_HeaderActive, ImVec4(0.173F, 0.365F, 0.529F, 1.0F)); + } + const bool generatedClicked = ImGui::Selectable(generatedLabel.c_str(), generatedSelected); + if (generatedSelected) { + ImGui::PopStyleColor(3); + } + if (generatedClicked) { editorContext.SelectAsset(MetaCoreSelectedAssetState{ a.Guid, a.RelativePath, @@ -5591,11 +5660,11 @@ private: ) { ImGui::PushID(label.c_str()); - // 扁平化无边框输入框样式,消除粗蓝色高亮边框 + // 扁平化无边框输入框样式,使用全局对齐的 Infernux Theme 颜色 ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0.0F, 0.0F, 0.0F, 0.0F)); - ImGui::PushStyleColor(ImGuiCol_FrameBg, ImVec4(0.12F, 0.12F, 0.12F, 1.0F)); - ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, ImVec4(0.18F, 0.18F, 0.18F, 1.0F)); - ImGui::PushStyleColor(ImGuiCol_FrameBgActive, ImVec4(0.15F, 0.15F, 0.15F, 1.0F)); + ImGui::PushStyleColor(ImGuiCol_FrameBg, ImVec4(0.165F, 0.165F, 0.165F, 1.0F)); + ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, ImVec4(0.20F, 0.20F, 0.20F, 1.0F)); + ImGui::PushStyleColor(ImGuiCol_FrameBgActive, ImVec4(0.24F, 0.17F, 0.17F, 1.0F)); ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 0.0F); glm::vec3 displayValues = values; @@ -5695,11 +5764,11 @@ private: } }; - drawComponent("X", displayValues.x, ImVec4(0.9F, 0.3F, 0.3F, 1.0F)); + drawComponent("X", displayValues.x, ImVec4(0.85F, 0.25F, 0.25F, 1.0F)); ImGui::SameLine(); - drawComponent("Y", displayValues.y, ImVec4(0.3F, 0.9F, 0.3F, 1.0F)); + drawComponent("Y", displayValues.y, ImVec4(0.55F, 0.80F, 0.10F, 1.0F)); ImGui::SameLine(); - drawComponent("Z", displayValues.z, ImVec4(0.3F, 0.4F, 1.0F, 1.0F)); + drawComponent("Z", displayValues.z, ImVec4(0.25F, 0.50F, 0.95F, 1.0F)); if (!MetaCoreNearlyEqualVec3(displayValues, values)) { MetaCoreApplyValueToSelectedObjects( @@ -5874,9 +5943,9 @@ public: } ImGui::SameLine(); - // 扁平化名称输入框样式,移除突兀的蓝色边框,并与 Static 控件完美对齐 + // 扁平化名称输入框样式,移除突兀的蓝色边框,并与 Static 控件完美对齐,使用全局 Infernux Theme 配色 float staticControlWidth = 85.0F; // "静态的" 文字及 checkbox 的总估算宽度 - ImGui::PushStyleColor(ImGuiCol_FrameBg, ImVec4(0.12F, 0.12F, 0.12F, 1.0F)); + ImGui::PushStyleColor(ImGuiCol_FrameBg, ImVec4(0.165F, 0.165F, 0.165F, 1.0F)); ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0.0F, 0.0F, 0.0F, 0.0F)); ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 0.0F); @@ -5898,10 +5967,10 @@ public: ImGui::Columns(2, "TagLayerCols", false); ImGui::SetColumnWidth(0, colWidth); - // 调整下拉选择框的按钮样式,使其看起来更像扁平的下拉框 - ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0.12F, 0.12F, 0.12F, 1.0F)); - ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(0.18F, 0.18F, 0.18F, 1.0F)); - ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4(0.15F, 0.15F, 0.15F, 1.0F)); + // 调整下拉选择框的按钮样式,使用全局对齐的 Infernux Theme 颜色 + ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0.25F, 0.25F, 0.25F, 1.0F)); + ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(0.30F, 0.25F, 0.25F, 1.0F)); + ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4(0.35F, 0.22F, 0.22F, 1.0F)); ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0.0F, 0.0F, 0.0F, 0.0F)); ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 0.0F); ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, ImVec2(0.0F, 0.5F)); // 文本左对齐 diff --git a/Source/MetaCoreEditor/Private/MetaCoreEditorApp.cpp b/Source/MetaCoreEditor/Private/MetaCoreEditorApp.cpp index 8642cf8..764f3b2 100644 --- a/Source/MetaCoreEditor/Private/MetaCoreEditorApp.cpp +++ b/Source/MetaCoreEditor/Private/MetaCoreEditorApp.cpp @@ -465,42 +465,98 @@ void MetaCoreDrawSelectionGroupCenterOverlay( void MetaCoreApplyEditorStyle() { ImGuiStyle& style = ImGui::GetStyle(); ImGui::StyleColorsDark(); - style.WindowRounding = 2.0F; - style.FrameRounding = 2.0F; - style.TabRounding = 2.0F; - style.WindowBorderSize = 1.0F; - style.FramePadding = ImVec2(8.0F, 4.0F); - style.ItemSpacing = ImVec2(8.0F, 5.0F); - style.Colors[ImGuiCol_WindowBg] = ImVec4(0.11F, 0.12F, 0.14F, 0.97F); - style.Colors[ImGuiCol_TitleBg] = ImVec4(0.10F, 0.11F, 0.13F, 1.0F); - style.Colors[ImGuiCol_TitleBgActive] = ImVec4(0.14F, 0.15F, 0.17F, 1.0F); - style.Colors[ImGuiCol_Header] = ImVec4(0.17F, 0.20F, 0.24F, 1.0F); - style.Colors[ImGuiCol_HeaderHovered] = ImVec4(0.22F, 0.27F, 0.32F, 1.0F); - style.Colors[ImGuiCol_Button] = ImVec4(0.18F, 0.21F, 0.25F, 1.0F); - style.Colors[ImGuiCol_ButtonHovered] = ImVec4(0.23F, 0.28F, 0.33F, 1.0F); - style.Colors[ImGuiCol_ButtonActive] = ImVec4(0.27F, 0.33F, 0.39F, 1.0F); - style.Colors[ImGuiCol_Tab] = ImVec4(0.12F, 0.14F, 0.16F, 1.0F); - style.Colors[ImGuiCol_TabSelected] = ImVec4(0.20F, 0.26F, 0.34F, 1.0F); - style.Colors[ImGuiCol_DockingEmptyBg] = ImVec4(0.0F, 0.0F, 0.0F, 0.0F); - // Optimize ImGuizmo style for premium feel and remove hatching artifacts (black dashed lines). + // 1:1 对齐 Infernux 布局尺寸参数与直角风格 + style.WindowRounding = 0.0F; + style.ChildRounding = 0.0F; + style.FrameRounding = 0.0F; + style.PopupRounding = 0.0F; + style.ScrollbarRounding = 0.0F; + style.GrabRounding = 0.0F; + style.TabRounding = 0.0F; + + style.WindowBorderSize = 1.0F; + style.ChildBorderSize = 1.0F; + style.PopupBorderSize = 1.0F; + style.FrameBorderSize = 0.0F; + style.TabBorderSize = 1.0F; + + style.WindowPadding = ImVec2(4.0F, 4.0F); + style.FramePadding = ImVec2(4.0F, 2.0F); + style.ItemSpacing = ImVec2(4.0F, 4.0F); + style.ItemInnerSpacing = ImVec2(4.0F, 4.0F); + + // 1:1 对齐 Infernux Unity 风格暗色调与暗红高亮主题 + style.Colors[ImGuiCol_Text] = ImVec4(0.84F, 0.84F, 0.84F, 1.0F); // 主文本色 + style.Colors[ImGuiCol_TextDisabled] = ImVec4(0.40F, 0.40F, 0.40F, 1.0F); // 禁用文本色 + style.Colors[ImGuiCol_WindowBg] = ImVec4(0.22F, 0.22F, 0.22F, 1.0F); // 窗口背景 (Unity #383838) + style.Colors[ImGuiCol_ChildBg] = ImVec4(0.00F, 0.00F, 0.00F, 0.0F); // 子窗口背景 (透明) + style.Colors[ImGuiCol_PopupBg] = ImVec4(0.24F, 0.24F, 0.24F, 0.96F); // 弹出菜单背景 (Unity #3E3E3E) + style.Colors[ImGuiCol_Border] = ImVec4(0.10F, 0.10F, 0.10F, 1.0F); // 边框颜色 (Unity #1A1A1A) + style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.00F, 0.00F, 0.00F, 0.0F); // 边框阴影 (无) + style.Colors[ImGuiCol_FrameBg] = ImVec4(0.165F, 0.165F, 0.165F, 1.0F); // 输入框/滑动条背景 (Unity #2A2A2A) + style.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.20F, 0.20F, 0.20F, 1.0F); // 输入框悬停 + style.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.24F, 0.17F, 0.17F, 1.0F); // 输入框激活 (带微弱红调) + style.Colors[ImGuiCol_TitleBg] = ImVec4(0.16F, 0.16F, 0.16F, 1.0F); // 标题栏背景 + style.Colors[ImGuiCol_TitleBgActive] = ImVec4(0.16F, 0.16F, 0.16F, 1.0F); // 活动标题栏背景 + style.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.16F, 0.16F, 0.16F, 0.5F); // 折叠标题栏背景 + style.Colors[ImGuiCol_MenuBarBg] = ImVec4(0.16F, 0.16F, 0.16F, 1.0F); // 菜单栏背景 + style.Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.13F, 0.13F, 0.13F, 1.0F); // 滚动条背景 + style.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.25F, 0.25F, 0.25F, 1.0F); // 滚动条滑块 (Unity #404040) + style.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.30F, 0.25F, 0.25F, 1.0F); // 滚动条悬停 (微红) + style.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.35F, 0.22F, 0.22F, 1.0F); // 滚动条激活 + style.Colors[ImGuiCol_CheckMark] = ImVec4(0.922F, 0.341F, 0.341F, 1.0F); // 勾选标记 (强调红 #EB5757) + style.Colors[ImGuiCol_SliderGrab] = ImVec4(0.25F, 0.25F, 0.25F, 1.0F); // 滑动条滑块 + style.Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.35F, 0.22F, 0.22F, 1.0F); // 滑动条激活 + style.Colors[ImGuiCol_Button] = ImVec4(0.25F, 0.25F, 0.25F, 1.0F); // 普通按钮背景 + style.Colors[ImGuiCol_ButtonHovered] = ImVec4(0.30F, 0.25F, 0.25F, 1.0F); // 按钮悬停 (微红调) + style.Colors[ImGuiCol_ButtonActive] = ImVec4(0.35F, 0.22F, 0.22F, 1.0F); // 按钮激活 (深红调) + style.Colors[ImGuiCol_Header] = ImVec4(0.235F, 0.235F, 0.235F, 1.0F); // 折叠头背景 (Unity #3C3C3C) + style.Colors[ImGuiCol_HeaderHovered] = ImVec4(0.28F, 0.24F, 0.24F, 1.0F); // 悬停 (微红调) + style.Colors[ImGuiCol_HeaderActive] = ImVec4(0.32F, 0.25F, 0.25F, 1.0F); // 激活 (深红调) + style.Colors[ImGuiCol_Separator] = ImVec4(0.10F, 0.10F, 0.10F, 1.0F); // 分割线 (同边框) + style.Colors[ImGuiCol_SeparatorHovered] = ImVec4(0.35F, 0.25F, 0.25F, 0.6F); // 悬停分割线 (红暖色) + style.Colors[ImGuiCol_SeparatorActive] = ImVec4(0.40F, 0.28F, 0.28F, 0.8F); // 激活分割线 (深红) + style.Colors[ImGuiCol_ResizeGrip] = ImVec4(0.16F, 0.16F, 0.16F, 0.5F); // 调整手柄 + style.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.28F, 0.24F, 0.24F, 0.6F); + style.Colors[ImGuiCol_ResizeGripActive] = ImVec4(0.32F, 0.25F, 0.25F, 0.9F); + style.Colors[ImGuiCol_Tab] = ImVec4(0.18F, 0.18F, 0.18F, 1.0F); // 标签页未选中 (暗灰色) + style.Colors[ImGuiCol_TabHovered] = ImVec4(0.28F, 0.24F, 0.24F, 1.0F); // 标签悬停 (微红调) + style.Colors[ImGuiCol_TabActive] = ImVec4(0.22F, 0.22F, 0.22F, 1.0F); // 活动标签 (同窗口底色) + style.Colors[ImGuiCol_TabUnfocused] = ImVec4(0.18F, 0.18F, 0.18F, 1.0F); + style.Colors[ImGuiCol_TabUnfocusedActive] = ImVec4(0.22F, 0.22F, 0.22F, 1.0F); + style.Colors[ImGuiCol_DockingPreview] = ImVec4(0.173F, 0.365F, 0.529F, 0.7F); // 停靠预览区 (Unity 蓝色半透明) + style.Colors[ImGuiCol_DockingEmptyBg] = ImVec4(0.18F, 0.18F, 0.18F, 1.0F); + style.Colors[ImGuiCol_TableHeaderBg] = ImVec4(0.16F, 0.16F, 0.16F, 1.0F); // 表格头背景 + style.Colors[ImGuiCol_TableBorderStrong] = ImVec4(0.10F, 0.10F, 0.10F, 1.0F); // 强边框 + style.Colors[ImGuiCol_TableBorderLight] = ImVec4(0.15F, 0.15F, 0.15F, 1.0F); // 弱边框 + style.Colors[ImGuiCol_TableRowBg] = ImVec4(0.00F, 0.00F, 0.00F, 0.0F); + style.Colors[ImGuiCol_TableRowBgAlt] = ImVec4(1.00F, 1.00F, 1.00F, 0.03F); // 斑马纹交替底色 + style.Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.173F, 0.365F, 0.529F, 1.0F); // 选中文本背景 (Unity 经典选色 #2C5D87) + style.Colors[ImGuiCol_DragDropTarget] = ImVec4(0.173F, 0.365F, 0.529F, 0.9F); // 拖放目标高亮 (带选蓝) + style.Colors[ImGuiCol_NavHighlight] = ImVec4(0.922F, 0.341F, 0.341F, 1.0F); // 导航高亮 + style.Colors[ImGuiCol_NavWindowingHighlight] = ImVec4(1.00F, 1.00F, 1.00F, 0.7F); + style.Colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.80F, 0.80F, 0.80F, 0.2F); + style.Colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.00F, 0.00F, 0.00F, 0.6F); // 模态遮罩 + + // 优化 ImGuizmo 属性,使其看起来更高端并移除了舱口剖面线(虚线黑影) ImGuizmo::Style& gizmoStyle = ImGuizmo::GetStyle(); gizmoStyle.TranslationLineThickness = 3.5F; gizmoStyle.ScaleLineThickness = 3.5F; gizmoStyle.RotationLineThickness = 3.0F; gizmoStyle.RotationOuterLineThickness = 2.0F; gizmoStyle.CenterCircleSize = 4.0F; - gizmoStyle.HatchedAxisLineThickness = 0.0F; // Disables the black dashed segments. + gizmoStyle.HatchedAxisLineThickness = 0.0F; // 关闭黑色舱口分割虚线 gizmoStyle.TranslationLineArrowSize = 6.0F; - // Unity-style Color Palette - gizmoStyle.Colors[ImGuizmo::DIRECTION_X] = ImVec4(0.85F, 0.25F, 0.25F, 1.0F); // Red - gizmoStyle.Colors[ImGuizmo::DIRECTION_Y] = ImVec4(0.55F, 0.80F, 0.10F, 1.0F); // Green - gizmoStyle.Colors[ImGuizmo::DIRECTION_Z] = ImVec4(0.25F, 0.50F, 0.95F, 1.0F); // Blue + // 1:1 对齐 Unity 的经典红绿蓝三轴 Gizmo 颜色 + gizmoStyle.Colors[ImGuizmo::DIRECTION_X] = ImVec4(0.85F, 0.25F, 0.25F, 1.0F); // X 轴 (红) + gizmoStyle.Colors[ImGuizmo::DIRECTION_Y] = ImVec4(0.55F, 0.80F, 0.10F, 1.0F); // Y 轴 (绿) + gizmoStyle.Colors[ImGuizmo::DIRECTION_Z] = ImVec4(0.25F, 0.50F, 0.95F, 1.0F); // Z 轴 (蓝) gizmoStyle.Colors[ImGuizmo::PLANE_X] = ImVec4(0.85F, 0.25F, 0.25F, 0.38F); gizmoStyle.Colors[ImGuizmo::PLANE_Y] = ImVec4(0.55F, 0.80F, 0.10F, 0.38F); gizmoStyle.Colors[ImGuizmo::PLANE_Z] = ImVec4(0.25F, 0.50F, 0.95F, 0.38F); - gizmoStyle.Colors[ImGuizmo::SELECTION] = ImVec4(1.00F, 0.80F, 0.10F, 1.0F); // Orange-Yellow + gizmoStyle.Colors[ImGuizmo::SELECTION] = ImVec4(1.00F, 0.80F, 0.10F, 1.0F); // 选中态 (亮黄橙) } void MetaCoreConfigureChineseFont() {