editor: animation editing

This commit is contained in:
Turánszki János
2022-08-12 18:41:38 +02:00
parent af465d77a4
commit 56e2fe3845
10 changed files with 500 additions and 51 deletions
+8
View File
@@ -54,6 +54,7 @@ void ComponentsWindow::Create(EditorComponent* _editor)
newComponentCombo.AddItem("Decal " ICON_DECAL, 11);
newComponentCombo.AddItem("Weather " ICON_WEATHER, 12);
newComponentCombo.AddItem("Force Field " ICON_FORCE, 13);
newComponentCombo.AddItem("Animation " ICON_ANIMATION, 14);
newComponentCombo.OnSelect([=](wi::gui::EventArgs args) {
newComponentCombo.SetSelectedWithoutCallback(0);
if (editor->translator.selected.empty())
@@ -125,6 +126,10 @@ void ComponentsWindow::Create(EditorComponent* _editor)
if (scene.forces.Contains(entity))
return;
break;
case 14:
if (scene.animations.Contains(entity))
return;
break;
default:
return;
}
@@ -186,6 +191,9 @@ void ComponentsWindow::Create(EditorComponent* _editor)
case 13:
scene.forces.Create(entity);
break;
case 14:
scene.animations.Create(entity);
break;
default:
break;
}