[Gtkradiant] Prefences in plugins ?
Hydra
gtkradiant@zerowing.idsoftware.com
Sun, 6 Jan 2002 18:26:12 -0000
> Ideally the modules should be able to
> feed their own pref tabs to the preferences dialog.
yes indeed, any idea how this would be done ? gef ?
Also, while we're onthe subject of prefs, how does this look to you...
<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
<!-- generated by Hydra, modify at your own risks :) -->
<game
name="Quake III Arena / Quake III: Team Arena and modifications"
gametools="e:\games\quake3\tools\gtkr12n/">
<plugins>
<requiredmodules>
<!-- to be loaded in order of Number -->
<interface number="1" guid="9257ce43-1387-4e36-bea1-24b06a45c656"
name="filesystem module" version="halflife"/>
<interface number="2" guid="D42F798A-DF57-11d3-A3EE-0004AC96D4C3"
name="shader module" version="halflife"/>
<interface number="3" guid="e13e1816-e0b9-4d67-b6a3-e9c9b5fa7115"
name="image module" version="hlw"/>
<interface number="4" guid="75076973-3414-49c9-be5b-2378ec5601af"
name="map module" version="quake3"/>
</requiredmodules>
<!-- plugin preferences go here -->
<prefs name="filesystem module" version="halflife">
<epair name="usewad">true</epair>
</prefs>
</plugins>
</game>
I've already done the code to read the XML file (as above) and have reworked
pluginmanager.cpp so that g_RequiredModules is a GSList * instead of a
static array and it all works fine...
All I have to do now is make preferences.cpp set up the g_RequiredModules
list from the XML file (at the moment I'm building the list manually in
pluginmanager.cpp).
Hydra / Dom