From 002db3ac4092fea0db28c67440bcd8024e097c89 Mon Sep 17 00:00:00 2001 From: raysan5 Date: Sun, 7 Feb 2016 12:36:48 +0100 Subject: Corrected links to games --- games/sample_main.html | 49 ++++++++++++++++++++++--------------------------- js/games_code.js | 7 +++++-- 2 files changed, 27 insertions(+), 29 deletions(-) diff --git a/games/sample_main.html b/games/sample_main.html index a85b2bd3..60523f2c 100644 --- a/games/sample_main.html +++ b/games/sample_main.html @@ -27,27 +27,28 @@ @@ -59,24 +60,17 @@ document.title = "raylib - " + name.replace('_', ' '); - //var codeUrl = '../examples/' + name + '.c'; + var codeUrl = 'https://github.com/raysan5/raylib/blob/develop/games/samples/' + name.substring(7) + '.c'; var imageUrl = 'img/' + name + '.png'; - $('#eximage img').attr('src', imageUrl); - - /* - $.get(codeUrl, function(data) { - $('pre code').text(data); - $('pre code').each(function(i, e) {hljs.highlightBlock(e)}); - }, 'text'); - */ - - // #eximage filling code: canvas sample and image - $('#eximage').append( + // #sampledata filling code: canvas sample and image + $('#sampledata').append( '' + ' ' + ''); + $('#viewcode').attr('href', codeUrl); + Module.canvas = document.getElementById('canvas'); Module.canvas.addEventListener("webglcontextlost", function(e) { alert('WebGL context lost. You will need to reload the page.'); e.preventDefault(); }, false); @@ -96,11 +90,12 @@ -
+
- +
View code on Github
-
+ +