kopia lustrzana https://github.com/jameshball/osci-render
Correctly bound audio animations and make the slider thumbs green to show an effect is being animated
rodzic
a15974481d
commit
c5a56b6501
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue