mirror of
https://github.com/doublespeakgames/adarkroom.git
synced 2026-06-25 22:02:30 +08:00
Use a textarea instead of a prompt for export to prevent truncation in
Chrome.
This commit is contained in:
@@ -427,6 +427,11 @@ body.noMask .eventTitle:after {
|
|||||||
min-height: 100px;
|
min-height: 100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#description textarea {
|
||||||
|
width: 100%;
|
||||||
|
height: 225px;
|
||||||
|
}
|
||||||
|
|
||||||
body.noMask #description {
|
body.noMask #description {
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|||||||
+32
-19
@@ -200,11 +200,10 @@ var Engine = {
|
|||||||
scenes: {
|
scenes: {
|
||||||
start: {
|
start: {
|
||||||
text: ['export or import save data, for backing up',
|
text: ['export or import save data, for backing up',
|
||||||
'or migrating computers'],
|
'or migrating computers'],
|
||||||
buttons: {
|
buttons: {
|
||||||
'export': {
|
'export': {
|
||||||
text: 'export',
|
text: 'export',
|
||||||
nextScene: 'end',
|
|
||||||
onChoose: Engine.export64
|
onChoose: Engine.export64
|
||||||
},
|
},
|
||||||
'import': {
|
'import': {
|
||||||
@@ -217,22 +216,22 @@ var Engine = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'confirm': {
|
'confirm': {
|
||||||
text: ['are you sure?',
|
text: ['are you sure?',
|
||||||
'if the code is invalid, all data will be lost.',
|
'if the code is invalid, all data will be lost.',
|
||||||
'this is irreversible.'],
|
'this is irreversible.'],
|
||||||
buttons: {
|
buttons: {
|
||||||
'yes': {
|
'yes': {
|
||||||
text: 'yes',
|
text: 'yes',
|
||||||
nextScene: 'end',
|
nextScene: 'end',
|
||||||
onChoose: Engine.import64
|
onChoose: Engine.import64
|
||||||
},
|
},
|
||||||
'no': {
|
'no': {
|
||||||
text: 'no',
|
text: 'no',
|
||||||
nextScene: 'end'
|
nextScene: 'end'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -243,7 +242,21 @@ var Engine = {
|
|||||||
string64 = string64.replace(/\s/g, '');
|
string64 = string64.replace(/\s/g, '');
|
||||||
string64 = string64.replace(/\./g, '');
|
string64 = string64.replace(/\./g, '');
|
||||||
string64 = string64.replace(/\n/g, '');
|
string64 = string64.replace(/\n/g, '');
|
||||||
prompt("save this.",string64);
|
Events.startEvent({
|
||||||
|
title: 'Export',
|
||||||
|
scenes: {
|
||||||
|
start: {
|
||||||
|
text: ['save this.'],
|
||||||
|
textarea: string64,
|
||||||
|
buttons: {
|
||||||
|
'done': {
|
||||||
|
text: 'got it',
|
||||||
|
nextScene: 'end'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
import64: function() {
|
import64: function() {
|
||||||
|
|||||||
@@ -611,6 +611,10 @@ var Events = {
|
|||||||
$('<div>').text(scene.text[i]).appendTo(desc);
|
$('<div>').text(scene.text[i]).appendTo(desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(scene.textarea) {
|
||||||
|
$('<textarea>').val(scene.textarea).appendTo(desc);
|
||||||
|
}
|
||||||
|
|
||||||
// Draw any loot
|
// Draw any loot
|
||||||
if(scene.loot) {
|
if(scene.loot) {
|
||||||
Events.drawLoot(scene.loot);
|
Events.drawLoot(scene.loot);
|
||||||
|
|||||||
Reference in New Issue
Block a user