Correctly bound audio animations and make the slider thumbs green to show an effect is being animated

pull/136/head
James Ball 2022-10-31 21:04:20 +00:00 zatwierdzone przez James H Ball
rodzic a15974481d
commit c5a56b6501
3 zmienionych plików z 18 dodań i 2 usunięć

Wyświetl plik

@ -100,6 +100,11 @@ public class EffectAnimator extends PhaseEffect implements SettableEffect {
}
}
}
if (actualValue > maxValue) {
actualValue = maxValue;
} else if (actualValue < minValue) {
actualValue = minValue;
}
effect.setValue(actualValue);
return effect.apply(count, vector);
}

Wyświetl plik

@ -250,7 +250,14 @@ public class EffectComponentGroupController implements Initializable, SubControl
slider.minProperty().addListener((e, old, min) -> this.animator.setMin(min.doubleValue()));
slider.maxProperty().addListener((e, old, max) -> this.animator.setMax(max.doubleValue()));
slider.valueProperty().addListener((e, old, value) -> this.animator.setValue(value.doubleValue()));
comboBox.valueProperty().addListener((options, old, animationType) -> this.animator.setAnimation(animationType));
comboBox.valueProperty().addListener((options, old, animationType) -> {
this.animator.setAnimation(animationType);
if (animationType != AnimationType.STATIC) {
slider.setStyle("-thumb-color: #00ff00;");
} else {
slider.setStyle("");
}
});
}
public EffectAnimator getAnimator() {

Wyświetl plik

@ -102,9 +102,13 @@
-fx-text-fill: white;
}
.slider {
-thumb-color: white;
}
.slider .thumb {
-fx-background-color: very_dark;
-fx-border-color: white;
-fx-border-color: -thumb-color;
-fx-border-radius: 1.0em; /* makes sure this remains circular */
-fx-effect: inherit;
}