37 lines
1.6 KiB
Java
37 lines
1.6 KiB
Java
package io.gitlab.jfronny.inceptum.gtk.window.settings.launcher;
|
|
|
|
import io.gitlab.jfronny.inceptum.common.InceptumConfig;
|
|
import io.gitlab.jfronny.inceptum.common.model.inceptum.UpdateChannel;
|
|
import io.gitlab.jfronny.inceptum.gtk.control.settings.IRow;
|
|
import io.gitlab.jfronny.inceptum.gtk.control.settings.SettingsTab;
|
|
import org.gnome.gtk.Window;
|
|
|
|
public class GeneralTab extends SettingsTab {
|
|
public GeneralTab(Window window) {
|
|
super(window);
|
|
section(null, section -> {
|
|
{
|
|
IRow row = section.row("settings.general.snapshots", "settings.general.snapshots.subtitle");
|
|
row.setSwitch(InceptumConfig.snapshots, b -> {
|
|
InceptumConfig.snapshots = b;
|
|
InceptumConfig.saveConfig();
|
|
});
|
|
}
|
|
{
|
|
IRow row = section.row("settings.general.update-channel", "settings.general.update-channel.subtitle");
|
|
row.setDropdown(new String[] {"Stable", "CI"}, InceptumConfig.channel == UpdateChannel.CI ? 1 : 0, state -> {
|
|
InceptumConfig.channel = state == 1 ? UpdateChannel.CI : UpdateChannel.Stable;
|
|
InceptumConfig.saveConfig();
|
|
});
|
|
}
|
|
{
|
|
IRow row = section.row("settings.general.author-name", "settings.general.author-name.subtitle");
|
|
row.setEntry(InceptumConfig.authorName, s -> {
|
|
InceptumConfig.authorName = s;
|
|
InceptumConfig.saveConfig();
|
|
});
|
|
}
|
|
});
|
|
}
|
|
}
|