Modified command destination for save

Export dialog replaces selection dialog, rather than overlapping it.
Closing it exits the panel and returns to current game.
Aborting Import dialog returns the player to the selection screen, so that s/he can save before trying to load.
This commit is contained in:
Andrea Rendine
2015-05-17 16:06:09 +02:00
committed by Blake Grotewold
parent c4535c029a
commit 64a02c162c
2 changed files with 16 additions and 21 deletions
+15 -21
View File
@@ -275,7 +275,7 @@
buttons: { buttons: {
'export': { 'export': {
text: _('export'), text: _('export'),
onChoose: Engine.export64 nextScene: {1: 'inputExport'}
}, },
'import': { 'import': {
text: _('import'), text: _('import'),
@@ -287,6 +287,18 @@
} }
} }
}, },
'inputExport': {
text: [_('save this.')],
textarea: Engine.export64(),
readonly: true,
buttons: {
'done': {
text: _('got it'),
nextScene: 'end',
onChoose: Engine.disableSelection
}
}
},
'confirm': { 'confirm': {
text: [ text: [
_('are you sure?'), _('are you sure?'),
@@ -301,7 +313,7 @@
}, },
'no': { 'no': {
text: _('no'), text: _('no'),
nextScene: 'end' nextScene: {1: 'start'}
} }
} }
}, },
@@ -335,26 +347,8 @@
export64: function() { export64: function() {
Engine.saveGame(); Engine.saveGame();
var string64 = Engine.generateExport64();
Engine.enableSelection(); Engine.enableSelection();
Events.startEvent({ return Engine.generateExport64();
title: _('Export'),
scenes: {
start: {
text: [_('save this.')],
textarea: string64,
readonly: true,
buttons: {
'done': {
text: _('got it'),
nextScene: 'end',
onChoose: Engine.disableSelection
}
}
}
}
});
Engine.autoSelect('#description textarea');
}, },
import64: function(string64) { import64: function(string64) {
+1
View File
@@ -651,6 +651,7 @@ var Events = {
if(scene.readonly) { if(scene.readonly) {
ta.attr('readonly', true); ta.attr('readonly', true);
} }
Engine.autoSelect('#description textarea');
} }
// Draw any loot // Draw any loot