diff options
author | hnOsmium0001 <[email protected]> | 2022-05-07 17:27:01 -0700 |
---|---|---|
committer | hnOsmium0001 <[email protected]> | 2022-05-07 17:27:01 -0700 |
commit | 921f756855b9e19363cb79355d12bb8d683ffc06 (patch) | |
tree | 55b2cac14f3498e36860039b8c8c3ea698c7db82 /source/Ires.cpp | |
parent | 1d924459c84b9d5fbd6c08743f733abad5a03c2b (diff) |
Reduce dependency between editor headers and main game headers
Diffstat (limited to 'source/Ires.cpp')
-rw-r--r-- | source/Ires.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/Ires.cpp b/source/Ires.cpp index 0421a54..7a99be3 100644 --- a/source/Ires.cpp +++ b/source/Ires.cpp @@ -94,7 +94,7 @@ void IresObject::ShowName() const { } } -void IresObject::ShowReferenceSafe(EditorInstance& editor, IresObject* ires) { +void IresObject::ShowReferenceSafe(IEditor& editor, IresObject* ires) { if (ires) { ires->ShowReference(editor); } else { @@ -102,14 +102,14 @@ void IresObject::ShowReferenceSafe(EditorInstance& editor, IresObject* ires) { } } -void IresObject::ShowReferenceNull(EditorInstance& editor) { +void IresObject::ShowReferenceNull(IEditor& editor) { ImGui::PushStyleColor(ImGuiCol_Text, ImGui::GetStyle().Colors[ImGuiCol_ButtonHovered]); ImGui::Text("<null>"); ImGui::PopStyleColor(); ImGui::AddUnderLine(ImGui::GetStyle().Colors[ImGuiCol_Button]); } -void IresObject::ShowReference(EditorInstance& editor) { +void IresObject::ShowReference(IEditor& editor) { ImGui::PushStyleColor(ImGuiCol_Text, ImGui::GetStyle().Colors[ImGuiCol_ButtonHovered]); if (IsAnnoymous()) { ImGui::Text("<annoymous %p>", (void*)this); @@ -119,7 +119,7 @@ void IresObject::ShowReference(EditorInstance& editor) { ImGui::PopStyleColor(); if (ImGui::IsItemHovered()) { if (ImGui::IsMouseClicked(ImGuiMouseButton_Left)) { - editor.GetInspector().SelectTarget(EditorInspector::ITT_Ires, this); + editor.GetInspector().SelectTarget(IEditorInspector::ITT_Ires, this); } ImGui::AddUnderLine(ImGui::GetStyle().Colors[ImGuiCol_ButtonHovered]); } else { @@ -127,7 +127,7 @@ void IresObject::ShowReference(EditorInstance& editor) { } } -void IresObject::ShowEditor(EditorInstance& editor) { +void IresObject::ShowEditor(IEditor& editor) { ImGui::Text("%s", ToString(mKind).data()); bool isAnnoymous = mName.empty(); |