Hide Discord menu entry if built without Discord integration
parent
48259da8a8
commit
e2dfcfec55
|
|
@ -11125,6 +11125,17 @@ class FSObjectExportCollada : public view_listener_t
|
|||
};
|
||||
// </FS:CR>
|
||||
|
||||
// <FS:Ansariel> Discord integration
|
||||
bool enable_discord_integration()
|
||||
{
|
||||
#if HAS_DISCORD
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
// <FS:Zi> Make sure to call this before any of the UI is set up, so all text editors can
|
||||
// pick up the menu properly.
|
||||
void initialize_edit_menu()
|
||||
|
|
@ -11843,4 +11854,7 @@ void initialize_menus()
|
|||
view_listener_t::addMenu(new FSObjectExportCollada(), "Object.ExportCollada");
|
||||
enable.add("Object.EnableExport", boost::bind(&enable_export_object));
|
||||
// </FS:Techwolf Lupindo>
|
||||
|
||||
// <FS:Ansariel> Discord integration
|
||||
enable.add("FSDiscordEnabled", std::bind(&enable_discord_integration));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -604,6 +604,8 @@
|
|||
<menu_item_call.on_click
|
||||
function="Floater.Toggle"
|
||||
parameter="fs_discord"/>
|
||||
<menu_item_call.on_visible
|
||||
function="FSDiscordEnabled"/>
|
||||
</menu_item_call>
|
||||
<menu_item_separator/>
|
||||
<menu
|
||||
|
|
|
|||
Loading…
Reference in New Issue