Skip to content

Instantly share code, notes, and snippets.

@gashtio
Created February 21, 2013 20:35
Show Gist options
  • Save gashtio/5007984 to your computer and use it in GitHub Desktop.
Save gashtio/5007984 to your computer and use it in GitHub Desktop.
HTML code for displaying an in-game popup
<html>
<head>
<script type='text/javascript' src="js/jquery-1.9.1.min.js"></script>
<script type='text/javascript' src="js/jquery-ui-1.10.1.custom.min.js"></script>
<script type='text/javascript' src="js/coherent.js"></script>
<link rel="stylesheet" href="css/achievement.css" />
</head>
<body>
<div id="achievementPopupMechSlayer" class="achievementPopupBottomPlacer">
<div class="achievementPopup">
<div class="achievementText">
Achievement unlocked
<br />
Slayed the mech warrior!
</div>
</div>
</div>
</body>
<script type='text/javascript' src="js/facebook.js"></script>
<script type='text/javascript'>
$('#achievementPopupMechSlayer').hide();
function ShowAchievementPopup() {
$('#achievementPopupMechSlayer').fadeIn('slow', function() {
setTimeout(function() { $('#achievementPopupMechSlayer').fadeOut('slow'); }, 5000);
});
}
// Subscribe for engine events
engine.on('ShowAchievementPopup', ShowAchievementPopup);
engine.on('PostOnWall', PostOnWall);
engine.on('UploadImageOnFacebook', UploadImageOnFacebook);
</script>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment