Added Copy/Paste of component values, scene name display, editor config #300
|
@ -84,8 +84,7 @@ namespace SHADE
|
|||
editor->selectedEntities.clear();
|
||||
}
|
||||
ImGui::SeparatorEx(ImGuiSeparatorFlags_Horizontal);
|
||||
if (ImGui::IsWindowFocused())
|
||||
{
|
||||
|
||||
if (ImGui::IsKeyDown(ImGuiKey_LeftCtrl) && ImGui::IsKeyReleased(ImGuiKey_A))
|
||||
{
|
||||
SelectAllEntities();
|
||||
|
@ -110,7 +109,6 @@ namespace SHADE
|
|||
{
|
||||
DeleteSelectedEntities();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if(ImGui::IsWindowHovered() && !ImGui::IsAnyItemHovered() && ImGui::IsMouseReleased(ImGuiMouseButton_Left))
|
||||
|
|
|
@ -162,26 +162,7 @@ namespace SHADE
|
|||
RenderUnsavedChangesPrompt();
|
||||
//PollPicking();
|
||||
|
||||
if(ImGui::IsKeyDown(ImGuiKey_LeftShift) && ImGui::IsKeyDown(ImGuiKey_LeftCtrl) && ImGui::IsKeyReleased(ImGuiKey_Z))
|
||||
{
|
||||
SHCommandManager::RedoCommand();
|
||||
}
|
||||
else if(ImGui::IsKeyDown(ImGuiKey_LeftCtrl) && ImGui::IsKeyReleased(ImGuiKey_Z))
|
||||
{
|
||||
SHCommandManager::UndoCommand();
|
||||
}
|
||||
if(ImGui::IsKeyReleased(ImGuiKey_F5))
|
||||
{
|
||||
Play();
|
||||
}
|
||||
else if (ImGui::IsKeyReleased(ImGuiKey_F6))
|
||||
{
|
||||
Pause();
|
||||
}
|
||||
else if (ImGui::IsKeyReleased(ImGuiKey_F7))
|
||||
{
|
||||
Stop();
|
||||
}
|
||||
ProcessShortcuts();
|
||||
|
||||
Render();
|
||||
}
|
||||
|
@ -669,6 +650,37 @@ namespace SHADE
|
|||
LoadScene(SHSceneManager::GetCurrentSceneAssetID());
|
||||
}
|
||||
|
||||
void SHEditor::ProcessShortcuts()
|
||||
{
|
||||
if(ImGui::IsKeyDown(ImGuiKey_LeftCtrl))
|
||||
{
|
||||
if(ImGui::IsKeyReleased(ImGuiKey_S))
|
||||
{
|
||||
SaveScene();
|
||||
}
|
||||
}
|
||||
if (ImGui::IsKeyDown(ImGuiKey_LeftShift) && ImGui::IsKeyDown(ImGuiKey_LeftCtrl) && ImGui::IsKeyReleased(ImGuiKey_Z))
|
||||
{
|
||||
SHCommandManager::RedoCommand();
|
||||
}
|
||||
else if (ImGui::IsKeyDown(ImGuiKey_LeftCtrl) && ImGui::IsKeyReleased(ImGuiKey_Z))
|
||||
{
|
||||
SHCommandManager::UndoCommand();
|
||||
}
|
||||
if (ImGui::IsKeyReleased(ImGuiKey_F5))
|
||||
{
|
||||
Play();
|
||||
}
|
||||
else if (ImGui::IsKeyReleased(ImGuiKey_F6))
|
||||
{
|
||||
Pause();
|
||||
}
|
||||
else if (ImGui::IsKeyReleased(ImGuiKey_F7))
|
||||
{
|
||||
Stop();
|
||||
}
|
||||
}
|
||||
|
||||
void SHEditor::NewFrame()
|
||||
{
|
||||
SDL_Event event;
|
||||
|
|
|
@ -123,6 +123,8 @@ namespace SHADE
|
|||
void Pause();
|
||||
void Stop();
|
||||
|
||||
void ProcessShortcuts();
|
||||
|
||||
// List of selected entities
|
||||
std::vector<EntityID> selectedEntities;
|
||||
|
||||
|
|
|
@ -175,9 +175,9 @@ namespace SHADE
|
|||
if (ComponentType* component = SHComponentManager::GetComponent_s<ComponentType>(eid))
|
||||
{
|
||||
node = SHSerializationHelper::SerializeComponentToNode(component);
|
||||
}
|
||||
componentsNode[rttr::type::get<ComponentType>().get_name().data()] = node;
|
||||
}
|
||||
}
|
||||
|
||||
YAML::Node SHSerialization::SerializeEntityToNode(SHSceneNode* sceneNode)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue