Added (currently useless) comboBox to change your status
This commit is contained in:
		@@ -8,13 +8,14 @@ import javafx.scene.layout.VBox;
 | 
			
		||||
import envoy.client.data.Settings;
 | 
			
		||||
import envoy.client.data.SettingsItem;
 | 
			
		||||
import envoy.client.event.ThemeChangeEvent;
 | 
			
		||||
import envoy.data.User.UserStatus;
 | 
			
		||||
import envoy.event.EventBus;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Project: <strong>envoy-client</strong><br>
 | 
			
		||||
 * File: <strong>GeneralSettingsPane.java</strong><br>
 | 
			
		||||
 * Created: <strong>18.04.2020</strong><br>
 | 
			
		||||
 * 
 | 
			
		||||
 *
 | 
			
		||||
 * @author Kai S. K. Engelbart
 | 
			
		||||
 * @since Envoy Client v0.1-beta
 | 
			
		||||
 */
 | 
			
		||||
@@ -27,7 +28,7 @@ public class GeneralSettingsPane extends SettingsPane {
 | 
			
		||||
	 */
 | 
			
		||||
	public GeneralSettingsPane() {
 | 
			
		||||
		super("General");
 | 
			
		||||
		var vbox = new VBox();
 | 
			
		||||
		final var vbox = new VBox();
 | 
			
		||||
 | 
			
		||||
		// TODO: Support other value types
 | 
			
		||||
		List.of("onCloseMode", "enterToSend")
 | 
			
		||||
@@ -36,7 +37,7 @@ public class GeneralSettingsPane extends SettingsPane {
 | 
			
		||||
			.map(i -> new SettingsCheckbox((SettingsItem<Boolean>) i))
 | 
			
		||||
			.forEach(vbox.getChildren()::add);
 | 
			
		||||
 | 
			
		||||
		var combobox = new ComboBox<String>();
 | 
			
		||||
		final var combobox = new ComboBox<String>();
 | 
			
		||||
		combobox.getItems().add("dark");
 | 
			
		||||
		combobox.getItems().add("light");
 | 
			
		||||
		combobox.setValue(settings.getCurrentTheme());
 | 
			
		||||
@@ -44,6 +45,13 @@ public class GeneralSettingsPane extends SettingsPane {
 | 
			
		||||
				e -> { settings.setCurrentTheme(combobox.getValue()); EventBus.getInstance().dispatch(new ThemeChangeEvent(combobox.getValue())); });
 | 
			
		||||
		vbox.getChildren().add(combobox);
 | 
			
		||||
 | 
			
		||||
		final var statusComboBox = new ComboBox<UserStatus>();
 | 
			
		||||
		statusComboBox.getItems().setAll(UserStatus.values());
 | 
			
		||||
		statusComboBox.setValue(UserStatus.ONLINE);
 | 
			
		||||
		// TODO add action when value is changed
 | 
			
		||||
		statusComboBox.setOnAction(e -> {});
 | 
			
		||||
		vbox.getChildren().add(statusComboBox);
 | 
			
		||||
 | 
			
		||||
		getChildren().add(vbox);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user