Components can be removed

master
Joey Pollack 3 years ago
parent 2bf786ac9d
commit 82dc6b000a

@ -15,10 +15,6 @@
namespace lunarium { namespace editor 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 // COMMON SECTIONS
///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////
@ -33,6 +29,9 @@ namespace lunarium { namespace editor
ImGui::SameLine(); ImGui::SameLine();
std::string label = "X##"; std::string label = "X##";
label += title; label += title;
float x = ImGui::GetCursorPosX();
x += ImGui::GetContentRegionAvail().x;
ImGui::SetCursorPosX(x - 25);
return ImGui::Button(label.c_str()); return ImGui::Button(label.c_str());
} }

Loading…
Cancel
Save