Feature/ecs behavior tree (#188)

* feat(behavior-tree): 完全 ECS 化的行为树系统

* feat(editor-app): 添加行为树可视化编辑器

* chore: 移除 Cocos Creator 扩展目录

* feat(editor-app): 行为树编辑器功能增强

* fix(editor-app): 修复 TypeScript 类型错误

* feat(editor-app): 使用 FlexLayout 重构面板系统并优化资产浏览器

* feat(editor-app): 改进编辑器UI样式并修复行为树执行顺序

* feat(behavior-tree,editor-app): 添加装饰器系统并优化编辑器性能

* feat(behavior-tree,editor-app): 添加属性绑定系统

* feat(editor-app,behavior-tree): 优化编辑器UI并改进行为树功能

* feat(editor-app,behavior-tree): 添加全局黑板系统并增强资产浏览器功能

* feat(behavior-tree,editor-app): 添加运行时资产导出系统

* feat(behavior-tree,editor-app): 添加SubTree系统和资产选择器

* feat(behavior-tree,editor-app): 优化系统架构并改进编辑器文件管理

* fix(behavior-tree,editor-app): 修复SubTree节点错误显示空节点警告

* fix(editor-app): 修复局部黑板类型定义文件扩展名错误
This commit is contained in:
YHH
2025-10-27 09:29:11 +08:00
committed by GitHub
parent 0cd99209c4
commit 009f8af4e1
234 changed files with 21824 additions and 15295 deletions

View File

@@ -34,6 +34,8 @@
border-bottom: 1px solid var(--color-border-default);
flex-shrink: 0;
transition: all 0.3s ease;
z-index: 100;
position: relative;
}
.editor-header.remote-connected {
@@ -162,6 +164,7 @@
display: flex;
flex: 1;
overflow: hidden;
cursor: default;
}
.viewport {

View File

@@ -68,6 +68,43 @@
overflow: hidden;
display: flex;
flex-direction: column;
container-type: inline-size;
container-name: asset-list-container;
}
.asset-browser-breadcrumb {
padding: 8px 12px;
background: #2d2d30;
border-bottom: 1px solid #3e3e3e;
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 4px;
font-size: var(--font-size-sm);
min-height: 32px;
}
.breadcrumb-item {
color: #cccccc;
cursor: pointer;
padding: 2px 6px;
border-radius: 3px;
transition: all 0.2s ease;
user-select: none;
}
.breadcrumb-item:hover {
background: #3e3e3e;
color: #ffffff;
}
.breadcrumb-item:active {
background: #094771;
}
.breadcrumb-separator {
color: #858585;
pointer-events: none;
}
.asset-browser-toolbar {
@@ -109,13 +146,78 @@
.asset-list {
flex: 1;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
gap: 10px;
grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
gap: 8px;
padding: 10px;
overflow-y: auto;
align-content: start;
}
/* 容器查询:根据容器宽度调整布局 */
@container (max-width: 400px) {
.asset-list {
grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
gap: 6px;
}
}
@container (max-width: 250px) {
.asset-list {
grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
gap: 4px;
padding: 6px;
}
}
@container (max-width: 150px) {
.asset-list {
grid-template-columns: 1fr;
gap: 2px;
}
.asset-item {
flex-direction: row;
justify-content: flex-start;
padding: 6px 8px;
gap: 8px;
}
.asset-icon {
width: 24px;
height: 24px;
margin-bottom: 0;
}
.asset-name {
text-align: left;
margin-bottom: 0;
}
.asset-type {
display: none;
}
}
/* 中等窄度优化 */
@container (max-width: 250px) {
.asset-item {
padding: 8px 6px;
}
.asset-icon {
width: 36px;
height: 36px;
}
.asset-name {
font-size: 11px;
}
.asset-type {
font-size: 9px;
}
}
.asset-item {
display: flex;
flex-direction: column;
@@ -198,13 +300,3 @@
background: #4e4e4e;
}
@media (max-width: 768px) {
.asset-list {
grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
}
.asset-icon {
width: 32px;
height: 32px;
}
}

View File

@@ -0,0 +1,397 @@
.asset-picker-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.6);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
animation: fadeIn 0.15s ease-out;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.asset-picker-dialog {
background-color: #1e1e1e;
border-radius: 8px;
width: 700px;
max-width: 90vw;
max-height: 85vh;
display: flex;
flex-direction: column;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
animation: slideUp 0.2s ease-out;
}
@keyframes slideUp {
from {
transform: translateY(20px);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
}
.asset-picker-header {
padding: 15px 20px;
border-bottom: 1px solid #333;
display: flex;
align-items: center;
justify-content: space-between;
}
.asset-picker-header h3 {
margin: 0;
font-size: 16px;
color: #cccccc;
font-weight: 600;
}
.asset-picker-close {
background: none;
border: none;
color: #cccccc;
cursor: pointer;
padding: 4px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 3px;
transition: background-color 0.15s;
}
.asset-picker-close:hover {
background-color: #3c3c3c;
}
/* 工具栏 */
.asset-picker-toolbar {
padding: 10px 15px;
border-bottom: 1px solid #333;
display: flex;
align-items: center;
gap: 10px;
background-color: #252525;
}
.toolbar-button {
background: none;
border: 1px solid #444;
color: #cccccc;
cursor: pointer;
padding: 6px 8px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 4px;
transition: all 0.15s;
}
.toolbar-button:hover:not(:disabled) {
background-color: #3c3c3c;
border-color: #555;
}
.toolbar-button:disabled {
opacity: 0.4;
cursor: not-allowed;
}
.toolbar-button.active {
background-color: #0e639c;
border-color: #0e639c;
}
.view-mode-buttons {
display: flex;
gap: 4px;
}
/* 面包屑导航 */
.asset-picker-breadcrumb {
flex: 1;
font-size: 13px;
color: #999;
overflow-x: auto;
white-space: nowrap;
padding: 0 5px;
}
.asset-picker-breadcrumb::-webkit-scrollbar {
height: 4px;
}
.asset-picker-breadcrumb::-webkit-scrollbar-thumb {
background-color: #555;
border-radius: 2px;
}
.asset-picker-breadcrumb .breadcrumb-item {
cursor: pointer;
color: #0e639c;
transition: color 0.15s;
}
.asset-picker-breadcrumb .breadcrumb-item:hover {
color: #1177bb;
text-decoration: underline;
}
.asset-picker-breadcrumb .breadcrumb-separator {
color: #666;
margin: 0 6px;
}
/* 搜索框 */
.asset-picker-search {
padding: 12px 15px;
border-bottom: 1px solid #333;
display: flex;
align-items: center;
gap: 8px;
background-color: #252525;
}
.asset-picker-search .search-icon {
color: #666;
flex-shrink: 0;
}
.search-input {
flex: 1;
background-color: #1e1e1e;
border: 1px solid #444;
border-radius: 4px;
padding: 6px 10px;
color: #cccccc;
font-size: 13px;
outline: none;
transition: border-color 0.15s;
}
.search-input:focus {
border-color: #0e639c;
}
.search-input::placeholder {
color: #666;
}
.search-clear {
background: none;
border: none;
color: #999;
cursor: pointer;
padding: 4px;
display: flex;
align-items: center;
border-radius: 3px;
transition: all 0.15s;
}
.search-clear:hover {
background-color: #3c3c3c;
color: #cccccc;
}
/* 内容区域 */
.asset-picker-content {
flex: 1;
padding: 10px;
overflow-y: auto;
min-height: 350px;
}
.asset-picker-content::-webkit-scrollbar {
width: 10px;
}
.asset-picker-content::-webkit-scrollbar-track {
background-color: #1e1e1e;
}
.asset-picker-content::-webkit-scrollbar-thumb {
background-color: #555;
border-radius: 5px;
}
.asset-picker-content::-webkit-scrollbar-thumb:hover {
background-color: #666;
}
.asset-picker-loading,
.asset-picker-empty {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
color: #666;
font-size: 14px;
}
/* 列表视图 */
.asset-picker-list {
display: flex;
flex-direction: column;
gap: 2px;
}
.asset-picker-list.list {
flex-direction: column;
}
.asset-picker-list.grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
gap: 10px;
}
/* 资产项 */
.asset-picker-item {
display: flex;
align-items: center;
gap: 10px;
padding: 8px 12px;
border-radius: 4px;
cursor: pointer;
color: #cccccc;
font-size: 13px;
transition: all 0.15s;
user-select: none;
}
.asset-picker-list.list .asset-picker-item {
flex-direction: row;
}
.asset-picker-list.grid .asset-picker-item {
flex-direction: column;
padding: 15px 10px;
text-align: center;
align-items: center;
}
.asset-picker-item:hover {
background-color: #2a2a2a;
}
.asset-picker-item.selected {
background-color: #0e639c;
}
.asset-picker-item.selected:hover {
background-color: #1177bb;
}
.asset-icon {
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.asset-info {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 4px;
}
.asset-picker-list.grid .asset-info {
align-items: center;
width: 100%;
}
.asset-name {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-weight: 500;
}
.asset-picker-list.grid .asset-name {
font-size: 12px;
width: 100%;
text-align: center;
}
.asset-meta {
display: flex;
gap: 12px;
font-size: 11px;
color: #888;
}
.asset-size,
.asset-date {
display: inline-block;
}
/* 底部 */
.asset-picker-footer {
padding: 12px 20px;
border-top: 1px solid #333;
display: flex;
align-items: center;
justify-content: space-between;
background-color: #252525;
}
.footer-info {
font-size: 12px;
color: #888;
}
.footer-buttons {
display: flex;
gap: 10px;
}
.asset-picker-cancel,
.asset-picker-select {
padding: 8px 20px;
border: none;
border-radius: 4px;
font-size: 13px;
cursor: pointer;
transition: all 0.15s;
font-weight: 500;
}
.asset-picker-cancel {
background-color: #3c3c3c;
color: #cccccc;
}
.asset-picker-cancel:hover {
background-color: #4a4a4a;
}
.asset-picker-select {
background-color: #0e639c;
color: #ffffff;
}
.asset-picker-select:hover:not(:disabled) {
background-color: #1177bb;
}
.asset-picker-select:disabled {
background-color: #555;
color: #888;
cursor: not-allowed;
opacity: 0.6;
}

View File

@@ -0,0 +1,138 @@
.dialog-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.6);
display: flex;
align-items: center;
justify-content: center;
z-index: 10000;
animation: fadeIn 0.2s ease-out;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.dialog-content {
background: var(--bg-secondary, #2a2a2a);
border: 1px solid var(--border-color, #404040);
border-radius: 8px;
min-width: 450px;
max-width: 600px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
animation: slideIn 0.2s ease-out;
}
@keyframes slideIn {
from {
transform: translateY(-20px);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
}
.dialog-header {
padding: 16px 20px;
border-bottom: 1px solid var(--border-color, #404040);
}
.dialog-header h3 {
margin: 0;
font-size: 16px;
font-weight: 600;
color: var(--text-primary, #e0e0e0);
}
.dialog-body {
padding: 20px;
display: flex;
flex-direction: column;
gap: 12px;
}
.dialog-body label {
font-size: 14px;
font-weight: 500;
color: var(--text-primary, #e0e0e0);
margin-bottom: 4px;
}
.dialog-body input[type="text"] {
padding: 10px 12px;
background: var(--bg-primary, #1e1e1e);
border: 1px solid var(--border-color, #404040);
border-radius: 4px;
color: var(--text-primary, #e0e0e0);
font-size: 14px;
outline: none;
transition: all 0.2s;
}
.dialog-body input[type="text"]:focus {
border-color: #4a9eff;
box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.2);
}
.dialog-error {
color: #ff6b6b;
font-size: 13px;
margin-top: -6px;
}
.dialog-hint {
font-size: 12px;
color: var(--text-secondary, #999);
margin-top: -4px;
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}
.dialog-footer {
padding: 12px 20px;
border-top: 1px solid var(--border-color, #404040);
display: flex;
justify-content: flex-end;
gap: 8px;
}
.dialog-button {
padding: 8px 24px;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 14px;
font-weight: 500;
transition: all 0.2s;
}
.dialog-button-secondary {
background: var(--bg-hover, #3a3a3a);
color: var(--text-primary, #e0e0e0);
}
.dialog-button-secondary:hover {
background: var(--bg-active, #4a4a4a);
}
.dialog-button-primary {
background: #4a9eff;
color: white;
}
.dialog-button-primary:hover {
background: #6bb0ff;
}
.dialog-button:active {
transform: scale(0.98);
}

View File

@@ -0,0 +1,309 @@
.bt-node {
position: absolute;
min-width: 200px;
background: #252526;
border-radius: 4px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
overflow: visible;
user-select: none;
transition: all 0.2s;
}
.bt-node.selected {
box-shadow: 0 0 0 2px #007acc, 0 4px 16px rgba(0, 122, 204, 0.4);
}
.bt-node.running {
box-shadow: 0 0 0 3px #ffa726, 0 4px 16px rgba(255, 167, 38, 0.6);
animation: gentle-glow 2s ease-in-out infinite;
}
.bt-node.success {
box-shadow: 0 0 0 3px #4caf50, 0 4px 16px rgba(76, 175, 80, 0.6);
}
.bt-node.failure {
box-shadow: 0 0 0 3px #f44336, 0 4px 16px rgba(244, 67, 54, 0.6);
}
.bt-node.executed {
box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.3), 0 2px 8px rgba(0, 0, 0, 0.3);
}
.bt-node.root {
box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}
.bt-node-header {
position: relative;
padding: 10px 14px;
background: linear-gradient(135deg, #4a148c 0%, #7b1fa2 100%);
color: #ffffff;
font-weight: 500;
font-size: 13px;
display: flex;
align-items: center;
gap: 8px;
border-radius: 4px 4px 0 0;
}
.bt-node-header.composite {
background: linear-gradient(135deg, #1565c0 0%, #1976d2 100%);
}
.bt-node-header.action {
background: linear-gradient(135deg, #2e7d32 0%, #388e3c 100%);
}
.bt-node-header.condition {
background: linear-gradient(135deg, #c62828 0%, #d32f2f 100%);
}
.bt-node-header.decorator {
background: linear-gradient(135deg, #f57c00 0%, #fb8c00 100%);
}
.bt-node-header.root {
background: linear-gradient(135deg, #f9a825 0%, #fdd835 100%);
color: #333333;
}
.bt-node-header.blackboard {
background: linear-gradient(135deg, #6a1b9a 0%, #8e24aa 100%);
}
.bt-node-header-icon {
flex-shrink: 0;
}
.bt-node-header-title {
flex: 1;
font-weight: 600;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.bt-node-body {
padding: 12px;
background: #1e1e1e;
}
.bt-node-category {
font-size: 10px;
color: #858585;
text-transform: uppercase;
letter-spacing: 0.5px;
margin-bottom: 8px;
}
.bt-node-properties {
display: flex;
flex-direction: column;
gap: 6px;
}
.bt-node-property {
position: relative;
padding-left: 20px;
font-size: 11px;
color: #cccccc;
display: flex;
align-items: center;
min-height: 20px;
}
.bt-node-property-label {
color: #969696;
margin-right: 6px;
}
.bt-node-property-value {
color: #cccccc;
background: #2d2d30;
padding: 2px 6px;
border-radius: 2px;
font-size: 10px;
}
.bt-node-port {
position: absolute;
width: 14px;
height: 14px;
border-radius: 50%;
border: 2px solid #1e1e1e;
cursor: pointer;
z-index: 10;
transition: all 0.15s ease;
transform-origin: center center;
}
.bt-node-port-input {
background: #0e639c;
top: -7px;
left: 50%;
transform: translateX(-50%);
}
.bt-node-port-input:hover {
transform: translateX(-50%) scale(1.2);
}
.bt-node-port-output {
background: #0e639c;
bottom: -7px;
left: 50%;
transform: translateX(-50%);
}
.bt-node-port-output:hover {
transform: translateX(-50%) scale(1.2);
}
.bt-node-port-property {
background: #666;
width: 12px;
height: 12px;
left: -6px;
top: 50%;
transform: translateY(-50%);
}
.bt-node-port-property:hover {
transform: translateY(-50%) scale(1.2);
}
.bt-node-port-property.connected {
background: #4caf50;
}
.bt-node-port-variable-output {
background: #9c27b0;
width: 12px;
height: 12px;
right: -6px;
top: 50%;
transform: translateY(-50%);
}
.bt-node-port-variable-output:hover {
transform: translateY(-50%) scale(1.2);
}
.bt-node-blackboard-value {
font-size: 11px;
color: #cccccc;
margin-top: 6px;
padding: 6px 8px;
background: #2d2d30;
border-radius: 3px;
border-left: 3px solid #9c27b0;
font-family: 'Consolas', 'Monaco', monospace;
}
@keyframes pulse {
0%, 100% {
transform: translate(-50%, -50%) scale(1);
}
50% {
transform: translate(-50%, -50%) scale(1.02);
}
}
@keyframes gentle-glow {
0%, 100% {
box-shadow: 0 0 0 3px #ffa726, 0 4px 16px rgba(255, 167, 38, 0.6);
}
50% {
box-shadow: 0 0 0 3px #ffa726, 0 6px 20px rgba(255, 167, 38, 0.8);
}
}
.bt-node-empty-warning-tooltip {
display: none;
position: absolute;
bottom: 100%;
left: 50%;
transform: translateX(-50%);
margin-bottom: 8px;
padding: 6px 10px;
background: rgba(0, 0, 0, 0.9);
color: #fff;
font-size: 11px;
white-space: nowrap;
border-radius: 4px;
pointer-events: none;
z-index: 1000;
}
.bt-node-empty-warning-tooltip::after {
content: '';
position: absolute;
top: 100%;
left: 50%;
transform: translateX(-50%);
border: 4px solid transparent;
border-top-color: rgba(0, 0, 0, 0.9);
}
.bt-node-empty-warning-container:hover .bt-node-empty-warning-tooltip {
display: block;
}
/* 未生效节点样式 */
.bt-node.uncommitted {
border: 2px dashed #ff5722;
box-shadow: 0 0 0 2px rgba(255, 87, 34, 0.3), 0 4px 16px rgba(255, 87, 34, 0.4);
opacity: 0.85;
}
.bt-node.uncommitted.selected {
box-shadow: 0 0 0 2px #ff5722, 0 4px 16px rgba(255, 87, 34, 0.6);
}
/* 节点ID样式 */
.bt-node-id {
margin-top: 4px;
font-size: 9px;
font-weight: 500;
font-family: 'Consolas', 'Monaco', monospace;
background: rgba(0, 0, 0, 0.3);
color: rgba(255, 255, 255, 0.9);
padding: 2px 6px;
border-radius: 3px;
border: 1px solid rgba(255, 255, 255, 0.1);
display: inline-block;
letter-spacing: 0.5px;
}
/* 未生效节点警告 */
.bt-node-uncommitted-tooltip {
display: none;
position: absolute;
bottom: 100%;
left: 50%;
transform: translateX(-50%);
margin-bottom: 8px;
padding: 6px 10px;
background: rgba(255, 87, 34, 0.95);
color: #fff;
font-size: 11px;
white-space: nowrap;
border-radius: 4px;
pointer-events: none;
z-index: 1000;
}
.bt-node-uncommitted-tooltip::after {
content: '';
position: absolute;
top: 100%;
left: 50%;
transform: translateX(-50%);
border: 4px solid transparent;
border-top-color: rgba(255, 87, 34, 0.95);
}
.bt-node-uncommitted-warning:hover .bt-node-uncommitted-tooltip {
display: block;
}

View File

@@ -0,0 +1,186 @@
.behavior-tree-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.8);
z-index: 9999;
display: flex;
align-items: center;
justify-content: center;
}
.behavior-tree-window {
width: 90%;
height: 90%;
background-color: #1e1e1e;
border-radius: 8px;
display: flex;
flex-direction: column;
overflow: hidden;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
position: relative;
transition: all 0.3s ease;
}
.behavior-tree-window.fullscreen {
width: 100%;
height: 100%;
border-radius: 0;
}
.behavior-tree-header {
padding: 12px 20px;
background: #252526;
border-bottom: 1px solid #1e1e1e;
display: flex;
justify-content: space-between;
align-items: center;
}
.behavior-tree-title {
display: flex;
align-items: center;
gap: 10px;
color: #cccccc;
font-size: 14px;
font-weight: 500;
}
.behavior-tree-toolbar {
display: flex;
gap: 8px;
}
.behavior-tree-toolbar-btn {
padding: 8px;
background: transparent;
border: 1px solid #3e3e42;
border-radius: 3px;
color: #cccccc;
cursor: pointer;
font-size: 13px;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.15s ease;
min-width: 32px;
min-height: 32px;
}
.behavior-tree-toolbar-btn:hover {
background: #383838;
border-color: #007acc;
color: #ffffff;
}
.behavior-tree-content {
flex: 1;
display: flex;
overflow: hidden;
position: relative;
}
.behavior-tree-panel {
display: flex;
flex-direction: column;
position: relative;
background: #1e1e1e;
}
.behavior-tree-panel-left {
width: 280px;
border-right: 2px solid #3e3e42;
}
.behavior-tree-panel-center {
flex: 1;
overflow: hidden;
}
.behavior-tree-panel-right {
width: 320px;
border-left: 2px solid #3e3e42;
}
.behavior-tree-panel-header {
padding: 12px 15px;
background: #252526;
border-bottom: 1px solid #1e1e1e;
color: #cccccc;
font-size: 13px;
font-weight: 500;
}
.behavior-tree-panel-content {
flex: 1;
overflow: auto;
position: relative;
}
.behavior-tree-tabs {
display: flex;
background: #252526;
border-bottom: 1px solid #1e1e1e;
}
.behavior-tree-tab {
flex: 1;
padding: 10px 15px;
background: transparent;
border: none;
color: #969696;
font-size: 13px;
font-weight: 500;
cursor: pointer;
transition: all 0.1s ease;
position: relative;
display: flex;
align-items: center;
justify-content: center;
gap: 6px;
}
.behavior-tree-tab::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 2px;
background: transparent;
transition: background-color 0.1s ease;
}
.behavior-tree-tab:hover {
background: rgba(255, 255, 255, 0.03);
color: #e0e0e0;
}
.behavior-tree-tab.active {
color: #ffffff;
}
.behavior-tree-tab.active::after {
background: #007acc;
}
.behavior-tree-splitter {
background: linear-gradient(to right, transparent, #3e3e42 40%, #3e3e42 60%, transparent);
transition: all 0.15s ease;
cursor: col-resize;
width: 4px;
flex-shrink: 0;
}
.behavior-tree-splitter.horizontal {
background: linear-gradient(to bottom, transparent, #3e3e42 40%, #3e3e42 60%, transparent);
cursor: row-resize;
height: 4px;
width: auto;
}
.behavior-tree-splitter:hover {
background: #007acc;
}

View File

@@ -0,0 +1,58 @@
.context-menu {
position: fixed;
background: #2d2d30;
border: 1px solid #3e3e42;
border-radius: 4px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
padding: 4px 0;
min-width: 180px;
z-index: 10000;
font-size: 13px;
}
.context-menu-item {
display: flex;
align-items: center;
gap: 8px;
padding: 6px 12px;
color: #cccccc;
cursor: pointer;
transition: background-color 0.1s ease;
user-select: none;
}
.context-menu-item:hover:not(.disabled) {
background-color: #383838;
color: #ffffff;
}
.context-menu-item.disabled {
color: #666666;
cursor: not-allowed;
opacity: 0.5;
}
.context-menu-icon {
display: flex;
align-items: center;
justify-content: center;
width: 16px;
height: 16px;
flex-shrink: 0;
}
.context-menu-icon svg {
width: 16px;
height: 16px;
}
.context-menu-label {
flex: 1;
white-space: nowrap;
}
.context-menu-separator {
height: 1px;
background-color: #3e3e42;
margin: 4px 0;
}

View File

@@ -1,33 +0,0 @@
.dock-container {
width: 100%;
height: 100%;
overflow: hidden;
}
.dock-left,
.dock-right,
.dock-top,
.dock-bottom,
.dock-center {
background: var(--color-bg-base);
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
}
.dock-left {
border-right: 1px solid var(--color-border-default);
}
.dock-right {
border-left: 1px solid var(--color-border-default);
}
.dock-top {
border-bottom: 1px solid var(--color-border-default);
}
.dock-bottom {
border-top: 1px solid var(--color-border-default);
}

View File

@@ -0,0 +1,371 @@
.export-dialog-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.7);
display: flex;
align-items: center;
justify-content: center;
z-index: 10000;
backdrop-filter: blur(4px);
}
.export-dialog {
background: #1e1e1e;
border-radius: 12px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
width: 90%;
max-width: 700px;
max-height: 90vh;
overflow: hidden;
display: flex;
flex-direction: column;
border: 1px solid #3a3a3a;
}
.export-dialog-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 20px 24px;
border-bottom: 1px solid #3a3a3a;
background: #252525;
}
.export-dialog-header h3 {
margin: 0;
font-size: 18px;
font-weight: 600;
color: #ffffff;
}
.export-dialog-close {
background: transparent;
border: none;
color: #999;
cursor: pointer;
padding: 4px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 4px;
transition: all 0.2s;
}
.export-dialog-close:hover {
background: #3a3a3a;
color: #fff;
}
.export-dialog-content {
padding: 24px;
overflow-y: auto;
flex: 1;
}
.export-dialog-content::-webkit-scrollbar {
width: 10px;
}
.export-dialog-content::-webkit-scrollbar-track {
background: #1e1e1e;
}
.export-dialog-content::-webkit-scrollbar-thumb {
background: #424242;
border-radius: 5px;
}
.export-dialog-content::-webkit-scrollbar-thumb:hover {
background: #4e4e4e;
}
.export-dialog-info {
display: flex;
align-items: center;
gap: 8px;
padding: 12px 16px;
background: rgba(66, 153, 225, 0.1);
border: 1px solid rgba(66, 153, 225, 0.3);
border-radius: 8px;
color: #4299e1;
font-size: 14px;
margin-bottom: 24px;
}
.export-format-options {
display: flex;
gap: 16px;
}
.export-format-option {
flex: 1;
padding: 20px;
border: 2px solid #3a3a3a;
border-radius: 12px;
background: #252525;
cursor: pointer;
transition: all 0.2s;
display: flex;
flex-direction: column;
gap: 16px;
}
.export-format-option:hover {
border-color: #4a4a4a;
background: #2a2a2a;
}
.export-format-option.selected {
border-color: #4299e1;
background: rgba(66, 153, 225, 0.1);
}
.export-format-icon {
color: #4299e1;
display: flex;
align-items: center;
justify-content: center;
width: 60px;
height: 60px;
background: rgba(66, 153, 225, 0.1);
border-radius: 12px;
margin: 0 auto;
}
.export-format-option.selected .export-format-icon {
background: rgba(66, 153, 225, 0.2);
}
.export-format-info {
text-align: center;
}
.export-format-info h4 {
margin: 0 0 8px 0;
font-size: 16px;
font-weight: 600;
color: #ffffff;
}
.export-format-desc {
margin: 0 0 12px 0;
font-size: 14px;
color: #999;
line-height: 1.5;
}
.export-format-features {
display: flex;
flex-wrap: wrap;
gap: 6px;
justify-content: center;
margin-bottom: 12px;
}
.feature-tag {
display: inline-block;
padding: 4px 10px;
background: #3a3a3a;
border-radius: 12px;
font-size: 12px;
color: #999;
}
.feature-tag.recommended {
background: rgba(72, 187, 120, 0.2);
color: #48bb78;
font-weight: 500;
}
.export-format-option.selected .feature-tag {
background: rgba(66, 153, 225, 0.15);
color: #4299e1;
}
.export-format-option.selected .feature-tag.recommended {
background: rgba(72, 187, 120, 0.2);
color: #48bb78;
}
.export-format-extension {
font-family: 'Courier New', monospace;
font-size: 13px;
color: #4299e1;
padding: 6px 12px;
background: rgba(66, 153, 225, 0.1);
border-radius: 6px;
display: inline-block;
}
.export-dialog-footer {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 12px;
padding: 16px 24px;
border-top: 1px solid #3a3a3a;
background: #252525;
}
.export-dialog-btn {
padding: 10px 24px;
border: none;
border-radius: 6px;
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition: all 0.2s;
}
.export-dialog-btn-cancel {
background: transparent;
color: #999;
border: 1px solid #3a3a3a;
}
.export-dialog-btn-cancel:hover {
background: #2a2a2a;
border-color: #4a4a4a;
color: #fff;
}
.export-dialog-btn-primary {
background: #4299e1;
color: #ffffff;
}
.export-dialog-btn-primary:hover {
background: #3182ce;
}
.export-dialog-btn-primary:active {
background: #2c5282;
}
.export-mode-tabs {
display: flex;
border-bottom: 1px solid #3a3a3a;
margin: -24px -24px 20px -24px;
padding: 0 24px;
}
.export-mode-tab {
padding: 12px 20px;
background: transparent;
border: none;
color: #999;
font-size: 13px;
cursor: pointer;
border-bottom: 2px solid transparent;
transition: all 0.2s;
display: flex;
align-items: center;
gap: 8px;
}
.export-mode-tab:hover {
color: #ccc;
}
.export-mode-tab.active {
color: #4299e1;
border-bottom-color: #4299e1;
}
.export-section {
margin-bottom: 20px;
}
.export-section h4 {
margin: 0 0 12px 0;
font-size: 13px;
color: #ccc;
font-weight: 500;
}
.export-file-list {
max-height: 300px;
overflow-y: auto;
background: #252525;
border: 1px solid #3a3a3a;
border-radius: 6px;
padding: 8px;
}
.export-file-list::-webkit-scrollbar {
width: 10px;
}
.export-file-list::-webkit-scrollbar-track {
background: #1e1e1e;
}
.export-file-list::-webkit-scrollbar-thumb {
background: #424242;
border-radius: 5px;
}
.export-file-list::-webkit-scrollbar-thumb:hover {
background: #4e4e4e;
}
.export-file-item {
display: flex;
align-items: center;
gap: 10px;
padding: 8px;
border-radius: 4px;
transition: background 0.2s;
margin-bottom: 4px;
}
.export-file-item:last-child {
margin-bottom: 0;
}
.export-file-item:hover {
background: rgba(255, 255, 255, 0.05);
}
.export-file-item.selected {
background: rgba(66, 153, 225, 0.1);
}
.export-file-checkbox {
width: 16px;
height: 16px;
cursor: pointer;
}
.export-file-name {
flex: 1;
font-size: 12px;
color: #ccc;
font-family: 'Consolas', 'Monaco', monospace;
display: flex;
align-items: center;
gap: 6px;
}
.export-file-format {
padding: 4px 8px;
background: #2d2d2d;
border: 1px solid #3a3a3a;
border-radius: 4px;
color: #ccc;
font-size: 11px;
cursor: pointer;
outline: none;
transition: all 0.2s;
}
.export-file-format:hover {
border-color: #4a4a4a;
}
.export-file-format:focus {
border-color: #4299e1;
}

View File

@@ -0,0 +1,302 @@
.flexlayout-dock-container {
width: 100%;
height: 100%;
background: #1e1e1e;
position: relative;
overflow: hidden;
}
.flexlayout__layout {
background: #1e1e1e;
position: absolute !important;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.flexlayout__tabset {
background: #252526;
}
.flexlayout__tabset_header {
background: #252526;
border-bottom: 1px solid #1e1e1e;
height: 28px;
min-height: 28px;
}
.flexlayout__tab {
background: transparent;
color: #969696;
border: none;
padding: 0 16px;
height: 28px;
line-height: 28px;
cursor: default;
transition: all 0.1s ease;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
position: relative;
}
.flexlayout__tab::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 2px;
background: transparent;
transition: background-color 0.1s ease;
}
.flexlayout__tab:hover {
background: rgba(255, 255, 255, 0.03);
color: #e0e0e0;
}
.flexlayout__tab_button {
background: transparent !important;
color: #969696;
border: none !important;
border-right: none !important;
padding: 0 16px;
height: 28px;
cursor: pointer;
transition: all 0.1s ease;
position: relative;
}
.flexlayout__tab_button::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 2px;
background: transparent;
transition: background-color 0.1s ease;
}
.flexlayout__tab_button:hover {
background: rgba(255, 255, 255, 0.03) !important;
color: #e0e0e0;
}
.flexlayout__tab_button--selected {
background: transparent !important;
color: #ffffff !important;
border-bottom: none !important;
}
.flexlayout__tab_button--selected::after {
background: #007acc;
}
.flexlayout__tab_button_leading {
display: flex;
align-items: center;
gap: 6px;
}
.flexlayout__tab_button_content {
font-size: 12px;
font-weight: 400;
letter-spacing: 0.3px;
}
.flexlayout__tab_button--selected .flexlayout__tab_button_content {
font-weight: 500;
}
.flexlayout__tab_button_trailing {
margin-left: 8px;
opacity: 0;
transition: opacity 0.15s ease;
}
.flexlayout__tab:hover .flexlayout__tab_button_trailing {
opacity: 1;
}
.flexlayout__tab_button_trailing svg {
width: 12px;
height: 12px;
color: #cccccc;
}
.flexlayout__tab_button_trailing:hover svg {
color: #ffffff;
}
.flexlayout__tabset_tabbar_outer {
background: #2d2d30;
}
.flexlayout__tabset-selected {
background: #1e1e1e;
}
.flexlayout__splitter {
background: linear-gradient(to right, transparent, #3e3e42 40%, #3e3e42 60%, transparent);
transition: all 0.15s ease;
}
.flexlayout__splitter_horz {
background: linear-gradient(to bottom, transparent, #3e3e42 40%, #3e3e42 60%, transparent);
}
.flexlayout__splitter:hover {
background: #007acc;
}
.flexlayout__splitter_border {
background: #1e1e1e;
}
.flexlayout__outline_rect {
border: 2px solid #007acc;
box-shadow: 0 0 20px rgba(0, 122, 204, 0.5);
background: rgba(0, 122, 204, 0.1);
}
.flexlayout__edge_rect {
background: rgba(0, 122, 204, 0.3);
border: 2px solid #007acc;
}
.flexlayout__drag_rect {
border: 2px solid #007acc;
background: rgba(0, 122, 204, 0.2);
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
.flexlayout__tabset_content {
background: #1e1e1e;
overflow: auto;
}
.flexlayout__tabset_content * {
cursor: default !important;
}
.flexlayout__tabset_content button,
.flexlayout__tabset_content a,
.flexlayout__tabset_content [role="button"] {
cursor: pointer !important;
}
.flexlayout__tab_toolbar {
display: flex;
align-items: center;
gap: 4px;
padding: 0 8px;
}
.flexlayout__tab_toolbar_button {
background: transparent;
border: none;
color: #cccccc;
cursor: pointer;
padding: 4px 8px;
border-radius: 3px;
transition: background-color 0.15s ease;
}
.flexlayout__tab_toolbar_button:hover {
background: #383838;
color: #ffffff;
}
.flexlayout__tab_toolbar_button svg {
width: 14px;
height: 14px;
}
.flexlayout__popup_menu {
background: #252526;
border: 1px solid #454545;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
border-radius: 3px;
}
.flexlayout__popup_menu_item {
color: #cccccc;
padding: 8px 16px;
cursor: pointer;
transition: background-color 0.15s ease;
}
.flexlayout__popup_menu_item:hover {
background: #2a2d2e;
color: #ffffff;
}
.flexlayout__popup_menu_item:active {
background: #094771;
}
.flexlayout__border {
background: #252526;
border: 1px solid #1e1e1e;
}
.flexlayout__border_top,
.flexlayout__border_bottom {
border-left: none;
border-right: none;
}
.flexlayout__border_left,
.flexlayout__border_right {
border-top: none;
border-bottom: none;
}
.flexlayout__border_button {
background: transparent;
color: #969696;
border: none;
border-bottom: 1px solid #1e1e1e;
padding: 8px 12px;
cursor: pointer;
transition: all 0.1s ease;
position: relative;
}
.flexlayout__border_button::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 2px;
background: transparent;
transition: background-color 0.1s ease;
}
.flexlayout__border_button:hover {
background: rgba(255, 255, 255, 0.03);
color: #e0e0e0;
}
.flexlayout__border_button--selected {
background: transparent;
color: #ffffff;
}
.flexlayout__border_button--selected::after {
background: #007acc;
}
.flexlayout__error_boundary_container {
background: #1e1e1e;
color: #f48771;
padding: 16px;
font-family: monospace;
}
.flexlayout__error_boundary_message {
margin-bottom: 8px;
font-weight: 600;
}

View File

@@ -69,6 +69,12 @@
opacity: 0.5;
}
.menu-item-content {
display: flex;
align-items: center;
gap: 8px;
}
.menu-shortcut {
margin-left: 24px;
color: var(--color-text-secondary, #858585);

View File

@@ -176,7 +176,7 @@
.startup-footer {
padding: 20px 40px;
border-top: 1px solid #2d2d30;
border-top: 1px solid #1e1e1e;
}
.startup-version {

View File

@@ -1,101 +0,0 @@
.tab-panel {
display: flex;
flex-direction: column;
height: 100%;
background: var(--color-bg-base);
}
.tab-header {
background: var(--color-bg-elevated);
border-bottom: 1px solid var(--color-border-default);
min-height: 38px;
display: flex;
align-items: flex-end;
flex-shrink: 0;
}
.tab-list {
display: flex;
gap: 0;
height: 100%;
}
.tab-item {
display: flex;
align-items: center;
gap: var(--spacing-sm);
padding: var(--spacing-sm) var(--spacing-md);
background: transparent;
color: var(--color-text-secondary);
border-right: 1px solid var(--color-border-default);
cursor: pointer;
transition: all var(--transition-fast);
font-size: var(--font-size-sm);
font-weight: var(--font-weight-medium);
user-select: none;
position: relative;
}
.tab-item::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 2px;
background-color: transparent;
transition: background-color var(--transition-fast);
}
.tab-item:hover {
background: var(--color-bg-hover);
color: var(--color-text-primary);
}
.tab-item.active {
background: var(--color-bg-base);
color: var(--color-text-primary);
}
.tab-item.active::after {
background-color: var(--color-primary);
}
.tab-title {
white-space: nowrap;
}
.tab-close {
display: inline-flex;
align-items: center;
justify-content: center;
width: 16px;
height: 16px;
background: transparent;
border: none;
color: var(--color-text-tertiary);
cursor: pointer;
border-radius: var(--radius-sm);
font-size: 18px;
line-height: 1;
padding: 0;
transition: all var(--transition-fast);
opacity: 0;
}
.tab-item:hover .tab-close,
.tab-item.active .tab-close {
opacity: 1;
}
.tab-close:hover {
background: var(--color-bg-hover);
color: var(--color-error);
transform: scale(1.2);
}
.tab-content {
flex: 1;
overflow: hidden;
position: relative;
}

View File

@@ -0,0 +1,126 @@
.toast-container {
position: fixed;
bottom: 20px;
right: 20px;
z-index: 99999;
display: flex;
flex-direction: column;
gap: 12px;
pointer-events: none;
}
.toast {
display: flex;
align-items: center;
gap: 12px;
padding: 12px 16px;
background: rgba(26, 26, 26, 0.95);
border-radius: 6px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 1px rgba(255, 255, 255, 0.1);
backdrop-filter: blur(8px);
min-width: 280px;
max-width: 400px;
pointer-events: auto;
animation: toastSlideIn 0.3s cubic-bezier(0.21, 1.02, 0.73, 1) forwards;
border-left: 3px solid var(--toast-color);
}
@keyframes toastSlideIn {
from {
transform: translateX(calc(100% + 20px));
opacity: 0;
}
to {
transform: translateX(0);
opacity: 1;
}
}
.toast-icon {
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
color: var(--toast-color);
}
.toast-message {
flex: 1;
font-size: 13px;
line-height: 1.5;
color: #e0e0e0;
word-break: break-word;
}
.toast-close {
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
background: none;
border: none;
color: rgba(255, 255, 255, 0.5);
cursor: pointer;
padding: 4px;
border-radius: 3px;
transition: all 0.2s;
}
.toast-close:hover {
background: rgba(255, 255, 255, 0.1);
color: rgba(255, 255, 255, 0.8);
}
.toast-close:active {
transform: scale(0.95);
}
/* Toast 类型样式 */
.toast-success {
--toast-color: #4caf50;
border-left-color: #4caf50;
}
.toast-error {
--toast-color: #f44336;
border-left-color: #f44336;
}
.toast-warning {
--toast-color: #ff9800;
border-left-color: #ff9800;
}
.toast-info {
--toast-color: #2196f3;
border-left-color: #2196f3;
}
/* 移除时的动画 */
.toast.removing {
animation: toastSlideOut 0.3s cubic-bezier(0.21, 1.02, 0.73, 1) forwards;
}
@keyframes toastSlideOut {
from {
transform: translateX(0);
opacity: 1;
}
to {
transform: translateX(calc(100% + 20px));
opacity: 0;
}
}
/* 响应式调整 */
@media (max-width: 768px) {
.toast-container {
left: 20px;
right: 20px;
}
.toast {
min-width: unset;
max-width: unset;
}
}