I have a Fl_Menu_Button with some menu items inside it. The menu items look like this:
{ {"label", 0, reinterpret_cast<Fl_Callback*>(callback), 0, FL_MENU_TOGGLE}, {nullptr}}
callback looks like this:
void callback(Fl_Menu_Item* o, void* v)
{
std::cout << o->value() << std::endl;
}
For whatever reason, it always returns FL_MENU_VALUE (4), regardless of whether I checked or unchecked the box. From the docs it says it should return 0 if the item is not checked. Where have I gone wrong?