mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 11:39:11 +03:00
Фикс удаления папки загрузок
This commit is contained in:
parent
4a74816634
commit
9c5d132ebc
1 changed files with 12 additions and 12 deletions
|
@ -31,7 +31,7 @@ var settingsClass = Java.extend(LauncherSettingsClass.static, {
|
||||||
var settingsOverlay = {
|
var settingsOverlay = {
|
||||||
/* ===================== OVERLAY ===================== */
|
/* ===================== OVERLAY ===================== */
|
||||||
overlay: null, ramLabel: null, dirLabel: null,
|
overlay: null, ramLabel: null, dirLabel: null,
|
||||||
deleteDirPressedAgain: false,
|
deleteDirPressedAgain: false, count = 0,
|
||||||
|
|
||||||
initOverlay: function() {
|
initOverlay: function() {
|
||||||
settingsOverlay.overlay = loadFXML("dialog/overlay/settings/settings.fxml");
|
settingsOverlay.overlay = loadFXML("dialog/overlay/settings/settings.fxml");
|
||||||
|
@ -92,25 +92,25 @@ var settingsOverlay = {
|
||||||
// Lookup delete dir button
|
// Lookup delete dir button
|
||||||
var deleteDirButton = holder.lookup("#deleteDir");
|
var deleteDirButton = holder.lookup("#deleteDir");
|
||||||
deleteDirButton.setOnAction(function(event) {
|
deleteDirButton.setOnAction(function(event) {
|
||||||
if (!settings.deleteDirPressedAgain) {
|
if (!settingsOverlay.deleteDirPressedAgain) {
|
||||||
settings.deleteDirPressedAgain = true;
|
settingsOverlay.deleteDirPressedAgain = true;
|
||||||
deleteDirButton.setText("Подтвердить");
|
deleteDirButton.setText("Подтвердить");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete dir!
|
// Delete dir!
|
||||||
settings.deleteUpdatesDir();
|
settingsOverlay.deleteUpdatesDir();
|
||||||
settings.deleteDirPressedAgain = false;
|
settingsOverlay.deleteDirPressedAgain = false;
|
||||||
settings.count = settings.count+1;
|
settingsOverlay.count = settingsOverlay.count+1;
|
||||||
if(settings.count>9){
|
if(settingsOverlay.count>9){
|
||||||
javafx.application.Platform.exit();
|
javafx.application.Platform.exit();
|
||||||
}
|
}
|
||||||
deleteDirButton.setText(
|
deleteDirButton.setText(
|
||||||
settings.count>8?"Прощай :(":
|
settingsOverlay.count>8?"Прощай :(":
|
||||||
(settings.count>7?"Я умираю!":
|
(settingsOverlay.count>7?"Я умираю!":
|
||||||
(settings.count>5?"DeathCry, спаси!":
|
(settingsOverlay.count>5?"DeathCry, спаси!":
|
||||||
(settings.count>4?"Умоляю, перестань!":
|
(settingsOverlay.count>4?"Умоляю, перестань!":
|
||||||
(settings.count>3?"Да хорош уже!":"Ещё раз")
|
(settingsOverlay.count>3?"Да хорош уже!":"Ещё раз")
|
||||||
))));
|
))));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue