@ -185,9 +187,14 @@ public class Locomotive extends Car implements Constants{
@@ -185,9 +187,14 @@ public class Locomotive extends Car implements Constants{
if(fEntry.getValue()==true)btn.clazz("active");// == true is required, as getValue may return null
btn.addTo(functions);
}
}
functions.addTo(fieldset);
@ -257,6 +264,14 @@ public class Locomotive extends Car implements Constants{
@@ -257,6 +264,14 @@ public class Locomotive extends Car implements Constants{
@ -390,6 +405,25 @@ public class Locomotive extends Car implements Constants{
@@ -390,6 +405,25 @@ public class Locomotive extends Car implements Constants{
@ -416,12 +450,13 @@ public class Locomotive extends Car implements Constants{
@@ -416,12 +450,13 @@ public class Locomotive extends Car implements Constants{
returnproperties();
}
ObjecttoggleFunction(Paramsparams){
privateWindowtoggleFunction(Paramsparams){
Integerindex=params.getInt(FUNCTION);
if(isNull(index))returnt("No function number provided!");
if(isNull(decoder))returnt("{} has no decoder!",this);
decoder.toggleFunction(index);
returnt("Unknown function: {}",params);
Vector<String>errors=newVector<String>();
if(isNull(index))errors.add(t("No function number provided!"));
if(isNull(decoder))errors.add(t("{} has no decoder!",this));
button(t("reverse"),Map.of(ACTION,ACTION_REVERSE)).title(t("Turns the train, as if it went through a loop.")).addTo(directionLi).addTo(propList);
button(t("reverse train"),Map.of(ACTION,ACTION_REVERSE)).title(t("Turns the train, as if it went through a loop.")).addTo(directionLi).addTo(propList);