bob_env.useGtk2()
bob_env.Install(INSTALL + '/plugins', bob_lib)
-#camera_lst = build_list('contrib/camera',
+#camera_lst = build_list('contrib/camera',
#'camera.cpp dialogs.cpp dialogs_common.cpp funchandlers.cpp listener.cpp misc.cpp renderer.cpp')
#camera_lst.append('libs/libsplines.a')
#bob_env.SharedLibrarySafe(target='camera', source=camera_lst)
sunplug_env.Install(INSTALL + '/plugins', sunplug_lib)
ufoai_env = module_env.Copy()
-ufoai_lst = build_list('contrib/ufoai', 'ufoai.cpp ufoai_filters.cpp ufoai_gtk.cpp ufoai_level.cpp')
+ufoai_lst = build_list('contrib/ufoaiplug', 'ufoai.cpp ufoai_filters.cpp ufoai_gtk.cpp ufoai_level.cpp')
ufoai_env.useGlib2()
ufoai_env.useGtk2()
-ufoai_lib = ufoai_env.SharedLibrarySafe(target='ufoai', source=ufoai_lst, LIBPATH='libs')
+ufoai_lib = ufoai_env.SharedLibrarySafe(target='ufoaiplug', source=ufoai_lst, LIBPATH='libs')
ufoai_env.Install(INSTALL + '/plugins', ufoai_lib)
shaderplug_env = module_env.Copy()
UFOAIToolbarModule()
{
- m_table.m_pfnToolbarButtonCount = ToolbarButtonCount;
- m_table.m_pfnGetToolbarButton = GetToolbarButton;
+ if (!strcmp(GlobalRadiant().getGameDescriptionKeyValue("name"), "UFO:Alien Invasion")) {
+ m_table.m_pfnToolbarButtonCount = ToolbarButtonCount;
+ m_table.m_pfnGetToolbarButton = GetToolbarButton;
+ }
+ else
+ {
+ m_table.m_pfnToolbarButtonCount = ToolbarNoButtons;
+ m_table.m_pfnGetToolbarButton = GetToolbarNoButton;
+ }
}
_QERPlugToolbarTable* getTable()
{
return NUM_TOOLBARBUTTONS;
}
+/**
+ * @brief Used if the ufo plugin should not be visible (at least the toolbar stuff)
+ */
+std::size_t ToolbarNoButtons (void)
+{
+ return 0;
+}
+
/**
* @brief
*/
g_ufoaiToolbarButtons[index].mIndex = index;
return &g_ufoaiToolbarButtons[index];
}
+
+/**
+ * @brief
+ */
+const IToolbarButton* GetToolbarNoButton(std::size_t index)
+{
+ return NULL;
+}
#include <gtk/gtk.h>
const IToolbarButton* GetToolbarButton(std::size_t index);
+const IToolbarButton* GetToolbarNoButton(std::size_t index);
std::size_t ToolbarButtonCount(void);
+std::size_t ToolbarNoButtons(void);
#endif