mirror of
https://github.com/doublespeakgames/adarkroom.git
synced 2026-06-28 07:12:30 +08:00
Merge pull request 104 - Dropbox connector.
This commit is contained in:
+2
-2
@@ -19,8 +19,8 @@
|
|||||||
|
|
||||||
options: {
|
options: {
|
||||||
log: false,
|
log: false,
|
||||||
key: 'YOUR_DROPBOX_APP_KEY', // get one at https://www.dropbox.com/developers/apps
|
key: 'q7vyvfsakyfmp3o',
|
||||||
table: 'adarkroom' // use whatever you like
|
table: 'adarkroom'
|
||||||
},
|
},
|
||||||
|
|
||||||
client: false,
|
client: false,
|
||||||
|
|||||||
+12
-12
@@ -78,7 +78,7 @@
|
|||||||
state: null,
|
state: null,
|
||||||
debug: false,
|
debug: false,
|
||||||
log: false,
|
log: false,
|
||||||
dropbox: true
|
dropbox: true
|
||||||
},
|
},
|
||||||
|
|
||||||
init: function(options) {
|
init: function(options) {
|
||||||
@@ -153,22 +153,22 @@
|
|||||||
.click(Engine.exportImport)
|
.click(Engine.exportImport)
|
||||||
.appendTo(menu);
|
.appendTo(menu);
|
||||||
|
|
||||||
|
if(this.options.dropbox && Engine.Dropbox) {
|
||||||
|
this.dropbox = Engine.Dropbox.init();
|
||||||
|
|
||||||
|
$('<span>')
|
||||||
|
.addClass('menuBtn')
|
||||||
|
.text(_('dropbox.'))
|
||||||
|
.click(Engine.Dropbox.startDropbox)
|
||||||
|
.appendTo(menu);
|
||||||
|
}
|
||||||
|
|
||||||
$('<span>')
|
$('<span>')
|
||||||
.addClass('menuBtn')
|
.addClass('menuBtn')
|
||||||
.text(_('app store.'))
|
.text(_('app store.'))
|
||||||
.click(function() { window.open('https://itunes.apple.com/us/app/a-dark-room/id736683061'); })
|
.click(function() { window.open('https://itunes.apple.com/us/app/a-dark-room/id736683061'); })
|
||||||
.appendTo(menu);
|
.appendTo(menu);
|
||||||
|
|
||||||
if(this.options.dropbox && Engine.Dropbox) {
|
|
||||||
this.dropbox = Engine.Dropbox.init();
|
|
||||||
|
|
||||||
$('<span>')
|
|
||||||
.addClass('menuBtn')
|
|
||||||
.text(_('dropbox.'))
|
|
||||||
.click(Engine.Dropbox.startDropbox)
|
|
||||||
.appendTo(menu);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Register keypress handlers
|
// Register keypress handlers
|
||||||
$('body').off('keydown').keydown(Engine.keyDown);
|
$('body').off('keydown').keydown(Engine.keyDown);
|
||||||
$('body').off('keyup').keyup(Engine.keyUp);
|
$('body').off('keyup').keyup(Engine.keyUp);
|
||||||
@@ -180,7 +180,7 @@
|
|||||||
swipeElement.on('swipeup', Engine.swipeUp);
|
swipeElement.on('swipeup', Engine.swipeUp);
|
||||||
swipeElement.on('swipedown', Engine.swipeDown);
|
swipeElement.on('swipedown', Engine.swipeDown);
|
||||||
|
|
||||||
//subscribe to stateUpdates
|
// subscribe to stateUpdates
|
||||||
$.Dispatch('stateUpdate').subscribe(Engine.handleStateUpdates);
|
$.Dispatch('stateUpdate').subscribe(Engine.handleStateUpdates);
|
||||||
|
|
||||||
$SM.init();
|
$SM.init();
|
||||||
|
|||||||
Reference in New Issue
Block a user