}
// plugin name
-char* PLUGIN_NAME = "bobToolz";
+const char* PLUGIN_NAME = "bobToolz";
// commands in the menu
-static char* PLUGIN_COMMANDS = "About...,-,Reset Textures...,PitOMatic,-,Vis Viewer,Brush Cleanup,Polygon Builder,Caulk Selection,-,Tree Planter,Drop Entity,Plot Splines,-,Merge Patches,Split patches,Split patches cols,Split patches rows,Turn edge";
+static const char* PLUGIN_COMMANDS = "About...,-,Reset Textures...,PitOMatic,-,Vis Viewer,Brush Cleanup,Polygon Builder,Caulk Selection,-,Tree Planter,Drop Entity,Plot Splines,-,Merge Patches,Split patches,Split patches cols,Split patches rows,Turn edge";
// globals
-GtkWidget *g_pRadiantWnd = NULL;
+ui::Window g_pRadiantWnd{ui::null};
static const char *PLUGIN_ABOUT = "bobToolz for SDRadiant\n"
"by digibob (digibob@splashdamage.com)\n"
"MarsMattel, RR2DO2\n";
extern "C" const char* QERPlug_Init( void* hApp, void* pMainWidget ) {
- g_pRadiantWnd = (GtkWidget*)pMainWidget;
+ g_pRadiantWnd = ui::Window::from(pMainWidget);
return "bobToolz for GTKradiant";
}
}
-#define NUM_TOOLBARBUTTONS 14
+const int NUM_TOOLBARBUTTONS = 14;
std::size_t ToolbarButtonCount( void ) {
return NUM_TOOLBARBUTTONS;
public:
virtual const char* getImage() const {
switch ( mIndex ) {
- case 0: return "bobtoolz_cleanup.bmp";
- case 1: return "bobtoolz_poly.bmp";
- case 2: return "bobtoolz_caulk.bmp";
+ case 0: return "bobtoolz_cleanup.png";
+ case 1: return "bobtoolz_poly.png";
+ case 2: return "bobtoolz_caulk.png";
case 3: return "";
- case 4: return "bobtoolz_treeplanter.bmp";
- case 5: return "bobtoolz_trainpathplot.bmp";
- case 6: return "bobtoolz_dropent.bmp";
+ case 4: return "bobtoolz_treeplanter.png";
+ case 5: return "bobtoolz_trainpathplot.png";
+ case 6: return "bobtoolz_dropent.png";
case 7: return "";
- case 8: return "bobtoolz_merge.bmp";
- case 9: return "bobtoolz_split.bmp";
- case 10: return "bobtoolz_splitrow.bmp";
- case 11: return "bobtoolz_splitcol.bmp";
+ case 8: return "bobtoolz_merge.png";
+ case 9: return "bobtoolz_split.png";
+ case 10: return "bobtoolz_splitrow.png";
+ case 11: return "bobtoolz_splitcol.png";
case 12: return "";
- case 13: return "bobtoolz_turnedge.bmp";
+ case 13: return "bobtoolz_turnedge.png";
}
return NULL;
}
public:
BobToolzPluginDependencies() :
GlobalEntityModuleRef( GlobalRadiant().getRequiredGameDescriptionKeyValue( "entities" ) ),
+ GlobalEntityClassManagerModuleRef( GlobalRadiant().getRequiredGameDescriptionKeyValue( "entityclass" ) ),
GlobalShadersModuleRef( GlobalRadiant().getRequiredGameDescriptionKeyValue( "shaders" ) ),
GlobalBrushModuleRef( GlobalRadiant().getRequiredGameDescriptionKeyValue( "brushtypes" ) ),
- GlobalPatchModuleRef( GlobalRadiant().getRequiredGameDescriptionKeyValue( "patchtypes" ) ),
- GlobalEntityClassManagerModuleRef( GlobalRadiant().getRequiredGameDescriptionKeyValue( "entityclass" ) ){
+ GlobalPatchModuleRef( GlobalRadiant().getRequiredGameDescriptionKeyValue( "patchtypes" ) ){
}
};