Skip to content

Commit

Permalink
Adding new widget in Gui Builder was partially broken because mouse c…
Browse files Browse the repository at this point in the history
…licks no longer registered on the icons or labels in the toolbox
  • Loading branch information
texus committed May 14, 2024
1 parent 9967a77 commit 521881b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gui-builder/src/GuiBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1024,9 +1024,12 @@ void GuiBuilder::loadToolbox()
for (auto& widget : widgets)
{
auto icon = tgui::Picture::create("resources/widget-icons/" + widget.first + ".png");
icon->setIgnoreMouseEvents(true);

auto name = tgui::Label::create(widget.first);
name->setPosition({icon->getSize().x * 1.1f, "50% - 10"});
name->setTextSize(14);
name->setIgnoreMouseEvents(true);

auto verticalLayout = tgui::VerticalLayout::create();
verticalLayout->setPosition(0, topPosition);
Expand Down

0 comments on commit 521881b

Please sign in to comment.