2005-02-22, 04:27 PM
ok when i first starting playing around with making a plugin, i began working on a settings plugin, as gbpvr seems to be missing this, however ran into issues:
- what if the plugin developer completely changes something; then the settings for that plugin no longer work
- only a limited number of plugins will have settings
- what if i buggered off and the settings were no longer maintained
- how do i force the plugins do update these settings?
ok now with auto update, discussion lead to downloading new plugins, skins. if you download a skin in gbpvr you dont really want to quit go into the config and change the skin, thats annoying if you can download it in gbpvr shouldnt you be able to change it in gbpvr? (ok we arent there yet, but im sure we are going to get there, yeah im optimistic).
anyway, i was thinking long and hard (err maybe ten minutes) but what if each plugin had a subclass called "Settings" (or something) and in the class we had a few methods
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">///proccess keyevents
//returns if handled
public bool KeyPress(Keyevent e){
}
//draw method (or is it render?)
//returns err whatever the normal draw method returns
public somethign Draw(){
}
//restarts the settings (eg button positions etc)
public void activate(){
}[/QUOTE]
and the IMenuTask would add this method
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">//returns a class of type "SettingsScreen"
public SettingsScreen getSettings(){
return null; //if no settings are needed
return new SettingsScreen();
}[/QUOTE]
now there would be a "Settings" plugin, this plugin would show every plugin in a menu (much like the main menu, even possible display the task images), instead of starting the plugins normal, it would just call the "Settings" class, and pass the keyevents and draw method to this class. if the keyevent returns false (ie the keypress wasnt handled, eg "back" or "home" then the primary "Settings" plugin would handle this, but not by default, incase the plugin wants to process the "back" button internally).
so this means every plugin would handle its own settings screen, every plugin would be aware of the updates and can update itself accordingly, every plugin on the menu could have a settings screen.
the best solution would probably be to let sub make the initial class (since gbpvr seems to have no problem starting plugins, and every other plugin needs the dll to be in the gbpvr root directory (well i think it does), also this should be package with gbpvr itself).
ok i think this is a good idea (well its mine, so course i would), but gbpvr is missing this, its going to need it, and very soon, i often find myself editing the config.xml file and quickly closing and then restarting gbpvr to change a setting, with this you wouldnt need to. its genius!
some what you all think?
- what if the plugin developer completely changes something; then the settings for that plugin no longer work
- only a limited number of plugins will have settings
- what if i buggered off and the settings were no longer maintained
- how do i force the plugins do update these settings?
ok now with auto update, discussion lead to downloading new plugins, skins. if you download a skin in gbpvr you dont really want to quit go into the config and change the skin, thats annoying if you can download it in gbpvr shouldnt you be able to change it in gbpvr? (ok we arent there yet, but im sure we are going to get there, yeah im optimistic).
anyway, i was thinking long and hard (err maybe ten minutes) but what if each plugin had a subclass called "Settings" (or something) and in the class we had a few methods
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">///proccess keyevents
//returns if handled
public bool KeyPress(Keyevent e){
}
//draw method (or is it render?)
//returns err whatever the normal draw method returns
public somethign Draw(){
}
//restarts the settings (eg button positions etc)
public void activate(){
}[/QUOTE]
and the IMenuTask would add this method
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">//returns a class of type "SettingsScreen"
public SettingsScreen getSettings(){
return null; //if no settings are needed
return new SettingsScreen();
}[/QUOTE]
now there would be a "Settings" plugin, this plugin would show every plugin in a menu (much like the main menu, even possible display the task images), instead of starting the plugins normal, it would just call the "Settings" class, and pass the keyevents and draw method to this class. if the keyevent returns false (ie the keypress wasnt handled, eg "back" or "home" then the primary "Settings" plugin would handle this, but not by default, incase the plugin wants to process the "back" button internally).
so this means every plugin would handle its own settings screen, every plugin would be aware of the updates and can update itself accordingly, every plugin on the menu could have a settings screen.
the best solution would probably be to let sub make the initial class (since gbpvr seems to have no problem starting plugins, and every other plugin needs the dll to be in the gbpvr root directory (well i think it does), also this should be package with gbpvr itself).
ok i think this is a good idea (well its mine, so course i would), but gbpvr is missing this, its going to need it, and very soon, i often find myself editing the config.xml file and quickly closing and then restarting gbpvr to change a setting, with this you wouldnt need to. its genius!

some what you all think?