]> de.git.xonotic.org Git - xonotic/netradiant.git/commitdiff
* show supported models in picomodel about message
authormattn <mattn>
Sun, 16 Mar 2008 17:24:26 +0000 (17:24 +0000)
committermattn <mattn>
Sun, 16 Mar 2008 17:24:26 +0000 (17:24 +0000)
git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/branches/ZeroRadiant@216 8a3a26a2-13c4-0310-b231-cf6edde360e5

plugins/model/plugin.cpp

index ea5ac937bec0b414ac32b488da10ce2f35d1aec2..a69ce21f910f4b883d2f32e5cfc58f6f754476af 100644 (file)
@@ -164,7 +164,7 @@ void init_filetypes()
 
 static const char *PLUGIN_NAME = "Model loading module";
 static const char *PLUGIN_COMMANDS = "About;-;Flush & Reload Models;Flush & Reload Selected";
 
 static const char *PLUGIN_NAME = "Model loading module";
 static const char *PLUGIN_COMMANDS = "About;-;Flush & Reload Models;Flush & Reload Selected";
-static const char *PLUGIN_ABOUT = "Model Module v1.0 for GtkRadiant\nby Arnout van Meer (rr2do2@splashdamage.com)\n\nBased on the MD3Model Module by SPoG\nPicoModel Library Copyright (c) 2002, Randy Reddig & seaw0lf";
+static const char *PLUGIN_ABOUT = "Model Module v1.0 for GtkRadiant\nby Arnout van Meer (rr2do2@splashdamage.com)\n\nBased on the MD3Model Module by SPoG\nPicoModel Library Copyright (c) 2002, Randy Reddig & seaw0lf\n\nSupported models:\n";
 
 extern "C" const char* QERPlug_Init (void *hApp, void* pMainWidget)
 {
 
 extern "C" const char* QERPlug_Init (void *hApp, void* pMainWidget)
 {
@@ -188,8 +188,21 @@ extern "C" void QERPlug_Dispatch (const char *p, vec3_t vMin, vec3_t vMax, bool
     DoFlushReloadSelected();
   else if( !strcmp( p, "Flush & Reload Models" ) )
     DoFlushReloadAll();
     DoFlushReloadSelected();
   else if( !strcmp( p, "Flush & Reload Models" ) )
     DoFlushReloadAll();
-  else if( !strcmp( p, "About" ) )
-    g_FuncTable.m_pfnMessageBox(NULL, PLUGIN_ABOUT, "About", MB_OK, NULL);
+  else if( !strcmp( p, "About" ) ) {
+    const picoModule_t** modules = PicoModuleList( NULL );
+    char about_buf[1024];
+    strncpy(about_buf, PLUGIN_ABOUT, sizeof(about_buf) - 1);
+    while(*modules != NULL) {
+      const picoModule_t* module = *modules++;
+      strncat(about_buf, module->displayName, sizeof(about_buf) - 1);
+      strncat(about_buf, " (", sizeof(about_buf) - 1);
+      strncat(about_buf, module->defaultExts[0], sizeof(about_buf) - 1);
+      strncat(about_buf, ")\n\t", sizeof(about_buf) - 1);
+      strncat(about_buf, module->copyright, sizeof(about_buf) - 1);
+      strncat(about_buf, "\n", sizeof(about_buf) - 1);
+    }
+    g_FuncTable.m_pfnMessageBox(NULL, about_buf, "About", MB_OK, NULL);
+  }
 }
 
 
 }