Fix inactive 3D effect sliders

pull/112/head
James Ball 2022-08-18 22:03:59 +01:00 zatwierdzone przez James H Ball
rodzic ddafc8ef8c
commit c771180efd
2 zmienionych plików z 7 dodań i 7 usunięć

Wyświetl plik

@ -87,7 +87,7 @@ public class EffectComponentGroupController implements Initializable, SubControl
if (model.isAlwaysEnabled()) { if (model.isAlwaysEnabled()) {
model.removeCheckBox(); model.removeCheckBox();
} }
setInactive(model.isAlwaysEnabled()); setInactive(!model.isAlwaysEnabled());
label.setText(name); label.setText(name);
}); });
@ -96,7 +96,7 @@ public class EffectComponentGroupController implements Initializable, SubControl
if (alwaysEnabled) { if (alwaysEnabled) {
model.removeCheckBox(); model.removeCheckBox();
} }
setInactive(alwaysEnabled); setInactive(!alwaysEnabled);
}); });
ChangeListener<Number> listener = (e, old, value) -> { ChangeListener<Number> listener = (e, old, value) -> {
@ -269,8 +269,8 @@ public class EffectComponentGroupController implements Initializable, SubControl
} }
public void setInactive(boolean inactive) { public void setInactive(boolean inactive) {
slider.setDisable(!inactive); slider.setDisable(inactive);
spinner.setDisable(!inactive); spinner.setDisable(inactive);
} }
public void setValue(double value) { public void setValue(double value) {

Wyświetl plik

@ -128,9 +128,7 @@ public class EffectsController implements Initializable, SubController {
if (type == EffectType.DEPTH_3D) { if (type == EffectType.DEPTH_3D) {
Platform.runLater(() -> Platform.runLater(() ->
List.of(rotateSpeed3D, rotateX, rotateY, rotateZ, zPos).forEach(ecg -> { List.of(rotateSpeed3D, rotateX, rotateY, rotateZ, zPos).forEach(ecg -> ecg.setInactive(!checked))
ecg.setInactive(!checked);
})
); );
} }
} }
@ -229,6 +227,8 @@ public class EffectsController implements Initializable, SubController {
executor.setScript(script); executor.setScript(script);
depthFunctionButton.setOnAction(e -> Gui.launchCodeEditor(script, "3D Perspective Effect Depth Function", "text/x-lua", this::updateDepthFunction)); depthFunctionButton.setOnAction(e -> Gui.launchCodeEditor(script, "3D Perspective Effect Depth Function", "text/x-lua", this::updateDepthFunction));
List.of(rotateSpeed3D, rotateX, rotateY, rotateZ, zPos).forEach(ecg -> ecg.setInactive(true));
} }
private void updateDepthFunction(byte[] fileData, String fileName) { private void updateDepthFunction(byte[] fileData, String fileName) {