ExtentionManagement.add("rgssproject.hometag", new IExtension() {
@Override
public void work(HashMap<String, Object> objects) {
final Project p = (Project) objects.get("project");
int rgss = RGSSProjectHelper.getRGSSVersion(p);
// right typ?
if (!SystemUtils.IS_OS_WINDOWS || rgss < 1 || rgss > 2) {
return;
}
// licence?
if (rgss == 1 && !Setting.get("licence.xp", false) || rgss == 2 && !Setting.get("licence.vx", false)) {
return;
}
final DockLinkPanel link = (DockLinkPanel) objects.get("link");
// add
if (rgss == 1) {
link.addLink(I18N.t("Im RPG Maker XP öffnen"), "rpgxp", new AE() {
@Override
public void run() {
// which type?
SystemHelper.viewFile(new File(p.getPath(), "Game.rxproj"));
}
});
}
// add2
if (rgss == 2) {
link.addLink(I18N.t("Im RPG Maker VX öffnen"), "rpgvx", new AE() {
@Override
public void run() {
// which type?
SystemHelper.viewFile(new File(p.getPath(), "Game.vxproj"));
}
});
}