From 78f3c0e9893d36e0ce039c2b79ede8a92ebe468a Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 1 Oct 2017 00:24:20 -0400 Subject: Adding the code --- games/pixelpaint/clear.gif | Bin 0 -> 142 bytes games/pixelpaint/clear.png | Bin 0 -> 3576 bytes games/pixelpaint/code.js | 1 + games/pixelpaint/css/charms.css | 167 ++++++++++++++++++++++++++++++++++++++ games/pixelpaint/eraser.gif | Bin 0 -> 131 bytes games/pixelpaint/eraser.png | Bin 0 -> 3530 bytes games/pixelpaint/fill.gif | Bin 0 -> 135 bytes games/pixelpaint/fill.png | Bin 0 -> 3403 bytes games/pixelpaint/index.html | 99 ++++++++++++++++++++++ games/pixelpaint/pen.gif | Bin 0 -> 119 bytes games/pixelpaint/pencil.png | Bin 0 -> 3449 bytes games/pixelpaint/picker.gif | Bin 0 -> 111 bytes games/pixelpaint/picker.png | Bin 0 -> 3375 bytes games/pixelpaint/splashscreen.png | Bin 0 -> 15857 bytes games/pixelpaint/style.css | 37 +++++++++ games/pixelpaint/view.gif | Bin 0 -> 121 bytes games/pixelpaint/view.png | Bin 0 -> 3535 bytes 17 files changed, 304 insertions(+) create mode 100644 games/pixelpaint/clear.gif create mode 100644 games/pixelpaint/clear.png create mode 100644 games/pixelpaint/code.js create mode 100644 games/pixelpaint/css/charms.css create mode 100644 games/pixelpaint/eraser.gif create mode 100644 games/pixelpaint/eraser.png create mode 100644 games/pixelpaint/fill.gif create mode 100644 games/pixelpaint/fill.png create mode 100644 games/pixelpaint/index.html create mode 100644 games/pixelpaint/pen.gif create mode 100644 games/pixelpaint/pencil.png create mode 100644 games/pixelpaint/picker.gif create mode 100644 games/pixelpaint/picker.png create mode 100644 games/pixelpaint/splashscreen.png create mode 100644 games/pixelpaint/style.css create mode 100644 games/pixelpaint/view.gif create mode 100644 games/pixelpaint/view.png (limited to 'games/pixelpaint') diff --git a/games/pixelpaint/clear.gif b/games/pixelpaint/clear.gif new file mode 100644 index 0000000..6a7990b Binary files /dev/null and b/games/pixelpaint/clear.gif differ diff --git a/games/pixelpaint/clear.png b/games/pixelpaint/clear.png new file mode 100644 index 0000000..1d78e88 Binary files /dev/null and b/games/pixelpaint/clear.png differ diff --git a/games/pixelpaint/code.js b/games/pixelpaint/code.js new file mode 100644 index 0000000..a54613d --- /dev/null +++ b/games/pixelpaint/code.js @@ -0,0 +1 @@ +function cLum(a){for(var b=0;b=d?(c+0.05)/(d+0.05):(d+0.05)/(c+0.05);return Math.round(e*100)/100}function cStrNorm(a){var b;{if(a.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/))return a;if(b=a.match(/^#([\da-fA-F]{2})([\da-fA-F]{2})([\da-fA-F]{2})$/)){b.shift();return"rgb("+$.map(b,function(a){return parseInt(a,16).toString()}).join(", ")+")"}if("getComputedStyle"in window){document.body.style.color=a;return cStrNorm(window.getComputedStyle(document.body,null).color)}if(document.body.currentStyle){document.body.style.color=a;return cStrNorm(document.body.currentStyle.color)}return a}}function cStrParse(a){var b=a.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);{if(b){b.shift();return $.map(b,function(a){return parseInt(a,10)})}return cStrParse(cStrNorm(a))}}$(document).ready(function(){var a=1,b=2,c=4,d=8,e=[c,d,a,b],f=a,g=16,h=32,i=32,j=h*g,k=i*g,l=new Array(i),m=$("#pixels"),n=$("#grid").get(0).getContext("2d"),o=$("#preview").get(0),p=o.getContext("2d"),q="localStorage"in window&&window.localStorage!==null,r="PixelPainter:",s="background-color",t=cStrParse("rgb(255,255,255)"),u=$("#color div"),v="rgb(0,0,0)";function w(a){v=cStrNorm(a);var b=cStrParse(v),c=cCon(b,t),d=$.map(b,function(a){var b=a.toString(16);return b.length==1?"0"+b:b});u.css(s,v);u.css("text-shadow",c<4||c>10?"none":"0 0 3px rgba(0, 0, 0, 0.7)");u.css("color",c>=4?"white":"black");u.text("#"+d.join("").toUpperCase())}function x(a,b){a.color=b;if(b===undefined){$(a).css(s,"");p.clearRect(a.i,a.j,1,1)}else{$(a).css(s,b);p.fillStyle=b;p.fillRect(a.i,a.j,1,1)}if(q){var c=r+a.i+":"+a.j;b===undefined?delete localStorage[c]:localStorage[c]=b}}function y(a,b,c,d){var e=[],f=l[b][a].get(0);e.push(f);while(e.length>0){f=e.shift();f.color===c&&x(f,d);var g=[[f.j-1,f.i],[f.j,f.i+1],[f.j+1,f.i],[f.j,f.i-1]];for(var h=0;h<4;h++){var f=(l[g[h][0]]||{})[g[h][1]];if(f!==undefined){f=f.get(0);if(f.color===c){x(f,d);e.push(f)}}}}}m.click(function(e){var g=e.target;f==a?x(g,v):f==b?y(g.i,g.j,g.color,v):f==c?x(g,undefined):f==d&&g.color!==undefined&&w(g.color)});for(var z=0;z0){f=e[b.index()];$("#tools .selected").removeClass("selected");b.addClass("selected")}});$("#palette").click(function(a){var b=$(a.target).closest("li");b.length>0&&w(b.css(s))});$("#palette li").each(function(){var a=$(this);a.css("background",a.text())});$("#color").click(function(){var a=prompt("Please enter a color, e.g. red, #00FF00, rgb(0, 0, 255)",u.text());typeof a=="string"&&$.trim(a)!==""&&w(a)});w("HotPink")}) \ No newline at end of file diff --git a/games/pixelpaint/css/charms.css b/games/pixelpaint/css/charms.css new file mode 100644 index 0000000..cbd7cbf --- /dev/null +++ b/games/pixelpaint/css/charms.css @@ -0,0 +1,167 @@ +body { +font-family:Segoe UI; +margin:0px; +padding:0px; +} +img, a { + outline:none; + border:none; +} +#splashscreen { +margin:0; +position:fixed; +top:0; +width:100%; +height:100%; +color:#FFFFFF; +background-image:url('../splashscreen.png'); +background-position:center; +background-color:#414141; +background-repeat:no-repeat; +animation:splash 4s; +-ms-animation:splash 4s; +-webkit-animation:splash 4s; +-o-animation:splash 4s; +opacity:0; +z-index:-1; +} +@keyframes splash { +from { +z-index:999; +opacity: 1; +} +66% { +opacity: 1; +} +to { +opacity:0; +z-index:1; +display:none; +} +} +@-webkit-keyframes splash { +from { +z-index:999; +opacity: 1; +} +66% { +opacity: 1; +} +to { +opacity:0; +z-index:1; +display:none; +} +} +@-ms-keyframes splash { +from { +z-index:999; +opacity: 1; +} +66% { +opacity: 1; +} +to { +opacity:0; +z-index:1; +display:none; +} +} +@-o-keyframes splash { +from { +z-index:999; +opacity: 1; +} +66% { +opacity: 1; +} +to { +opacity:0; +z-index:1; +display:none; +} +} +#hoverarea { + position:fixed; + top:0px; + right:0px; + width:15px; + height:15px; +} +#bottomhoverarea { + position:fixed; + bottom:0px; + right:0px; + width:15px; + height:15px; +} +#starthoverarea { + position:fixed; + bottom:0px; + left:0px; + width:15px; + height:15px; +} +#charmsbar { + display:none; + background-color:#111111; + position:fixed; + padding:5% 0; + top:0px; + right:0px; + height:100%; + width: 86px; + +} +#settingscharms { + padding : 40px; + display:none; + background-color:#3B66AD; + position:fixed; + top:0px; + right:0px; + height:100%; + width: 345px; + +} +#startbutton { + display:none; + position:fixed; + left:0px; + bottom:0px; +} +#iconnetwork { + position:absolute; + top:35px; + left:25px; +} +#iconbattery { + position:absolute; + bottom:35px; + left:32px; +} +#datetime { + display:none; + position:fixed; + left:50px; + bottom:50px; + width:490px; + height:139px; + background-color: rgba(17,17,17,1); +} +#time { + position:absolute; + left:70px; + bottom:19px; + font-family: Segoe UI Light; + font-size: 64pt; + color:#FFFFFF; +} +#date { + margin-top:20px; + margin-right:20px; + float:right; + font-size:24pt; + font-family: Segoe UI; + color:#FFFFFF; +} diff --git a/games/pixelpaint/eraser.gif b/games/pixelpaint/eraser.gif new file mode 100644 index 0000000..010432a Binary files /dev/null and b/games/pixelpaint/eraser.gif differ diff --git a/games/pixelpaint/eraser.png b/games/pixelpaint/eraser.png new file mode 100644 index 0000000..9e95b4a Binary files /dev/null and b/games/pixelpaint/eraser.png differ diff --git a/games/pixelpaint/fill.gif b/games/pixelpaint/fill.gif new file mode 100644 index 0000000..694c45a Binary files /dev/null and b/games/pixelpaint/fill.gif differ diff --git a/games/pixelpaint/fill.png b/games/pixelpaint/fill.png new file mode 100644 index 0000000..bb98e93 Binary files /dev/null and b/games/pixelpaint/fill.png differ diff --git a/games/pixelpaint/index.html b/games/pixelpaint/index.html new file mode 100644 index 0000000..79976a5 --- /dev/null +++ b/games/pixelpaint/index.html @@ -0,0 +1,99 @@ + + + +Pixel Paint + + + + + + + + + + + + + +
+
+
+ +
+
+
+
  • Clear Canvas
  • View PNG
+
  • Eraser
  • Color Picker
  • Pen
  • Fill
+
  • Black
  • White
  • Red
  • Green
  • Blue
  • Yellow
  • Grey
  • Purple
+
+
+ +
+
+
+
+
+
+
+
+
+
+ + + + +
+
+
+
+
+
+
+
+ +
+ + \ No newline at end of file diff --git a/games/pixelpaint/pen.gif b/games/pixelpaint/pen.gif new file mode 100644 index 0000000..1278ea2 Binary files /dev/null and b/games/pixelpaint/pen.gif differ diff --git a/games/pixelpaint/pencil.png b/games/pixelpaint/pencil.png new file mode 100644 index 0000000..7f1f339 Binary files /dev/null and b/games/pixelpaint/pencil.png differ diff --git a/games/pixelpaint/picker.gif b/games/pixelpaint/picker.gif new file mode 100644 index 0000000..14cf8d3 Binary files /dev/null and b/games/pixelpaint/picker.gif differ diff --git a/games/pixelpaint/picker.png b/games/pixelpaint/picker.png new file mode 100644 index 0000000..5bb7c22 Binary files /dev/null and b/games/pixelpaint/picker.png differ diff --git a/games/pixelpaint/splashscreen.png b/games/pixelpaint/splashscreen.png new file mode 100644 index 0000000..2fa2a9e Binary files /dev/null and b/games/pixelpaint/splashscreen.png differ diff --git a/games/pixelpaint/style.css b/games/pixelpaint/style.css new file mode 100644 index 0000000..37238c8 --- /dev/null +++ b/games/pixelpaint/style.css @@ -0,0 +1,37 @@ +body{margin:0;padding:0;font-family:Segoe UI;background:#404040} +div,ul,li{margin:0;padding:0} +#canvas,#pixels{width:512px;height:512px} +#grid,#pixels{position:absolute;top:7px;left:7px} +.pixel:hover,#palette li:hover,#tools li:hover,#palette li:hover,#clear:hover,#view_png:hover,#color:hover{cursor:pointer} +#pixels,#toolbar{-webkit-box-shadow:0 0 5px black;-moz-box-shadow:0 0 5px black;box-shadow:0 0 5px black} +#canvas,#toolbar_top,#tools,#palette,#color{border-left:solid 1px #DDD;border-right:solid 1px #999} +#toolbar,#color{} +#canvas,#toolbar_top,#tools,#palette,#color{background:#696969} +#toolbar_top,#tools,#palette{padding:5px 5px 0} +#tools *,#palette *{-webkit-user-select:none} +#tools ul,#palette ul,#toolbar_top ul{width:120px;padding:5px 5px 0;background:#101010;list-style:none;} +#tools li,#clear,#view_png{background-repeat:no-repeat;background-position:center center} +#tools li span,#palette li,#clear span,#view_png span{overflow:hidden;text-indent:-9999px} +#clear span,#view_png span{width:32px;height:32px;display:inline-block} +#tools li span,#clear span,#view_png span{background-color:rgba(60,60,60,0.6);} +#toolbar_top li,#tools li{} +#toolbar_top,#color div{} +#container{width:700px;margin:50px auto;position:relative} +#canvas{padding:7px;position:absolute;top:0;left:0;border-top:solid 1px #DDD;border-bottom:solid 1px #999;} +#grid{background:white} +.pixel{display:inline-block;float:left} +#toolbar{position:absolute;top:0;right:0} +#toolbar_top{padding:5px 5px 0;border-top:solid 1px #DDD;} +#toolbar_top ul{height:44px} +#toolbar_top li{width:32px;height:32px;margin:4px;float:left} +#preview{background:white!important} +#tools{} +#tools ul{height:125px} +#tools li{width:50px;height:50px;margin:5px;display:inline-block} +#tools span{width:50px;height:50px;display:inline-block} +#tools .selected{background-color:#0000FF;} +#palette{background:-webkit-gradient(linear,left top,left bottom,from(#666),to(#555));background:-moz-linear-gradient(top,#666,#555)} +#palette ul{height:245px} +#palette li{margin:5px;width:40px;height:40px;border:solid 5px white;display:inline-block;-webkit-border-radius:25px;-moz-border-radius:25px;border-radius:25px;-webkit-box-shadow:0 0 10px black,inset 0 0 5px rgba(0,0,0,0.7);-moz-box-shadow:0 0 10px black,inset 0 0 5px rgba(0,0,0,0.7);box-shadow:0 0 10px black,inset 0 0 5px rgba(0,0,0,0.7)} +#color{padding:5px;border-bottom:solid 1px #999;background:-webkit-gradient(linear,left top,left bottom,from(#555),to(#444));background:-moz-linear-gradient(top,#555,#444)} +#color div{width:130px;padding:10px 0 12px;font-family:Segoe UI Light;font-size:14pt;text-transform:uppercase;text-align:center;color:white} \ No newline at end of file diff --git a/games/pixelpaint/view.gif b/games/pixelpaint/view.gif new file mode 100644 index 0000000..cd2950c Binary files /dev/null and b/games/pixelpaint/view.gif differ diff --git a/games/pixelpaint/view.png b/games/pixelpaint/view.png new file mode 100644 index 0000000..892a60b Binary files /dev/null and b/games/pixelpaint/view.png differ -- cgit v1.2.3