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(() -> {
|
new Thread(() -> {
|
||||||
boolean started = Player.play(selectedModel);
|
boolean started = Player.play(selectedModel);
|
||||||
Platform.runLater(() -> {
|
Platform.runLater(() -> {
|
||||||
if(started) {
|
if(started && Config.getInstance().getSettings().showPlayerStarting) {
|
||||||
Toast.makeText(getTabPane().getScene(), "Starting Player", 2000, 500, 500);
|
Toast.makeText(getTabPane().getScene(), "Starting Player", 2000, 500, 500);
|
||||||
}
|
}
|
||||||
table.setCursor(Cursor.DEFAULT);
|
table.setCursor(Cursor.DEFAULT);
|
||||||
|
|
|
@ -497,7 +497,7 @@ public class RecordingsTab extends Tab implements TabSelectionListener {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
boolean started = Player.play(recording);
|
boolean started = Player.play(recording);
|
||||||
if(started) {
|
if(started && Config.getInstance().getSettings().showPlayerStarting) {
|
||||||
Platform.runLater(() -> Toast.makeText(getTabPane().getScene(), "Starting Player", 2000, 500, 500));
|
Platform.runLater(() -> Toast.makeText(getTabPane().getScene(), "Starting Player", 2000, 500, 500));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -509,7 +509,7 @@ public class RecordingsTab extends Tab implements TabSelectionListener {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
boolean started = Player.play(url);
|
boolean started = Player.play(url);
|
||||||
if(started) {
|
if(started && Config.getInstance().getSettings().showPlayerStarting) {
|
||||||
Platform.runLater(() -> Toast.makeText(getTabPane().getScene(), "Starting Player", 2000, 500, 500));
|
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 chooseStreamQuality = new CheckBox();
|
||||||
private CheckBox multiplePlayers = new CheckBox();
|
private CheckBox multiplePlayers = new CheckBox();
|
||||||
private CheckBox updateThumbnails = new CheckBox();
|
private CheckBox updateThumbnails = new CheckBox();
|
||||||
|
private CheckBox showPlayerStarting = new CheckBox();
|
||||||
private RadioButton recordLocal;
|
private RadioButton recordLocal;
|
||||||
private RadioButton recordRemote;
|
private RadioButton recordRemote;
|
||||||
private ToggleGroup recordLocation;
|
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));
|
GridPane.setMargin(multiplePlayers, new Insets(CHECKBOX_MARGIN, 0, 0, CHECKBOX_MARGIN));
|
||||||
layout.add(multiplePlayers, 1, row++);
|
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");
|
l = new Label("Display stream resolution in overview");
|
||||||
layout.add(l, 0, row);
|
layout.add(l, 0, row);
|
||||||
loadResolution = new CheckBox();
|
loadResolution = new CheckBox();
|
||||||
|
|
|
@ -308,7 +308,7 @@ public class ThumbCell extends StackPane {
|
||||||
boolean started = Player.play(model);
|
boolean started = Player.play(model);
|
||||||
Platform.runLater(() -> {
|
Platform.runLater(() -> {
|
||||||
setCursor(Cursor.DEFAULT);
|
setCursor(Cursor.DEFAULT);
|
||||||
if (started) {
|
if (started && Config.getInstance().getSettings().showPlayerStarting) {
|
||||||
Toast.makeText(getScene(), "Starting Player", 2000, 500, 500);
|
Toast.makeText(getScene(), "Starting Player", 2000, 500, 500);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -38,6 +38,7 @@ import java.util.Optional;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import ctbrec.Config;
|
||||||
import ctbrec.Model;
|
import ctbrec.Model;
|
||||||
import ctbrec.recorder.Recorder;
|
import ctbrec.recorder.Recorder;
|
||||||
import ctbrec.ui.Player;
|
import ctbrec.ui.Player;
|
||||||
|
@ -86,7 +87,7 @@ public class SearchPopoverTreeList extends PopoverTreeList<Model> implements Pop
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
Platform.runLater(() -> {
|
Platform.runLater(() -> {
|
||||||
boolean started = Player.play(model);
|
boolean started = Player.play(model);
|
||||||
if(started) {
|
if(started && Config.getInstance().getSettings().showPlayerStarting) {
|
||||||
Toast.makeText(getScene(), "Starting Player", 2000, 500, 500);
|
Toast.makeText(getScene(), "Starting Player", 2000, 500, 500);
|
||||||
}
|
}
|
||||||
setCursor(Cursor.DEFAULT);
|
setCursor(Cursor.DEFAULT);
|
||||||
|
|
|
@ -30,6 +30,7 @@ public class Settings {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean singlePlayer = true;
|
public boolean singlePlayer = true;
|
||||||
|
public boolean showPlayerStarting = true;
|
||||||
public boolean localRecording = true;
|
public boolean localRecording = true;
|
||||||
public int httpPort = 8080;
|
public int httpPort = 8080;
|
||||||
public int httpTimeout = 10000;
|
public int httpTimeout = 10000;
|
||||||
|
|
Loading…
Reference in New Issue