feat(editor): 添加 ECS UI 系统和编辑器更新优化 (#238)

This commit is contained in:
YHH
2025-11-26 11:08:10 +08:00
committed by GitHub
parent 3fb6f919f8
commit 7b14fa2da4
62 changed files with 8745 additions and 235 deletions

View File

@@ -515,9 +515,7 @@
}
.component-dropdown {
position: absolute;
top: calc(100% + 4px);
right: 0;
position: fixed;
min-width: 220px;
max-height: 320px;
background: var(--color-bg-elevated);
@@ -540,17 +538,33 @@
}
}
.component-dropdown-header {
padding: 10px 12px;
font-size: 11px;
font-weight: 600;
color: var(--color-text-secondary);
text-transform: uppercase;
letter-spacing: 0.05em;
.component-dropdown-search {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 12px;
border-bottom: 1px solid var(--color-border-default);
background: var(--color-bg-base);
}
.component-dropdown-search svg {
color: var(--color-text-tertiary);
flex-shrink: 0;
}
.component-dropdown-search input {
flex: 1;
background: transparent;
border: none;
outline: none;
color: var(--color-text-primary);
font-size: 12px;
}
.component-dropdown-search input::placeholder {
color: var(--color-text-tertiary);
}
.component-dropdown-empty {
padding: 16px 12px;
text-align: center;
@@ -589,6 +603,41 @@
margin-bottom: 0;
}
.component-category-header {
display: flex;
align-items: center;
gap: 6px;
width: 100%;
padding: 8px 12px;
background: var(--color-bg-base);
border: none;
color: var(--color-text-secondary);
font-size: 11px;
font-weight: 600;
cursor: pointer;
text-align: left;
transition: all var(--transition-fast);
}
.component-category-header:hover {
background: var(--color-bg-hover);
color: var(--color-text-primary);
}
.component-category-header svg {
color: var(--color-text-tertiary);
}
.component-category-count {
margin-left: auto;
padding: 1px 6px;
background: var(--color-bg-inset);
border-radius: 10px;
font-size: 10px;
font-weight: 500;
color: var(--color-text-tertiary);
}
.component-category-label {
padding: 6px 12px 4px;
font-size: 10px;
@@ -600,10 +649,11 @@
.component-dropdown-item {
display: flex;
flex-direction: column;
align-items: flex-start;
flex-direction: row;
align-items: center;
gap: 8px;
width: 100%;
padding: 8px 12px;
padding: 6px 12px 6px 28px;
background: transparent;
border: none;
color: var(--color-text-primary);
@@ -612,6 +662,11 @@
transition: all 0.1s ease;
}
.component-dropdown-item svg {
color: var(--color-text-tertiary);
flex-shrink: 0;
}
.component-dropdown-item:hover {
background: var(--color-bg-hover);
}
@@ -637,7 +692,7 @@
background: #2a2a2f;
border: none;
border-radius: 0;
overflow: hidden;
overflow: visible;
transition: none;
border-left: 3px solid #4a4a50;
}
@@ -729,7 +784,7 @@
padding: 6px 8px 8px 8px;
border-top: 1px solid rgba(255, 255, 255, 0.05);
background: #1e1e23;
overflow: hidden;
overflow: visible;
min-width: 0;
}