#include "dialogs/dialogs-gtk.h"
+#define PLUGIN_NAME "ctfTools"
+#define CMD_ABOUT = "About..."
+
// Radiant function table
_QERFuncTable_1 g_FuncTable;
_QERAppBSPFrontendTable g_BSPTable; // for map name
BOOL g_bBSPInitDone = FALSE;
-// plugin name
-static const char *PLUGIN_NAME = "ctfToolz";
-
// commands in the menu
-static const char *PLUGIN_COMMANDS = "About...,Colour Changer...,Swap Light Colours,Change Angles 180,Swap Spawn Points";
+static const char *PLUGIN_COMMANDS = ABOUT_CMD ",Colour Changer...,Swap Light Colours,Change Angles 180,Swap Spawn Points";
// globals
-GtkWidget *g_pRadiantWnd = NULL;
-
-static const char *PLUGIN_ABOUT = "ctfToolz for NetRadiant\n"
- "by djbob\n"
- "http://www.planetquake.com/toolz\n\n";
+GtkWidget *main_window = NULL;
extern "C" LPVOID WINAPI QERPlug_GetFuncTable(){
return &g_FuncTable;
}
extern "C" LPCSTR WINAPI QERPlug_Init( HMODULE hApp, GtkWidget* pMainWidget ){
- g_pRadiantWnd = pMainWidget;
+ main_window = pMainWidget;
memset( &g_FuncTable, 0, sizeof( _QERFuncTable_1 ) );
g_FuncTable.m_fVersion = QER_PLUG_VERSION;
g_FuncTable.m_nSize = sizeof( _QERFuncTable_1 );
}
}
- if ( !strcmp( p, "About..." ) ) {
- DoMessageBox( PLUGIN_ABOUT, "About", IDOK );
+ if ( !strcmp( p, CMD_ABOUT ) ) {
+ const char *label_text =
+ PLUGIN_NAME for " RADIANT_NAME "\n\n"
+ "Written by djbob\n\n"
+// 20190605 dead link
+// "http://www.planetquake.com/toolz\n\n"
+ "Built against "
+ RADIANT_NAME " " RADIANT_VERSION "\n"
+ __DATE__;
+
+ GlobalRadiant().m_pfnMessageBox( main_window, label_text,
+ "About " PLUGIN_NAME,
+ eMB_OK,
+ eMB_ICONDEFAULT );
}
else if ( !strcmp( p, "Colour Changer..." ) ) {
DoCTFColourChanger();