form.addHeader("basic", new FormHeader(I18N.t("Grundlegenes"), getIcon() + "_info"));
form.addElement("basic.name", RubyForm.getString("Name", "@name", act));
// build fog
form.addHeader("graphic", new FormHeader(I18N.t("Grafiken"), "graphic").setColumn(4));
form.addElement("graphic.tile", new FormGraphEle(I18N.t("Tileset"), project, RTP.TILESET, act, "@tileset_name", null));
// form.addElement("graphic.atile", RubyForm.getError("Autotile",
// "@autotile_names", act));
form.addElement("graphic.pano", new FormGraphEle(I18N.t("Panorama"), project, RTP.PANORAMA, act, "@panorama_name", "@panorama_hue"));
form.addElement("graphic.battle", new FormGraphEle(I18N.t("Battle Back"), project, RTP.BATTLEBACK, act, "@battleback_name", null));
final RubyArray ra = (RubyArray) act.getInstanceVariable("@autotile_names");
for (int i = 0; i < 7; i++) {
final int j = i;
form.addElement("graphic.atile" + i,
new FormGraphEle(I18N.t("Autotile {0}", i), project, RTP.AUTOTILE, RubyString.newString(ra.getRuntime(), (String) ra.get(i)), i, null)
.setSorting(i + 1).addChangeListener(new FormElementChangeListener() {
@Override
public void stateChanged(FormElement form) {
ra.remove(j);
ra.add(j, form.getContentAsString());
}
}));
}
// build fog
form.addHeader("fog", new FormHeader(I18N.t("Nebel"), "info").setColumn(6));
form.addElement("fog.afog", new FormGraphEle(I18N.t("Fog"), project, RTP.PANORAMA, act, "@fog_name", "@fog_hue"));
form.addElement("fog.opa", RubyForm.getNumber(I18N.t("Opacity"), act, "@fog_opacity").setMinMax(0, 255, 1));
form.addElement("fog.blend", RubyForm.getComboBoxNum(I18N.t("Blending Mode"), new String[] { "0", "1", "2" }, new String[] { "Normal", "Addition",
"Subtraction" }, act, "@fog_blend_type"));
form.addElement("fog.zoom", RubyForm.getNumber(I18N.t("Zoom"), act, "@fog_zoom"));
form.addElement("fog.sx", RubyForm.getNumber(I18N.t("SX"), act, "@fog_sx").setInfoTxt(I18N.t("(automatic X-axis scrolling speed)")));