From: Thomas Debesse Date: Sat, 4 Apr 2020 01:23:47 +0000 (+0200) Subject: contrib/bobtoolz: unify about dialog construction X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=04236f5bd863c69814ee58414d99da818f62a60d;p=xonotic%2Fnetradiant.git contrib/bobtoolz: unify about dialog construction --- diff --git a/contrib/bobtoolz/bobToolz-GTK.cpp b/contrib/bobtoolz/bobToolz-GTK.cpp index 8723a3b2..ab78ffdc 100644 --- a/contrib/bobtoolz/bobToolz-GTK.cpp +++ b/contrib/bobtoolz/bobToolz-GTK.cpp @@ -64,15 +64,6 @@ static const char* PLUGIN_COMMANDS = "About...,-,Reset Textures...,PitOMatic,-,V // globals ui::Window g_pRadiantWnd{ui::null}; -static const char *PLUGIN_ABOUT = - PLUGIN_NAME " for " - RADIANT_NAME " " RADIANT_VERSION "\n\n" - "by digibob (http://www.splashdamage.com)\n\n" - "Additional Contributors: MarsMattel, RR2DO2\n\n" - "Built against " - RADIANT_NAME " " RADIANT_VERSION_STRING "\n" - __DATE__; - extern "C" const char* QERPlug_Init( void* hApp, void* pMainWidget ) { g_pRadiantWnd = ui::Window::from(pMainWidget); @@ -148,7 +139,19 @@ extern "C" void QERPlug_Dispatch( const char *p, vec3_t vMin, vec3_t vMax, bool DoPathPlotter(); } else if ( string_equal_nocase( p, "about..." ) ) { - DoMessageBox( PLUGIN_ABOUT, "About", eMB_OK ); + static const char *label_text = + PLUGIN_NAME " for " + RADIANT_NAME " " RADIANT_VERSION "\n\n" + "by digibob (http://www.splashdamage.com)\n\n" + "Additional Contributors: MarsMattel, RR2DO2\n\n" + "Built against " + RADIANT_NAME " " RADIANT_VERSION_STRING "\n" + __DATE__; + + GlobalRadiant().m_pfnMessageBox( g_pRadiantWnd, label_text, + "About " PLUGIN_NAME, + eMB_OK, + eMB_ICONDEFAULT ); } } diff --git a/contrib/bobtoolz/ctfToolz-GTK.cpp b/contrib/bobtoolz/ctfToolz-GTK.cpp index 54a5efca..66b852d9 100644 --- a/contrib/bobtoolz/ctfToolz-GTK.cpp +++ b/contrib/bobtoolz/ctfToolz-GTK.cpp @@ -39,16 +39,6 @@ static const char *PLUGIN_COMMANDS = ABOUT_CMD ",Colour Changer...,Swap Light Co // globals GtkWidget *g_pRadiantWnd = NULL; -static const char *PLUGIN_ABOUT = - PLUGIN_NAME for " RADIANT_NAME "\n\n" - "Written by djbob\n\n" -// 20190605 dead link -// "http://www.planetquake.com/toolz\n\n" -// http://web.archive.org/web/20140109083123/http://planetquake.gamespy.com/toolz - "Built against " - RADIANT_NAME " " RADIANT_VERSION "\n" - __DATE__; - extern "C" LPVOID WINAPI QERPlug_GetFuncTable(){ return &g_FuncTable; } @@ -86,7 +76,19 @@ extern "C" void WINAPI QERPlug_Dispatch( LPCSTR p, vec3_t vMin, vec3_t vMax, boo } if ( !strcmp( p, CMD_ABOUT ) ) { - DoMessageBox( PLUGIN_ABOUT, "About", IDOK ); + 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( g_pRadiantWnd, label_text, + "About " PLUGIN_NAME, + eMB_OK, + eMB_ICONDEFAULT ); } else if ( !strcmp( p, "Colour Changer..." ) ) { DoCTFColourChanger();