mirror of
https://github.com/UberGames/GtkRadiant.git
synced 2024-11-10 06:31:41 +00:00
* show supported models in picomodel about message
git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/branches/ZeroRadiant@216 8a3a26a2-13c4-0310-b231-cf6edde360e5
This commit is contained in:
parent
fa92da3dc5
commit
a4e4f11c0e
1 changed files with 16 additions and 3 deletions
|
@ -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_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)
|
||||
{
|
||||
|
@ -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();
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue