c.selectField(RubyHelper.toInt(e.getParameters().get(0)) == RubyHelper.toInt(e.getParameters().get(1)) ? "0" : "1");
f.getHeader("basic").setColumn(4);
f.addElement("basic.type", c.setSorting(-1));
f.addElement("basic.type2", new FormEmpty().setSorting(-1));
// add switch
f.addElement("basic.v1", new FormSwitchVarSelector(e.getYecl().getProject(), I18N.t("Setze"), e.getParameters(), 0, Type.VARIABLE)
.addChangeListener(new FormElementChangeListener() {
@Override
public void stateChanged(FormElement form) {
if (c.getContentAsString().equals("0")) {
RubyHelper.setNum(e.getParameters(), 1, c.getContentAsString());
}
}
}));
// add 2. switch
f.addElement("basic.v2", FormHelper.setEnabeldWhenRightElementSelect(c,
new FormSwitchVarSelector(e.getYecl().getProject(), I18N.t("bis"), e.getParameters(), 1, Type.VARIABLE), "1"));
c.addChangeListener(new FormElementChangeListener() {
@Override
public void stateChanged(FormElement form) {
if (c.getContentAsString().equals("0")) {
RubyHelper.setNum(e.getParameters(), 1, RubyHelper.toInt(e.getParameters().get(0)));
}
}
});
// add operator
f.addElement("basic.operator", RubyForm.getComboBoxNum(I18N.t("Operator"), JavaHelper.numAry(5), oTit, e.getParameters(), 2).setSorting(1));
// add values
f.addHeader("value", new FormHeader("Value", "variable").setColumn(4));
// selector
FormComboBox fcb = RubyForm.getComboBoxNum(I18N.t("Typ"), JavaHelper.numAry(7),
new String[] { "Value", "Variable", "Random", RGSS1Helper.getName(Type.ITEM), "Actor", "Enemy", "Spirit", "Other" }, e.getParameters(), 3);
f.addElement("value.atyp", fcb);
f.addElement("value.atyp1", new FormEmpty());
// value
f.addElement("value.bvalue", FormHelper.setEnabeldWhenRightElementSelect(fcb, RubyForm.getNumber(I18N.t("Wert"), e.getParameters(), 4), "0"));
// variable
f.addElement("value.bvar", FormHelper.setEnabeldWhenRightElementSelect(fcb,
new FormSwitchVarSelector(e.getYecl().getProject(), I18N.t("Variable"), e.getParameters(), 4, Type.VARIABLE), "1"));
// random
f.addElement("value.crand", FormHelper.setEnabeldWhenRightElementSelect(fcb, RubyForm.getNumber(I18N.t("Random"), e.getParameters(), 4), "2"));
f.addElement("value.crand2", FormHelper.setEnabeldWhenRightElementSelect(fcb, RubyForm.getNumber(I18N.t("-"), e.getParameters(), 5), "2"));
// item
f.addElement("value.ditem", FormHelper.setEnabeldWhenRightElementSelect(fcb, new FormDBComboBox(RGSS1Helper.getName(Type.ITEM), e.getYecl()
.getProject(), Type.ITEM, e.getParameters(), 4, false).setInfoTxt(I18N.t("Anzahl des Gegenstandes im Inventar der Party")), "3"));
f.addElement("value.ditem2", new FormEmpty());
// actor
f.addElement("value.eactor", FormHelper.setEnabeldWhenRightElementSelect(fcb, new FormDBComboBox(I18N.t("Actor"), e.getYecl().getProject(), Type.ACTOR,
e.getParameters(), 4, false), "4"));
f.addElement("value.eactor2",