private void OnDeletePressed(string saveName) { GUICommon.Instance.PlayButtonPressSound(); saveToBeDeleted = saveName; // Deleting this save cannot be undone, are you sure you want to permanently delete {0}? deleteConfirmDialog.GetNode <Label>("DialogText").Text = string.Format(CultureInfo.CurrentCulture, TranslationServer.Translate("SAVE_DELETE_WARNING"), saveName); deleteConfirmDialog.PopupCenteredShrink(); }
private void Settings_ButtonClicked() { _settingsDialog.GetNode <SpinBox>("VBoxContainer/HBoxContainer/ResolutionSpinBox").Value = _polygonizer.Resolution; _settingsDialog.GetNode <SpinBox>("VBoxContainer/HBoxContainer2/MarginSpinBox").Value = _polygonizer.Margin; _settingsDialog.GetNode <CheckBox>("VBoxContainer/PreviewCheckBox").Pressed = _enablePreview; _settingsDialog.PopupCentered(); }
private void SaveButtonPressed() { GUICommon.Instance.PlayButtonPressSound(); var name = GetSaveName(); if (FileHelpers.Exists(PathUtils.Join(Constants.SAVE_FOLDER, name))) { // The chosen filename ({0}) already exists. Overwrite? overwriteConfirm.GetNode <Label>("DialogText").Text = string.Format(CultureInfo.CurrentCulture, TranslationServer.Translate("THE_CHOSEN_FILENAME_ALREADY_EXISTS"), name); overwriteConfirm.PopupCenteredShrink(); } else { OnConfirmSaveName(); } }