form.addElement("basic.name", ftf);
// build rtp
// RTP.
form.addElement("basic.button", new FormButton(I18N.t("In Game.ini speichern"), "disk", new AE() {
@Override
public void run() {
FileReader f = null;
try {
// load it
f = new FileReader(RGSSProjectHelper.getGameIniFile(project));
// build game ini
Ini ini = new Ini();
ini.load();
Ini.Section section = ini.get("Game");
// add it
section.add("Title", ftf.getContentAsString());
section.add("RTP1", ftf.getContentAsString());
section.add("RTP2", ftf.getContentAsString());
section.add("RTP3", ftf.getContentAsString());
// save
ini.store(RGSSProjectHelper.getGameIniFile(project));
} catch (Throwable t) {
YEx.info("Can not save " + RGSSProjectHelper.getGameIniFile(project), t);
} finally {
if (f != null) {
try {
f.close();
} catch (IOException e) {
YEx.info("Can not close " + f, e);
}
}
}
}
}).setSorting(2));
// add party
form.addHeader("party", new FormHeader(I18N.t("Party"), "hero"));
form.addElement("party.hero", new FormDBList(project, Type.ACTOR, system.getInstanceVariable("@party_members"),
I18N.t("Wähle die Helden für die Party aus")));
// add map
form.addElement(
"party.pos",
new FormButton(I18N.t(I18N.t("Start Position {0} - {1}/{2}", RubyHelper.toInt(system, "@start_map_id"),
RubyHelper.toInt(system, "@start_x"), RubyHelper.toInt(system, "@start_y"))), "map", new AE() {
@Override
public void run() {
// load
YMapView map = new YMapView(RubyHelper.toInt(system, "@start_map_id"), project);