*/
@Override
public void buildPanel(FormBuilder f, final EventCode eA) {
// select it
EventCode e = getStartTag(eA);
// addInt(e, 1, 0);
// addInt(e, 2, 0);
addInt(e, 3, 1);
addInt(e, 4, 1);
// add type
final FormComboBox c = RubyForm.getComboBoxNum(
I18N.t("Type"),
JavaHelper.numAry(13),
new String[] { RGSS1Helper.getName(Type.SWITCH), RGSS1Helper.getName(Type.VARIABLE), "Self Switch", "Timer", RGSS1Helper.getName(Type.ACTOR),
RGSS1Helper.getName(Type.ENEMY), "Event", "Gold", RGSS1Helper.getName(Type.ITEM), RGSS1Helper.getName(Type.WEAPON),
RGSS1Helper.getName(Type.ARMOR), "Button", "Script" }, e.getParameters(), 0);
f.addElement("basic.type", c);
// var
f.addHeader("variable", new FormHeader(RGSS1Helper.getName(Type.VARIABLE), RGSS1Helper.getIcon(Type.VARIABLE)).setColumn(4).setSorting(1));
f.addElement(
"variable.base",
FormHelper.setEnabeldWhenRightElementSelect(c,
new FormSwitchVarSelector(e.getYecl().getProject(), RGSS1Helper.getName(Type.VARIABLE), e.getParameters(), 1, Type.VARIABLE), "1"));
f.addElement(
"variable.cond",
FormHelper.setEnabeldWhenRightElementSelect(c,
RubyForm.getComboBoxNum(I18N.t("is"), JavaHelper.numAry(6), new String[] { "==", ">=", "<=", ">", "<", "!=" }, e.getParameters(), 4),
"1").setSorting(1));
FormComboBox v = RubyForm.getComboBoxNum(I18N.t("as"), JavaHelper.numAry(2), new String[] { RGSS1Helper.getName(Type.VARIABLE), "Wert" },
e.getParameters(), 2);
f.addElement("variable.value", FormHelper.setEnabeldWhenRightElementSelect(c, v, "1").setSorting(2));
f.addElement("variable.empty", new FormEmpty().setSorting(3));
f.addElement(
"variable.varvalue",
FormHelper.addEnableLister(
new FormSwitchVarSelector(e.getYecl().getProject(), RGSS1Helper.getName(Type.VARIABLE), e.getParameters(), 3, Type.VARIABLE), v, "0",
c, "1").setSorting(4));
f.addElement("variable.var", FormHelper.addEnableLister(RubyForm.getNumber("", e.getParameters(), 3), v, "1", c, "1").setSorting(5));
// switch
f.addHeader("switch", new FormHeader(RGSS1Helper.getName(Type.SWITCH), RGSS1Helper.getIcon(Type.SWITCH)).setColumn(4));
f.addElement(
"switch.plus",
FormHelper.setEnabeldWhenRightElementSelect(c,
RubyForm.getComboBoxNum(I18N.t("ist"), JavaHelper.numAry(2), new String[] { "an", "aus" }, e.getParameters(), 2), "0").setSorting(1));
f.addElement(
"switch.value",
FormHelper.setEnabeldWhenRightElementSelect(c,
new FormSwitchVarSelector(e.getYecl().getProject(), RGSS1Helper.getName(Type.SWITCH), e.getParameters(), 1, Type.SWITCH), "0"));
// self switch
f.addHeader("selfswitch", new FormHeader(I18N.t("Self Switch"), "dummy").setColumn(4).setSorting(2));
f.addElement(
"selfswitch.plus",
FormHelper.setEnabeldWhenRightElementSelect(c,
RubyForm.getComboBoxNum(I18N.t("ist"), JavaHelper.numAry(2), new String[] { "an", "aus" }, e.getParameters(), 2), "2").setSorting(1));
f.addElement(
"selfswitch.value",
FormHelper.setEnabeldWhenRightElementSelect(c,
RubyForm.getComboBoxNum(I18N.t("Switch"), JavaHelper.numAry(4), new String[] { "A", "B", "C", "D" }, e.getParameters(), 1), "2"));
// actor
f.addHeader("actor", new FormHeader(RGSS1Helper.getName(Type.ACTOR), RGSS1Helper.getIcon(Type.ACTOR)).setSorting(4).setColumn(4));
f.addElement(
"actor.actor",
FormHelper.setEnabeldWhenRightElementSelect(c,
new FormDBComboBox(RGSS1Helper.getName(Type.ACTOR), e.getYecl().getProject(), Type.ACTOR, e.getParameters(), 1, false), "4"));
FormComboBox a = RubyForm.getComboBoxNum(I18N.t("Type"), JavaHelper.numAry(6), new String[] { "In Party", "Name", RGSS1Helper.getName(Type.SKILL),
RGSS1Helper.getName(Type.WEAPON), RGSS1Helper.getName(Type.ARMOR), RGSS1Helper.getName(Type.STATUS) }, e.getParameters(), 2);
f.addElement("actor.type", FormHelper.setEnabeldWhenRightElementSelect(c, a, "4"));
// f.addElement("actor.name",
// FormHelper.addEnableLister(RubyForm.getString(I18N.t("hat den Namen"),
// e.getParameters().get(3)), c, "4", a, "1")
// .setSorting(1));
f.addElement(
"actor.skill",
FormHelper.addEnableLister(
new FormDBComboBox(I18N.t("kann den {0}", RGSS1Helper.getName(Type.SKILL)), e.getYecl().getProject(), Type.SKILL, e.getParameters(), 3,
false), c, "4", a, "2").setSorting(2));
f.addElement(
"actor.weapon",
FormHelper.addEnableLister(
new FormDBComboBox(I18N.t("hat die {0}", RGSS1Helper.getName(Type.WEAPON)), e.getYecl().getProject(), Type.WEAPON, e.getParameters(),
3, false), c, "4", a, "3").setSorting(3));
f.addElement(
"actor.armor",
FormHelper.addEnableLister(
new FormDBComboBox(I18N.t("hat die {0}", RGSS1Helper.getName(Type.ARMOR)), e.getYecl().getProject(), Type.ARMOR, e.getParameters(), 3,
false), c, "4", a, "4").setSorting(3));
f.addElement(
"actor.state",
FormHelper.addEnableLister(
new FormDBComboBox(I18N.t("hat den {0}", RGSS1Helper.getName(Type.STATUS)), e.getYecl().getProject(), Type.STATUS, e.getParameters(),
3, false), c, "4", a, "5").setSorting(4));
// enemy
f.addHeader("enemy", new FormHeader(RGSS1Helper.getName(Type.ENEMY), RGSS1Helper.getIcon(Type.ENEMY)).setSorting(5).setColumn(4));
f.addElement(
"enemy.enemy",
FormHelper.setEnabeldWhenRightElementSelect(c,
new FormDBComboBox(RGSS1Helper.getName(Type.ENEMY), e.getYecl().getProject(), Type.ENEMY, e.getParameters(), 1, false), "5"));
FormComboBox en = RubyForm.getComboBoxNum(I18N.t("Type"), JavaHelper.numAry(2), new String[] { "Lebt", RGSS1Helper.getName(Type.STATUS) },
e.getParameters(), 2);
f.addElement("enemy.type", FormHelper.setEnabeldWhenRightElementSelect(c, en, "5"));
f.addElement(
"enemy.state",
FormHelper.addEnableLister(
new FormDBComboBox(I18N.t("hat den {0}", RGSS1Helper.getName(Type.STATUS)), e.getYecl().getProject(), Type.STATUS, e.getParameters(),
3, false), c, "5", en, "1").setSorting(2));
// timer
f.addHeader("timer", new FormHeader(I18N.t("Timer"), "timer").setColumn(4).setSorting(3));
f.addElement(
"timer.plus",
FormHelper.setEnabeldWhenRightElementSelect(c,
RubyForm.getComboBoxNum(I18N.t("Timer is"), JavaHelper.numAry(2), new String[] { ">=", "<=" }, e.getParameters(), 2), "3"));
f.addElement("timer.value", FormHelper.setEnabeldWhenRightElementSelect(c, RubyForm.getNumber("", e.getParameters(), 1).setMinMax(0, 5000, 1), "3"));
// event
f.addHeader("event", new FormHeader(I18N.t("Event"), "event").setColumn(6).setSorting(3));
f.addElement("event.sprite",
FormHelper.setEnabeldWhenRightElementSelect(c, RubyForm.getEventSelector("Event", e.getYecl().getMap(), e.getParameters(), 1), "6"));
f.addElement(
"timer.plus",
FormHelper.setEnabeldWhenRightElementSelect(c,
RubyForm.getComboBoxNum(I18N.t("show"), new String[] { "2", "4", "6", "8" }, directions, e.getParameters(), 2), "6").setSorting(1));
// money
f.addHeader("gold", new FormHeader(RGSS1Voc.gold(e.getYecl().getProject()), "money").setColumn(4).setSorting(7));
f.addElement(
"gold.plus",
FormHelper.setEnabeldWhenRightElementSelect(c,
RubyForm.getComboBoxNum(I18N.t("Gold is"), JavaHelper.numAry(2), new String[] { ">=", "<=" }, e.getParameters(), 2), "7"));
f.addElement("gold.value", FormHelper.setEnabeldWhenRightElementSelect(c, RubyForm.getNumber("", e.getParameters(), 1), "7"));
// Sonstiges
f.addHeader("another", new FormHeader(RGSS1Helper.getName(Type.ITEM), RGSS1Helper.getIcon(Type.ITEM)).setSorting(8).setColumn(4));
f.addElement("another", new FormInfo("", I18N.t("Hat mind. 1 von")));
f.addElement(
"another.item",
FormHelper.setEnabeldWhenRightElementSelect(c,
new FormDBComboBox(RGSS1Helper.getName(Type.ITEM), e.getYecl().getProject(), Type.ITEM, e.getParameters(), 1, false), "8"));
f.addElement(
"another.armor",
FormHelper.setEnabeldWhenRightElementSelect(c,
new FormDBComboBox(RGSS1Helper.getName(Type.ARMOR), e.getYecl().getProject(), Type.ARMOR, e.getParameters(), 1, false), "10"));
f.addElement(
"another.weapon",
FormHelper.setEnabeldWhenRightElementSelect(c,
new FormDBComboBox(RGSS1Helper.getName(Type.WEAPON), e.getYecl().getProject(), Type.WEAPON, e.getParameters(), 1, false), "9"));
f.addElement("another.button",
FormHelper.setEnabeldWhenRightElementSelect(c, RubyForm.getNumber("Button Press", e.getParameters(), 1).setSorting(1), "11"));
// f.addElement("another.script",
// FormHelper.setEnabeldWhenRightElementSelect(c,
// RubyForm.getString("Script", e.getParameters().get(1)), "12"));
}