mirror of
https://github.com/doublespeakgames/adarkroom.git
synced 2026-05-28 00:01:54 +08:00
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:
committed by
Blake Grotewold
parent
c4535c029a
commit
64a02c162c
+15
-21
@@ -275,7 +275,7 @@
|
||||
buttons: {
|
||||
'export': {
|
||||
text: _('export'),
|
||||
onChoose: Engine.export64
|
||||
nextScene: {1: 'inputExport'}
|
||||
},
|
||||
'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': {
|
||||
text: [
|
||||
_('are you sure?'),
|
||||
@@ -301,7 +313,7 @@
|
||||
},
|
||||
'no': {
|
||||
text: _('no'),
|
||||
nextScene: 'end'
|
||||
nextScene: {1: 'start'}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -335,26 +347,8 @@
|
||||
|
||||
export64: function() {
|
||||
Engine.saveGame();
|
||||
var string64 = Engine.generateExport64();
|
||||
Engine.enableSelection();
|
||||
Events.startEvent({
|
||||
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');
|
||||
return Engine.generateExport64();
|
||||
},
|
||||
|
||||
import64: function(string64) {
|
||||
|
||||
@@ -651,6 +651,7 @@ var Events = {
|
||||
if(scene.readonly) {
|
||||
ta.attr('readonly', true);
|
||||
}
|
||||
Engine.autoSelect('#description textarea');
|
||||
}
|
||||
|
||||
// Draw any loot
|
||||
|
||||
Reference in New Issue
Block a user