X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fnetradiant.git;a=blobdiff_plain;f=contrib%2Fbobtoolz%2FbobToolz-GTK.cpp;h=78f4a5b3e5a9c3c3da1e9384672c56747a229a04;hp=be4f7804c67f41e929d5a7b6c54c06d305589983;hb=d40c79f30c4029daa1f92e07b728518911a98d5e;hpb=107765f0e4b543dfc346851ee5b4605cc17eb1c6 diff --git a/contrib/bobtoolz/bobToolz-GTK.cpp b/contrib/bobtoolz/bobToolz-GTK.cpp index be4f7804..78f4a5b3 100644 --- a/contrib/bobtoolz/bobToolz-GTK.cpp +++ b/contrib/bobtoolz/bobToolz-GTK.cpp @@ -62,7 +62,7 @@ void BobToolz_destroy() 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,Turn edge"; +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"; // globals GtkWidget *g_pRadiantWnd = NULL; @@ -106,6 +106,10 @@ extern "C" void QERPlug_Dispatch (const char *p, vec3_t vMin, vec3_t vMax, bool DoMergePatches(); } else if( string_equal_nocase( p, "split patches" ) ) { DoSplitPatch(); + } else if( string_equal_nocase( p, "split patches rows" ) ) { + DoSplitPatchRows(); + } else if( string_equal_nocase( p, "split patches cols" ) ) { + DoSplitPatchCols(); } else if( string_equal_nocase( p, "turn edge" ) ) { DoFlipTerrain(); } else if( string_equal_nocase(p, "reset textures...") ) { @@ -114,6 +118,16 @@ extern "C" void QERPlug_Dispatch (const char *p, vec3_t vMin, vec3_t vMax, bool DoPitBuilder(); } else if( string_equal_nocase(p, "vis viewer") ) { DoVisAnalyse(); + } else if( string_equal_nocase(p, "stair builder...") ) { + DoBuildStairs(); + } else if( string_equal_nocase(p, "door builder...") ) { + DoBuildDoors(); + } else if( string_equal_nocase(p, "intersect...") ) { + DoIntersect(); + } else if( string_equal_nocase(p, "make chain...") ) { + DoMakeChain(); + } else if( string_equal_nocase(p, "path plotter...") ) { + DoPathPlotter(); } else if( string_equal_nocase(p, "about...") ) { DoMessageBox(PLUGIN_ABOUT, "About", eMB_OK); } @@ -125,7 +139,7 @@ const char* QERPlug_GetCommandTitleList() } -#define NUM_TOOLBARBUTTONS 9 +#define NUM_TOOLBARBUTTONS 14 std::size_t ToolbarButtonCount( void ) { return NUM_TOOLBARBUTTONS; @@ -137,22 +151,30 @@ 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 3: return "bobtoolz_treeplanter.bmp"; - case 4: return "bobtoolz_trainpathplot.bmp"; - case 5: return "bobtoolz_dropent.bmp"; - case 6: return "bobtoolz_merge.bmp"; - case 7: return "bobtoolz_split.bmp"; - case 8: return "bobtoolz_turnedge.bmp"; + case 0: return "bobtoolz_cleanup.bmp"; + case 1: return "bobtoolz_poly.bmp"; + case 2: return "bobtoolz_caulk.bmp"; + case 3: return ""; + case 4: return "bobtoolz_treeplanter.bmp"; + case 5: return "bobtoolz_trainpathplot.bmp"; + case 6: return "bobtoolz_dropent.bmp"; + 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 12: return ""; + case 13: return "bobtoolz_turnedge.bmp"; } return NULL; } virtual EType getType() const { switch( mIndex ) { - case 3: return eToggleButton; + case 3: return eSpace; + case 4: return eToggleButton; + case 7: return eSpace; + case 12: return eSpace; default: return eButton; } } @@ -162,12 +184,14 @@ public: case 0: return "Cleanup"; case 1: return "Polygons"; case 2: return "Caulk"; - case 3: return "Tree Planter"; - case 4: return "Plot Splines"; - case 5: return "Drop Entity"; - case 6: return "Merge Patches"; - case 7: return "Split Patches"; - case 8: return "Flip Terrain"; + case 4: return "Tree Planter"; + case 5: return "Plot Splines"; + case 6: return "Drop Entity"; + case 8: return "Merge 2 Patches"; + case 9: return "Split Patch"; + case 10: return "Split Patch Rows"; + case 11: return "Split Patch Columns"; + case 13: return "Flip Terrain"; } return NULL; } @@ -177,12 +201,14 @@ public: case 0: return "Brush Cleanup"; case 1: return "Polygons"; case 2: return "Caulk selection"; - case 3: return "Tree Planter"; - case 4: return "Plot Splines"; - case 5: return "Drop Entity"; - case 6: return "Merge Patches"; - case 7: return "Split Patches"; - case 8: return "Flip Terrain"; + case 4: return "Tree Planter"; + case 5: return "Plot Splines"; + case 6: return "Drop Entity"; + case 8: return "Merge 2 Patches"; + case 9: return "Split Patch"; + case 10: return "Split Patch Rows"; + case 11: return "Split Patch Columns"; + case 13: return "Flip Terrain (Turn Edge)"; } return NULL; } @@ -195,12 +221,14 @@ public: case 0: DoFixBrushes(); break; case 1: DoPolygonsTB(); break; case 2: DoCaulkSelection(); break; - case 3: DoTreePlanter(); break; - case 4: DoTrainPathPlot(); break; - case 5: DoDropEnts(); break; - case 6: DoMergePatches(); break; - case 7: DoSplitPatch(); break; - case 8: DoFlipTerrain(); break; + case 4: DoTreePlanter(); break; + case 5: DoTrainPathPlot(); break; + case 6: DoDropEnts(); break; + case 8: DoMergePatches(); break; + case 9: DoSplitPatch(); break; + case 10: DoSplitPatchRows(); break; + case 11: DoSplitPatchCols(); break; + case 13: DoFlipTerrain(); break; } } @@ -259,7 +287,7 @@ class BobToolzPluginModule : public TypeSystemRef _QERPluginTable m_plugin; public: typedef _QERPluginTable Type; - STRING_CONSTANT(Name, "bobtoolz"); + STRING_CONSTANT(Name, "bobToolz"); BobToolzPluginModule() { @@ -291,7 +319,7 @@ class BobToolzToolbarDependencies : { public: BobToolzToolbarDependencies() : - ModuleRef<_QERPluginTable>("bobtoolz") + ModuleRef<_QERPluginTable>("bobToolz") { } }; @@ -301,7 +329,7 @@ class BobToolzToolbarModule : public TypeSystemRef _QERPlugToolbarTable m_table; public: typedef _QERPlugToolbarTable Type; - STRING_CONSTANT(Name, "bobtoolz"); + STRING_CONSTANT(Name, "bobToolz"); BobToolzToolbarModule() {