mirror of
https://github.com/JannisX11/blockbench.git
synced 2025-01-30 15:42:42 +08:00
Change "dont show again" in dialogs to checkbox
This commit is contained in:
parent
23b0ef330e
commit
71333cbc27
@ -742,7 +742,7 @@ function rotateOnAxis(modify, axis, slider) {
|
||||
}
|
||||
*/
|
||||
//Warning
|
||||
if (Format.rotation_limit && settings.dialog_rotation_limit.value) {
|
||||
if (Format.rotation_limit && settings.dialog_rotation_limit.value && !Dialog.open) {
|
||||
var i = 0;
|
||||
while (i < Cube.selected.length) {
|
||||
if (Cube.selected[i].rotation[(axis+1)%3] ||
|
||||
@ -754,11 +754,12 @@ function rotateOnAxis(modify, axis, slider) {
|
||||
title: tl('message.rotation_limit.title'),
|
||||
icon: 'rotate_right',
|
||||
message: tl('message.rotation_limit.message'),
|
||||
buttons: [tl('dialog.ok'), tl('dialog.dontshowagain')]
|
||||
}, function(r) {
|
||||
if (r === 1) {
|
||||
settings.dialog_rotation_limit.value = false
|
||||
Settings.save()
|
||||
checkboxes: {
|
||||
dont_show_again: {value: false, text: 'dialog.dontshowagain'}
|
||||
}
|
||||
}, (button, {dont_show_again}) => {
|
||||
if (dont_show_again) {
|
||||
settings.dialog_rotation_limit.set(false);
|
||||
}
|
||||
})
|
||||
return;
|
||||
|
@ -420,11 +420,11 @@ class Texture {
|
||||
translateKey: 'invalid_characters',
|
||||
message: tl('message.invalid_characters.message', ['a-z0-9._-']),
|
||||
icon: 'folder_open',
|
||||
buttons: [tl('dialog.ok'), tl('dialog.dontshowagain')],
|
||||
confirm: 0,
|
||||
cancel: 0
|
||||
}, result => {
|
||||
if (result === 1) {
|
||||
checkboxes: {
|
||||
dont_show_again: {value: false, text: 'dialog.dontshowagain'}
|
||||
}
|
||||
}, (button, {dont_show_again}) => {
|
||||
if (dont_show_again) {
|
||||
settings.dialog_invalid_characters.set(false);
|
||||
}
|
||||
})
|
||||
@ -734,14 +734,15 @@ class Texture {
|
||||
Blockbench.showMessageBox({
|
||||
translateKey: 'loose_texture',
|
||||
icon: 'folder_open',
|
||||
buttons: [tl('message.loose_texture.change'), tl('dialog.ok'), tl('dialog.dontshowagain')],
|
||||
confirm: 0,
|
||||
cancel: 1
|
||||
}, result => {
|
||||
if (result === 0) {
|
||||
buttons: [tl('dialog.ok'), tl('message.loose_texture.change')],
|
||||
checkboxes: {
|
||||
dont_show_again: {value: false, text: 'dialog.dontshowagain'}
|
||||
}
|
||||
}, (result, {dont_show_again}) => {
|
||||
if (result === 1) {
|
||||
this.reopen()
|
||||
}
|
||||
if (result === 2) {
|
||||
if (dont_show_again) {
|
||||
settings.dialog_loose_texture.set(false);
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user