added showing and hiding of buttons, made buttons appear onload (instead of having ugly iframes / skeletons, other misc changes
This commit is contained in:
parent
fa2a6433fc
commit
fcaac9396d
5 changed files with 17 additions and 4 deletions
|
@ -70,8 +70,10 @@
|
|||
<div id = 'restartBtn'><i class="fa fa-refresh fa-2x"></i></div>
|
||||
<div id="bottombar">
|
||||
<a href="https://twitter.com/share" class="twitter-share-button" data-hashtags="hextris">Tweet</a>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<iframe src="http://ghbtns.com/github-btn.html?user=Hextris&repo=Hextris&type=watch&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="80" height="20"></iframe>
|
||||
<script>
|
||||
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');
|
||||
</script>
|
||||
<iframe src="http://ghbtns.com/github-btn.html?user=Hextris&repo=Hextris&type=watch&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="80" height="20" onload='showbottombar()'></iframe>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,8 +1,17 @@
|
|||
|
||||
$(document).ready(function(){
|
||||
initialize();
|
||||
hidebottombar();
|
||||
});
|
||||
|
||||
function showbottombar() {
|
||||
$('#bottombar').show();
|
||||
}
|
||||
|
||||
function hidebottombar() {
|
||||
$('#bottombar').hide();
|
||||
}
|
||||
|
||||
function initialize(a) {
|
||||
//view.js
|
||||
window.colors = ["#e74c3c", "#f1c40f", "#3498db", "#2ecc71"];
|
||||
|
|
|
@ -63,6 +63,7 @@ function hideUIElements() {
|
|||
|
||||
function init(b) {
|
||||
if (b) {
|
||||
hidebottombar();
|
||||
if (!$('.helpText').is(":visible")) {
|
||||
$('.helpText').fadeIn(150, "linear");
|
||||
}
|
||||
|
@ -229,7 +230,7 @@ function animLoop() {
|
|||
if ($('#helpScreen').is(':visible')) {
|
||||
$('#helpScreen').fadeOut(150, "linear");
|
||||
}
|
||||
|
||||
showbottombar();
|
||||
canRestart = 0;
|
||||
clearSaveState();
|
||||
}
|
||||
|
|
|
@ -221,11 +221,13 @@ function pause(o) {
|
|||
|
||||
$('.helpText').hide();
|
||||
hideText();
|
||||
hidebottombar();
|
||||
gameState = prevGameState;
|
||||
|
||||
}
|
||||
else if(gameState != -2 && gameState !== 0 && gameState !== 2) {
|
||||
$('.helpText').show();
|
||||
showbottombar();
|
||||
if (message == 'paused') {
|
||||
showText(message);
|
||||
}
|
||||
|
|
|
@ -193,7 +193,6 @@ and (max-device-width : 580px) {
|
|||
font-size:.6em;
|
||||
}
|
||||
|
||||
|
||||
.centeredSubHeader {
|
||||
font-size:1em;
|
||||
text-align:center;
|
||||
|
|
Loading…
Reference in a new issue