diff --git a/src/run_modes/editor/component_guis.cpp b/src/run_modes/editor/component_guis.cpp index 3123aef..1fe78fc 100644 --- a/src/run_modes/editor/component_guis.cpp +++ b/src/run_modes/editor/component_guis.cpp @@ -15,10 +15,6 @@ namespace lunarium { namespace editor { - // TODO: Add an X button on the right of the title line to remove components - // Will need to have the functions return a bool indicating when this - // button is pressed - ///////////////////////////////////////////////////////////////////// // COMMON SECTIONS ///////////////////////////////////////////////////////////////////// @@ -33,6 +29,9 @@ namespace lunarium { namespace editor ImGui::SameLine(); std::string label = "X##"; label += title; + float x = ImGui::GetCursorPosX(); + x += ImGui::GetContentRegionAvail().x; + ImGui::SetCursorPosX(x - 25); return ImGui::Button(label.c_str()); }