From 9fcdfe312fd9809a1cd52c08e7d8d7bd991a9fb3 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Sat, 7 May 2022 17:27:01 -0700 Subject: Changeset: 25 Reduce dependency between editor headers and main game headers --- source/Ires.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source/Ires.cpp') 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(""); 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("", (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(); -- cgit v1.2.3-70-g09d2