forked from j62/ctbrec
Add setting to toggle Player Starting message
This commit is contained in:
parent
2c716d3c88
commit
c17dcc4216
|
@ -348,7 +348,7 @@ public class RecordedModelsTab extends Tab implements TabSelectionListener {
|
|||
new Thread(() -> {
|
||||
boolean started = Player.play(selectedModel);
|
||||
Platform.runLater(() -> {
|
||||
if(started) {
|
||||
if(started && Config.getInstance().getSettings().showPlayerStarting) {
|
||||
Toast.makeText(getTabPane().getScene(), "Starting Player", 2000, 500, 500);
|
||||
}
|
||||
table.setCursor(Cursor.DEFAULT);
|
||||
|
|
|
@ -497,7 +497,7 @@ public class RecordingsTab extends Tab implements TabSelectionListener {
|
|||
@Override
|
||||
public void run() {
|
||||
boolean started = Player.play(recording);
|
||||
if(started) {
|
||||
if(started && Config.getInstance().getSettings().showPlayerStarting) {
|
||||
Platform.runLater(() -> Toast.makeText(getTabPane().getScene(), "Starting Player", 2000, 500, 500));
|
||||
}
|
||||
}
|
||||
|
@ -509,7 +509,7 @@ public class RecordingsTab extends Tab implements TabSelectionListener {
|
|||
@Override
|
||||
public void run() {
|
||||
boolean started = Player.play(url);
|
||||
if(started) {
|
||||
if(started && Config.getInstance().getSettings().showPlayerStarting) {
|
||||
Platform.runLater(() -> Toast.makeText(getTabPane().getScene(), "Starting Player", 2000, 500, 500));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,6 +72,7 @@ public class SettingsTab extends Tab implements TabSelectionListener {
|
|||
private CheckBox chooseStreamQuality = new CheckBox();
|
||||
private CheckBox multiplePlayers = new CheckBox();
|
||||
private CheckBox updateThumbnails = new CheckBox();
|
||||
private CheckBox showPlayerStarting = new CheckBox();
|
||||
private RadioButton recordLocal;
|
||||
private RadioButton recordRemote;
|
||||
private ToggleGroup recordLocation;
|
||||
|
@ -409,6 +410,18 @@ public class SettingsTab extends Tab implements TabSelectionListener {
|
|||
GridPane.setMargin(multiplePlayers, new Insets(CHECKBOX_MARGIN, 0, 0, CHECKBOX_MARGIN));
|
||||
layout.add(multiplePlayers, 1, row++);
|
||||
|
||||
l = new Label("Show \"Player Starting\" Message");
|
||||
layout.add(l, 0, row);
|
||||
showPlayerStarting.setSelected(Config.getInstance().getSettings().showPlayerStarting);
|
||||
showPlayerStarting.setOnAction((e) -> {
|
||||
Config.getInstance().getSettings().showPlayerStarting = showPlayerStarting.isSelected();
|
||||
saveConfig();
|
||||
});
|
||||
GridPane.setMargin(l, new Insets(CHECKBOX_MARGIN, 0, 0, 0));
|
||||
GridPane.setMargin(showPlayerStarting, new Insets(CHECKBOX_MARGIN, 0, 0, CHECKBOX_MARGIN));
|
||||
layout.add(showPlayerStarting, 1, row++);
|
||||
|
||||
|
||||
l = new Label("Display stream resolution in overview");
|
||||
layout.add(l, 0, row);
|
||||
loadResolution = new CheckBox();
|
||||
|
|
|
@ -308,7 +308,7 @@ public class ThumbCell extends StackPane {
|
|||
boolean started = Player.play(model);
|
||||
Platform.runLater(() -> {
|
||||
setCursor(Cursor.DEFAULT);
|
||||
if (started) {
|
||||
if (started && Config.getInstance().getSettings().showPlayerStarting) {
|
||||
Toast.makeText(getScene(), "Starting Player", 2000, 500, 500);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -38,6 +38,7 @@ import java.util.Optional;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import ctbrec.Config;
|
||||
import ctbrec.Model;
|
||||
import ctbrec.recorder.Recorder;
|
||||
import ctbrec.ui.Player;
|
||||
|
@ -86,7 +87,7 @@ public class SearchPopoverTreeList extends PopoverTreeList<Model> implements Pop
|
|||
new Thread(() -> {
|
||||
Platform.runLater(() -> {
|
||||
boolean started = Player.play(model);
|
||||
if(started) {
|
||||
if(started && Config.getInstance().getSettings().showPlayerStarting) {
|
||||
Toast.makeText(getScene(), "Starting Player", 2000, 500, 500);
|
||||
}
|
||||
setCursor(Cursor.DEFAULT);
|
||||
|
|
|
@ -30,6 +30,7 @@ public class Settings {
|
|||
}
|
||||
|
||||
public boolean singlePlayer = true;
|
||||
public boolean showPlayerStarting = true;
|
||||
public boolean localRecording = true;
|
||||
public int httpPort = 8080;
|
||||
public int httpTimeout = 10000;
|
||||
|
|
Loading…
Reference in New Issue