Skip to content
This repository has been archived by the owner on Apr 29, 2018. It is now read-only.

Commit

Permalink
add logo to title screen
Browse files Browse the repository at this point in the history
That's #9 partially dealt with.
  • Loading branch information
Leon Byford committed Mar 30, 2015
1 parent b02a248 commit 7a927c9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
Binary file added img/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 14 additions & 9 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,20 @@ function framesUntilImpact() {
function title() {
ctx.fillStyle = "#000";
ctx.fillRect(0, 0, 640, 480);
ctx.fillStyle = "#fff";
ctx.textAlign = "center";
ctx.font = "32px Verdana";
ctx.fillText("Pongy in the Middle", 640/2, 64);
ctx.fillText("v1.0.1", 640/2, 96);
ctx.fillText("a game by Leon Byford", 640/2, 128);
ctx.fillText("Click to start", 640/2, 256);
ctx.fillText("©2015 Leon Byford", 640/2, 416);
ctx.fillText("http://ldjb.uk/pongy", 640/2, 448);

var logo = new Image();
logo.src = "img/logo.png";
$(logo).on("load", function() {
ctx.drawImage(logo, 57, 10);
ctx.fillStyle = "#fff";
ctx.textAlign = "center";
ctx.font = "16px Verdana";
ctx.fillText("v1.0.1", 640/2, 240);
ctx.fillText("©2015 Leon Byford", 640/2, 432);
ctx.fillText("http://ldjb.uk/pongy", 640/2, 464);
ctx.font = "32px Verdana";
ctx.fillText("Click to start", 640/2, 352);
});

initVars();
flgGameOver = true;
Expand Down

0 comments on commit 7a927c9

Please # to comment.