RubyObject graph = (RubyObject) page.getInstanceVariable("@graphic");
form.addHeader("graphic", new FormHeader(I18N.t("Graphic"), "graphic").setColumn(4).setCollapsed(true));
// add select
FormComboBox gS = new FormComboBox(I18N.t("Typ"), new String[] { "1", "0" }, new String[] { "Tile", "Character" });
gS.selectField(RubyHelper.toInt(graph.getInstanceVariable("@tile_id")) == 0 ? "1" : "0");
form.addElement("graphic.typ", gS.setSorting(-2));
// add tile
form.addElement("graphic.tile",
FormHelper.setEnabeldWhenRightElementSelect(gS, RubyForm.getNumber(I18N.t("Tile"), graph, "@tile_id").setSorting(-1), "1"));
// add char
form.addElement("graphic.char", FormHelper.setEnabeldWhenRightElementSelect(gS, new FormGraphEle(I18N.t("Char"), project,
RTP.CHARACTER, graph, "@character_name", "@character_hue"), "0"));
form.addElement("graphic.char2", new FormEmpty());
form.addElement("graphic.charpatt", FormHelper.setEnabeldWhenRightElementSelect(gS,
RubyForm.getNumber(I18N.t("Pattern"), graph, "@pattern").setMinMax(0, 3, 1), "0"));
form.addElement(
"graphic.chardir",
FormHelper.setEnabeldWhenRightElementSelect(
gS,
RubyForm.getComboBoxNum(I18N.t("Direction"), new String[] { "2", "4", "6", "8" }, new String[] { "Down", "Left",
"Right", "Up" }, graph, "@direction"), "0"));
form.addElement(
"graphic.charopa",
FormHelper.setEnabeldWhenRightElementSelect(gS,
RubyForm.getNumber(I18N.t("Opacity"), graph, "@opacity").setMinMax(0, 255, 1), "0"));
form.addElement(
"graphic.charblend",
FormHelper.setEnabeldWhenRightElementSelect(gS,
RubyForm.getNumber(I18N.t("Blendtype"), graph, "@blend_type").setMinMax(0, 2, 1), "0"));
gS.informListeners();
// unsupported
form.addHeader("unsupported", new FormHeader(I18N.t("Nicht unterstützt"), "error").setCollapsed(true));
form.addElement("unsupported.ele", new FormInfo("", I18N.t("Movement route")));
// @movement_route