Skip to content

Commit

Permalink
A few small tweaks, and added link to the iOS app.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael! committed Nov 14, 2013
1 parent 52974ea commit c27430f
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 30 deletions.
22 changes: 7 additions & 15 deletions css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,29 +48,21 @@ div#header {
height: 20px;
}

.deleteSave {
.menu {
position: absolute;
right: 10px;
bottom: 10px;
cursor: pointer;
color: #666;
}

.manualSave {
position: absolute;
right: 125px;
bottom: 10px;
.menu span {
cursor: pointer;
float: right;
margin-left: 20px;
}

.deleteSave:hover, .share:hover, .manualSave:hover {
text-decoration: underline;
}

.share {
position: absolute;
right: 70px;
bottom: 10px;
cursor: pointer;
.menu span:hover {
text-decoration: underline;
}

div.headerButton {
Expand Down
7 changes: 6 additions & 1 deletion css/space.css
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,9 @@

.endGameRestart {
font-size: 32px;
}
cursor: pointer;
}

.endGameRestart:hover {
text-decoration: underline;
}
26 changes: 18 additions & 8 deletions script/engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,23 +94,33 @@ var Engine = {

$('<div>').attr('id', 'locationSlider').appendTo('#main');

var menu = $('<div>')
.addClass('menu')
.appendTo('body');

$('<span>')
.addClass('deleteSave')
.addClass('menuBtn')
.text('restart.')
.click(Engine.confirmDelete)
.appendTo('body');
.appendTo(menu);

$('<div>')
.addClass('share')
$('<span>')
.addClass('menuBtn')
.text('share.')
.click(Engine.share)
.appendTo('body');
.appendTo(menu);

$('<span>')
.addClass('manualSave')
$('<span>')
.addClass('menuBtn')
.text('save.')
.click(Engine.exportImport)
.appendTo('body');
.appendTo(menu);

$('<span>')
.addClass('menuBtn')
.text('app store.')
.click(function() { window.open('https://itunes.apple.com/us/app/a-dark-room/id736683061'); })
.appendTo(menu);

// Register keypress handlers
$('body').off('keydown').keydown(Engine.keyDown);
Expand Down
9 changes: 3 additions & 6 deletions script/space.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ var Space = {
}, 1000);

Space._panelTimeout = setTimeout(function() {
$('#spacePanel, .deleteSave, .share, .manualSave').animate({color: 'white'}, 500, 'linear');
$('#spacePanel, .menu').animate({color: 'white'}, 500, 'linear');
}, Space.FTB_SPEED / 2);

Space.createAsteroid();
Expand Down Expand Up @@ -331,7 +331,7 @@ var Space = {
$('#starsContainer').remove();
}
});
$('#spacePanel, .deleteSave, .share, .manualSave').animate({color: 'black'}, 300, 'linear');
$('#spacePanel, .menu').animate({color: 'black'}, 300, 'linear');
$('#outerSlider').animate({top: '0px'}, 300, 'linear');
Engine.activeModule = Ship;
Ship.onArrival();
Expand Down Expand Up @@ -410,13 +410,10 @@ var Space = {
.appendTo('.centerCont');
$('<br />')
.appendTo('.centerCont');

$('#starsContainer').remove();
$('.deleteSave, .share, .manualSave').remove();
$('#content, #notifications').remove();
$('.deleteSave, .share, .manualSave').attr('style', 'color: white;').animate({opacity:0},1500);
$('<span>')
.addClass('deleteSave endGame endGameRestart')
.addClass('endGame endGameRestart')
.text('restart.')
.click(Engine.confirmDelete)
.appendTo('.centerCont')
Expand Down

0 comments on commit c27430f

Please sign in to comment.