[RM2K3] [DYNRPG] TITLE WINDOW POSITION PLUGIN?

Posts

Pages: 1
Does anybody have a plugin for changing the position of the New Game/Load Game/Quit window in the title screen? It seems like the sort of thing people may have implemented before but not bothered to submit to Utilities/Plugins, especially since there's a snippet of example code for doing exactly that in the DynRPG documentation. Just wanted to check before I make a new project for it.
Here's a simple implementation of that:

#include <DynRPG/DynRPG.h>

std::map<std::string, std::string> configuration;

int confTitleX;
int confTitleY;

bool onStartup (char *pluginName) {
configuration = RPG::loadConfiguration(pluginName);
confTitleX = atoi(configuration["TitleX"].c_str());
confTitleY = atoi(configuration["TitleY"].c_str());
return true;
}

void onFrame (RPG::Scene scene){
if (scene == RPG::SCENE_TITLE
&& RPG::title->winStartLoadEnd) {
RPG::title->winStartLoadEnd->x = confTitleX;
RPG::title->winStartLoadEnd->y = confTitleY;
}
}

Requires the following in DynRPG.ini:
[plugin_name]
TitleX=##
TitleY=##

Let me know if you have any trouble compiling it.
Yup, that works just fine. If you don't mind, I'll package that up with a demo RT2K3 project and a readme file and submit it as a Utility/Plugin (crediting you, of course). Or I could send the package to you and you can submit it if you prefer.
Pages: 1