diff --git a/Launcher/runtime/dialog/dialog.js b/Launcher/runtime/dialog/dialog.js
index 9bd80975..2ca9cf9d 100644
--- a/Launcher/runtime/dialog/dialog.js
+++ b/Launcher/runtime/dialog/dialog.js
@@ -278,10 +278,13 @@ function updateProfilesList(profiles) {
profiles.forEach(function (profile, i, arr) {
pingers[profile.object] = new ServerPinger(profile.object.getServerSocketAddress(), profile.object.getVersion());
var serverBtn = new javafx.scene.control.ToggleButton(profile);
- profilesList[serverBtn] = profile;
- serverBtn.setOnAction(function (event) {
- serverHolder.set(serverBtn);
- });
+ (function () {
+ profilesList[serverBtn] = profile;
+ var hold = serverBtn;
+ serverBtn.setOnAction(function (event) {
+ serverHolder.set(hold);
+ });
+ })();
serverList.getChildren().add(serverBtn);
});
serverHolder.set(serverList.getChildren().get(0));
diff --git a/Launcher/runtime/dialog/overlay/debug/debug.css b/Launcher/runtime/dialog/overlay/debug/debug.css
index b4a3e994..ccfc28be 100644
--- a/Launcher/runtime/dialog/overlay/debug/debug.css
+++ b/Launcher/runtime/dialog/overlay/debug/debug.css
@@ -1,5 +1,3 @@
-@import url(../../styles/common.css);
-
/* Output */
#overlay > #output {
-fx-background-color: white;
diff --git a/Launcher/runtime/dialog/overlay/options/options.fxml b/Launcher/runtime/dialog/overlay/options/options.fxml
index 46c708a4..9149061a 100644
--- a/Launcher/runtime/dialog/overlay/options/options.fxml
+++ b/Launcher/runtime/dialog/overlay/options/options.fxml
@@ -3,8 +3,9 @@
-
+
+
@@ -12,14 +13,18 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Launcher/runtime/dialog/overlay/options/options.js b/Launcher/runtime/dialog/overlay/options/options.js
index 6e72f6be..5ad2fc0e 100644
--- a/Launcher/runtime/dialog/overlay/options/options.js
+++ b/Launcher/runtime/dialog/overlay/options/options.js
@@ -45,7 +45,7 @@ var options = {
};
function updateOptional()
{
- var holder = options.overlay.lookup("#modlist");
+ var holder = options.overlay.lookup("#modlist").getContent();
var nodelist = new java.util.ArrayList;
holder.getChildren().forEach(function(node,i,arr) {
@@ -62,8 +62,6 @@ function updateOptional()
var testMod = new javafx.scene.control.CheckBox(modfile.string);
testMod.setSelected(modfile.mark);
- //testMod.setLayoutY(2+3*i);
- //testMod.setLayoutX(2);
testMod.setOnAction(function(event) {
var isSelected = event.getSource().isSelected();
if(isSelected)
diff --git a/Launcher/runtime/dialog/overlay/settings/settings.fxml b/Launcher/runtime/dialog/overlay/settings/settings.fxml
index 8655ab3f..1bc40df3 100644
--- a/Launcher/runtime/dialog/overlay/settings/settings.fxml
+++ b/Launcher/runtime/dialog/overlay/settings/settings.fxml
@@ -4,7 +4,6 @@
-
@@ -19,27 +18,36 @@
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+ Выделение памяти:
+
diff --git a/Launcher/runtime/dialog/overlay/settings/settings.js b/Launcher/runtime/dialog/overlay/settings/settings.js
index b65c79b5..d4225b39 100644
--- a/Launcher/runtime/dialog/overlay/settings/settings.js
+++ b/Launcher/runtime/dialog/overlay/settings/settings.js
@@ -24,9 +24,16 @@ var settingsClass = Java.extend(LauncherSettingsClass.static, {
var encrypted = SecurityHelper.newRSAEncryptCipher(Launcher.getConfig().publicKey).doFinal(IOHelper.encode(password));
//settings.password = encrypted;
return encrypted;
- }
+ },
+ setRAM: function(ram) {
+ if (ram>762&&ram<1024){
+ settings.ram = java.lang.Math["min(int,int)"](ram, JVMHelper.RAM);
+ }else{
+ settings.ram = java.lang.Math["min(int,int)"](((ram / 256) | 0) * 256, JVMHelper.RAM);
+ }
+ },
});
var settingsOverlay = {
/* ===================== OVERLAY ===================== */
@@ -64,7 +71,6 @@ var settingsOverlay = {
}
});
-
// Lookup fullScreen checkbox
var fullScreenBox = holder.lookup("#fullScreen");
fullScreenBox.setSelected(settings.fullScreen);
@@ -77,16 +83,17 @@ var settingsOverlay = {
// Lookup RAM slider options
var ramSlider = holder.lookup("#ramSlider");
- ramSlider.setMin(0);
ramSlider.setMax(JVMHelper.RAM);
ramSlider.setSnapToTicks(true);
+ ramSlider.setShowTickMarks(true);
+ ramSlider.setShowTickLabels(true);
ramSlider.setMinorTickCount(3);
- //ramSlider.setMajorTickUnit(1024);
- //ramSlider.setBlockIncrement(1024);
+ ramSlider.setMajorTickUnit(1024);
+ ramSlider.setBlockIncrement(1024);
ramSlider.setValue(settings.ram);
ramSlider.valueProperty()["addListener(javafx.beans.value.ChangeListener)"](function(o, ov, nv) {
settings.setRAM(nv);
- settingsOverlay.updateRAMLabel();
+ settings.updateRAMLabel();
});
// Lookup delete dir button