Sounds good. That's kind of what I thought, but I figured it doesn't hurt to get your opinion on it first. I'll send a PR whenever I get around to making it work the way I want. Thanks, Texus!
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
void rightClickMenuCreate(tgui::Gui& gui, sf::Vector2f position, tgui::Theme::Ptr& theme, std::vector<std::string>&& options)
{
popumMenu = theme->load("ListBox");
std::size_t Max = 0;
for (const auto& i: options)
{
popumMenu->addItem(i);
Max = std::max(Max, WIDTH_OF_I);//<-------
}
popumMenu->setItemHeight(25);
popumMenu->setPosition(position);
popumMenu->setOpacity(0.8f);
popumMenu->setSize(Max, popumMenu->getItemHeight() * popumMenu->getItemCount() + popumMenu->getRenderer()->getPadding().top * 2);
popumMenu->connectEx("MouseReleased", [&](const tgui::Callback& e){rightClickMenuHandle(e.text); gui.remove(popumMenu); popumMenu = nullptr;});
popumMenu->showWithEffect(tgui::ShowAnimationType::Fade, sf::milliseconds(275));
gui.add(popumMenu);
}
In instantiation of 'struct std::_Bind_check_arity<void (tgui::ComboBox::*)(), tgui::ComboBox*&, int>':
(SNIP template redundancy stuff)
required from 'unsigned int tgui::SignalWidgetBase::connect(const string&, Func, Args ...) [with Func = void (tgui::ComboBox::*)(); Args = {tgui::ComboBox*}; std::__cxx11::string = std::__cxx11::basic_string<char>]'
C:\Users\Cody\Downloads\TGUI-0.7-dev\TGUI-0.7-dev\src\TGUI\ComboBox.cpp:505:92: required from here
c:\mingw\mingw\include\c++\5.1.0\functional:1426:7: error: static assertion failed: Wrong number of arguments for pointer-to-member
static_assert(_Varargs::value