#include "dialogs/dialogs-gtk.h"
#include "../../libs/cmdlib.h"
+#define PLUGIN_NAME "bobToolz"
+
void BobToolz_construct(){
}
}
}
-// plugin name
-const char* PLUGIN_NAME = "bobToolz";
-
// commands in the menu
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
ui::Window g_pRadiantWnd{ui::null};
-static const char *PLUGIN_ABOUT = "bobToolz for SDRadiant\n"
- "by digibob (digibob@splashdamage.com)\n"
- "http://www.splashdamage.com\n\n"
- "Additional Contributors:\n"
- "MarsMattel, RR2DO2\n";
+static const char *PLUGIN_ABOUT =
+ PLUGIN_NAME " for "
+ RADIANT_NAME " " RADIANT_VERSION "\n\n"
+ "by digibob <digibob@splashdamage.com> (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);
- return "bobToolz for GTKradiant";
+ return PLUGIN_NAME " for " RADIANT_NAME;
}
extern "C" const char* QERPlug_GetName() {
#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 " RADIANT_NAME "\n"
- "by djbob\n"
- "http://www.planetquake.com/toolz\n\n";
+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;
}
}
- if ( !strcmp( p, "About..." ) ) {
+ if ( !strcmp( p, CMD_ABOUT ) ) {
DoMessageBox( PLUGIN_ABOUT, "About", IDOK );
}
else if ( !strcmp( p, "Colour Changer..." ) ) {
#include "typesystem.h"
+#define CMD_ABOUT "About..."
+
void CreateWindow( void );
void DestroyWindow( void );
bool IsWindowOpen( void );
return "Brush export Plugin";
}
const char* getCommandList(){
- return "Export selected as Wavefront Object;About";
+ return CMD_ABOUT ";-;Export selected as Wavefront Object";
}
const char* getCommandTitleList(){
return "";
}
void dispatch( const char* command, float* vMin, float* vMax, bool bSingleBrush ){
- if ( string_equal( command, "About" ) ) {
- GlobalRadiant().m_pfnMessageBox( g_mainwnd, "Brushexport plugin v 2.0 by namespace (www.codecreator.net)\n"
- "Enjoy!\n\nSend feedback to spam@codecreator.net", "About me...",
- eMB_OK,
- eMB_ICONDEFAULT );
+ if ( string_equal( command, CMD_ABOUT ) ) {
+ const char *label_text =
+ PLUGIN_NAME " " PLUGIN_VERSION " for "
+ RADIANT_NAME " " RADIANT_VERSION "\n\n"
+ "Written by namespace <spam@codecreator.net> (www.codecreator.net)\n\n"
+ "Built against "
+ RADIANT_NAME " " RADIANT_VERSION_STRING "\n"
+ __DATE__;
+
+ GlobalRadiant().m_pfnMessageBox( g_mainwnd, label_text,
+ "About " PLUGIN_NAME,
+ eMB_OK,
+ eMB_ICONDEFAULT );
}
else if ( string_equal( command, "Export selected as Wavefront Object" ) ) {
if ( IsWindowOpen() ) {
_QERPluginTable m_plugin;
public:
typedef _QERPluginTable Type;
-STRING_CONSTANT( Name, "brushexport2" );
+STRING_CONSTANT( Name, PLUGIN_NAME );
BrushExportModule(){
m_plugin.m_pfnQERPlug_Init = &BrushExport::init;
#if !defined( INCLUDED_BRUSH_EXPORT_H )
#define INCLUDED_BRUSH_EXPORT_H
+#define PLUGIN_NAME "BrushExport"
+#define PLUGIN_VERSION "2.0"
+
#endif
int g_iActiveTarget = -1;
int g_iPreviewRunning = 0; // 0: no preview 1: start preview 2: preview in progress
-static const char *PLUGIN_ABOUT = "Camera v1.0 for " RADIANT_NAME "\n"
- "by Arnout van Meer (rr2do2@splashdamage.com)\n\n"
- "This product contains software technology\n"
- "from id Software, Inc. ('id Technology').\n"
- "id Technology (c) 2001, 2002 id Software, Inc.";
-
+static const char *PLUGIN_ABOUT =
+ PLUGIN_NAME " " PLUGIN_VERSION " for "
+ RADIANT_NAME " " RADIANT_VERSION "\n\n"
+ "Written by Arnout van Meer <rr2do2@splashdamage.com)\n\n"
+ "Written by Geoffrey DeWan <gdewan@prairienet.org>\n\n"
+ "This product contains software technology\n"
+ "from id Software, Inc. ('id Technology').\n"
+ "id Technology (c) 2001, 2002 id Software, Inc.\n\n";
+ "Built against "
+ RADIANT_NAME " " RADIANT_VERSION "\n"
+ __DATE__;
#include "iplugin.h"
#ifndef _CAMERA_H_
#define _CAMERA_H_
+#define PLUGIN_NAME "Camera"
+#define PLUGIN_VERSION "1.0"
+
typedef unsigned char byte;
#include "mathlib.h"
int loop = 1, ret = IDCANCEL;
auto dlg = ui::Window(ui::window_type::TOP);
- gtk_window_set_title(dlg, "About Portal Viewer");
+ gtk_window_set_title(dlg, "About " PLUGIN_NAME);
dlg.connect("delete_event", G_CALLBACK(dialog_delete_callback), NULL);
dlg.connect("destroy", G_CALLBACK(gtk_widget_destroy), NULL);
g_object_set_data(G_OBJECT(dlg), "loop", &loop);
dlg.add(hbox);
gtk_container_set_border_width(GTK_CONTAINER(hbox), 10);
- char const *label_text = "Version 1.000\n\n"
- "Gtk port by Leonardo Zide\nleo@lokigames.com\n\n"
- "Written by Geoffrey DeWan\ngdewan@prairienet.org\n\n"
- "Built against " RADIANT_NAME " " RADIANT_VERSION "\n"
+ const char *label_text =
+ PLUGIN_NAME " " PLUGIN_VERSION " for "
+ RADIANT_NAME " " RADIANT_VERSION "\n\n"
+ "Gtk port by Leonardo Zide <leo@lokigames.com>\n"
+ "Written by Geoffrey DeWan <gdewan@prairienet.org>\n\n"
+ "Built against "
+ RADIANT_NAME " " RADIANT_VERSION_STRING "\n"
__DATE__;
+
auto label = ui::Label(label_text);
label.show();
hbox.pack_start( label, TRUE, TRUE, 0);
#include "LoadPortalFileDialog.h"
#define Q3R_CMD_SPLITTER "-"
-#define Q3R_CMD_ABOUT "About Portal Viewer"
+#define Q3R_CMD_ABOUT "About..."
#define Q3R_CMD_LOAD "Load .prt file"
#define Q3R_CMD_RELEASE "Unload .prt file"
#define Q3R_CMD_SHOW_3D "Toggle portals (3D)"
#define Q3R_CMD_SHOW_2D "Toggle portals (2D)"
-#define Q3R_CMD_OPTIONS "Configure Portal Viewer"
+#define Q3R_CMD_OPTIONS "Configure..."
CopiedString INIfn;
save_var( INIfn.c_str(), CONFIG_SECTION, key, s );
}
-
-// plugin name
-static const char *PLUGIN_NAME = "Portal Viewer";
// commands in the menu
static const char *PLUGIN_COMMANDS =
Q3R_CMD_ABOUT ";"
const char* QERPlug_Init( void *hApp, void* pMainWidget ){
- return "Portal Viewer for Q3Radiant";
+ return PLUGIN_NAME " for " RADIANT_NAME;
}
const char* QERPlug_GetName(){
_QERPluginTable m_plugin;
public:
typedef _QERPluginTable Type;
-STRING_CONSTANT( Name, "prtview" );
+STRING_CONSTANT( Name, PLUGIN_NAME );
PrtViewPluginModule(){
m_plugin.m_pfnQERPlug_Init = QERPlug_Init;
#if !defined( INCLUDED_PRTVIEW_H )
#define INCLUDED_PRTVIEW_H
-#define MSG_PREFIX "Portal Viewer plugin: "
+#define PLUGIN_NAME "Portal Viewer"
+#define PLUGIN_VERSION "1.0"
+
+#define MSG_PREFIX PLUGIN_NAME " plugin: "
void InitInstance();
void SaveConfig();
const int IDOK = 1;
const int IDCANCEL = 2;
-
#endif
#include "generic/callback.h"
+#define CMD_ABOUT "About..."
+
namespace {
const char SHADERTAG_FILE[] = "shadertags.xml";
}
g_window = ui::Window::from(pMainWidget);
return "";
}
+
const char* getName(){
- return "ShaderPlug";
+ return PLUGIN_NAME;
}
+
const char* getCommandList(){
- return "About;Create tag file";
+ return CMD_ABOUT ";-;Create tag file";
}
+
const char* getCommandTitleList(){
return "";
}
+
void dispatch( const char* command, float* vMin, float* vMax, bool bSingleBrush ){
- if ( string_equal( command, "About" ) ) {
- GlobalRadiant().m_pfnMessageBox( g_window, "Shaderplug (1.0)\n\n"
- "by Shaderman (shaderman@gmx.net)",
- "About",
+ if ( string_equal( command, CMD_ABOUT ) ) {
+ const char *label_text =
+ PLUGIN_NAME " " PLUGIN_VERSION " for "
+ RADIANT_NAME " " RADIANT_VERSION "\n\n"
+ "Written by Shaderman <shaderman@gmx.net>\n\n"
+ "Built against "
+ RADIANT_NAME " " RADIANT_VERSION_STRING "\n"
+ __DATE__;
+
+ GlobalRadiant().m_pfnMessageBox( g_window, label_text,
+ "About " PLUGIN_NAME,
eMB_OK,
eMB_ICONDEFAULT );
}
+
if ( string_equal( command, "Create tag file" ) ) {
CreateTagFile();
}
void GetArchiveList(){
GlobalFileSystem().forEachArchive(makeCallbackF(loadArchiveFile));
- globalOutputStream() << "Shaderplug: " << (const Unsigned)Shaderplug::archives.size() << " archives found.\n";
+ globalOutputStream() << PLUGIN_NAME ": " << (const Unsigned)Shaderplug::archives.size() << " archives found.\n";
}
void CreateTagFile(){
const char* shader_type = GlobalRadiant().getGameDescriptionKeyValue( "shaders" );
GetAllShaders();
- globalOutputStream() << "Shaderplug: " << (const Unsigned)shaders.size() << " shaders found.\n";
+ globalOutputStream() << PLUGIN_NAME ": " << (const Unsigned)shaders.size() << " shaders found.\n";
if ( string_equal( shader_type, "quake3" ) ) {
GetTextures( "jpg" );
GetTextures( "tga" );
GetTextures( "png" );
- globalOutputStream() << "Shaderplug: " << (const Unsigned)textures.size() << " textures found.\n";
+ globalOutputStream() << PLUGIN_NAME ":" << (const Unsigned)textures.size() << " textures found.\n";
}
if ( shaders.size() || textures.size() != 0 ) {
- globalOutputStream() << "Shaderplug: Creating XML tag file.\n";
+ globalOutputStream() << PLUGIN_NAME ":Creating XML tag file.\n";
TagBuilder.CreateXmlDocument();
_QERPluginTable m_plugin;
public:
typedef _QERPluginTable Type;
-STRING_CONSTANT( Name, "ShaderPlug" );
+STRING_CONSTANT( Name, PLUGIN_NAME );
ShaderPluginModule(){
m_plugin.m_pfnQERPlug_Init = &Shaderplug::init;
#include "xml/xmltextags.h"
+#define PLUGIN_NAME "ShaderPlug"
+#define PLUGIN_VERSION "1.0"
+
#endif
#include <gtk/gtk.h> // to display something with gtk (windows, buttons etc.), the whole package might not be necessary
+#define CMD_ABOUT "About..."
+
void about_plugin_window();
void MapCoordinator();
const char* init( void* hApp, void* pMainWidget ){
main_window = ui::Window::from(pMainWidget);
- return "Initializing SunPlug for GTKRadiant";
+ return "Initializing " PLUGIN_NAME " for " RADIANT_NAME;
}
const char* getName(){
- return "SunPlug"; // name that is shown in the menue
+ return PLUGIN_NAME; // name that is shown in the menue
}
const char* getCommandList(){
- const char about[] = "About...";
+ const char about[] = CMD_ABOUT;
const char etMapCoordinator[] = ";ET-MapCoordinator";
strcat( MenuList, about );
return "";
}
void dispatch( const char* command, float* vMin, float* vMax, bool bSingleBrush ){ // message processing
- if ( string_equal( command, "About..." ) ) {
+ if ( string_equal( command, CMD_ABOUT ) ) {
about_plugin_window();
}
if ( string_equal( command, "ET-MapCoordinator" ) ) {
_QERPluginTable m_plugin;
public:
typedef _QERPluginTable Type;
-STRING_CONSTANT( Name, "SunPlug" );
+STRING_CONSTANT( Name, PLUGIN_NAME );
SunPlugModule(){
m_plugin.m_pfnQERPlug_Init = &SunPlug::init;
gtk_window_set_transient_for( window, SunPlug::main_window ); // make the window to stay in front of the main window
window.connect( "delete_event", G_CALLBACK( delete_event ), NULL ); // connect the delete event
window.connect( "destroy", G_CALLBACK( destroy ), NULL ); // connect the destroy event for the window
- gtk_window_set_title( window, "About SunPlug" ); // set the title of the window for the window
+ gtk_window_set_title( window, "About " PLUGIN_NAME ); // set the title of the window for the window
gtk_window_set_resizable( window, FALSE ); // don't let the user resize the window
gtk_window_set_modal( window, TRUE ); // force the user not to do something with the other windows
gtk_container_set_border_width( GTK_CONTAINER( window ), 10 ); // set the border of the window
auto vbox = ui::VBox( FALSE, 10 ); // create a box to arrange new objects vertically
window.add(vbox);
- auto label = ui::Label( "SunPlug v1.0 for " RADIANT_NAME " 1.5\nby Topsun" ); // create a label
+ char const *label_text =
+ PLUGIN_NAME " " PLUGIN_VERSION " for "
+ RADIANT_NAME " " RADIANT_VERSION "\n\n"
+ "Written by Topsun\n\n"
+ "Built against "
+ RADIANT_NAME " " RADIANT_VERSION_STRING "\n"
+ __DATE__;
+
+ auto label = ui::Label( label_text ); // create a label
gtk_label_set_justify( GTK_LABEL( label ), GTK_JUSTIFY_LEFT ); // text align left
vbox.pack_start( label, FALSE, FALSE, 2 ); // insert the label in the box
*/
#ifndef _PLUGIN_SUNPLUG_
- #define _PLUGIN_SUNPLUG_
+#define _PLUGIN_SUNPLUG_
+#define PLUGIN_NAME "SunPlug"
+#define PLUGIN_VERSION "1.0"
#endif // _PLUGIN_SUNPLUG_
#include <gtk/gtk.h>
-#define PLUGIN_VERSION "0.4"
-
#include "ifilter.h"
#include "ibrush.h"
#include "iundo.h" // declaration of undo system
#include "qerplugin.h" // declaration to use other interfaces as a plugin
#include "ieclass.h"
+#define CMD_ABOUT "About..."
+
class UFOAIPluginDependencies :
public GlobalRadiantModuleRef, // basic class for all other module refs
public GlobalUndoModuleRef, // used to say radiant that something has changed and to undo that
return "Initializing GTKRadiant UFOAI plugin";
}
const char* getName(){
- return "UFO:AI";
+ return PLUGIN_NAME;
}
const char* getCommandList(){
/*GlobalRadiant().getGameName()*/
- return "About;-;Worldspawn reset;Worldspawn;Perform check;-;Level 1;Level 2;Level 3;Level 4;Level 5;Level 6;Level 7;Level 8;-;StepOn;ActorClip;WeaponClip;Nodraw";
+ return CMD_ABOUT ";-;Worldspawn reset;Worldspawn;Perform check;-;Level 1;Level 2;Level 3;Level 4;Level 5;Level 6;Level 7;Level 8;-;StepOn;ActorClip;WeaponClip;Nodraw";
}
const char* getCommandTitleList(){
return "";
}
void dispatch( const char* command, float* vMin, float* vMax, bool bSingleBrush ){
char const *message = NULL;
- if ( string_equal( command, "About" ) ) {
- char const *version_string = "UFO:AI Plugin (http://ufoai.sf.net)\nBuild: " __DATE__
- "\nRadiant version: " RADIANT_VERSION
- "\nPlugin version: " PLUGIN_VERSION
- "\nAuthor: Martin Gerhardy (tlh2000/mattn)\n";
+ if ( string_equal( command, CMD_ABOUT ) ) {
+ const char *label_text =
+ PLUGIN_NAME " " PLUGIN_VERSION " for "
+ RADIANT_NAME " " RADIANT_VERSION "\n\n"
+ "Written by Martin Gerhardy (tlh2000/mattn)\n"
+ "for the UFO:AI project (http://ufoai.sf.net)\n\n"
+ "Built against "
+ RADIANT_NAME " " RADIANT_VERSION_STRING "\n"
+ __DATE__;
+
GlobalRadiant().m_pfnMessageBox( g_mainwnd,
- version_string, "About",
+ label_text, "About" PLUGIN_NAME,
eMB_OK, eMB_ICONDEFAULT );
}
else if ( string_equal( command, "Level 1" ) ) {
#if !defined( INCLUDED_UFOAI_H )
#define INCLUDED_UFOAI_H
+#define PLUGIN_NAME "UFO:AI"
+#define PLUGIN_VERSION "0.4"
+
#endif
create_menu_item_with_mnemonic( menu, "Bug report", makeCallbackF(OpenBugReportURL) );
create_menu_item_with_mnemonic( menu, "Shortcuts list", makeCallbackF(DoCommandListDlg) );
- create_menu_item_with_mnemonic( menu, "_About", makeCallbackF(DoAbout) );
+ create_menu_item_with_mnemonic( menu, "_About...", makeCallbackF(DoAbout) );
return help_menu_item;
}