mirror of
https://github.com/Febbweiss/gq-pacman.git
synced 2026-03-04 22:25:41 +00:00
Feature: adding project files
This commit is contained in:
12
css/hack/csshover3.htc
Normal file
12
css/hack/csshover3.htc
Normal file
@@ -0,0 +1,12 @@
|
||||
<public:attach event="ondocumentready" onevent="CSSHover()" />
|
||||
<script>
|
||||
/**
|
||||
* Whatever:hover - V3.11
|
||||
* http://www.xs4all.nl/~peterned/
|
||||
*
|
||||
* Copyright (c) 2009 Peter Nederlof
|
||||
* Licensed under the LGPL license
|
||||
* http://creativecommons.org/licenses/LGPL/2.1
|
||||
*/
|
||||
window.CSSHover=(function(){var m=/(^|\s)((([^a]([^ ]+)?)|(a([^#.][^ ]+)+)):(hover|active|focus))/i;var n=/(.*?)\:(hover|active|focus)/i;var o=/[^:]+:([a-z\-]+).*/i;var p=/(\.([a-z0-9_\-]+):[a-z]+)|(:[a-z]+)/gi;var q=/\.([a-z0-9_\-]*on(hover|active|focus))/i;var s=/msie (5|6|7)/i;var t=/backcompat/i;var u={index:0,list:['text-kashida','text-kashida-space','text-justify'],get:function(){return this.list[(this.index++)%this.list.length]}};var v=function(c){return c.replace(/-(.)/mg,function(a,b){return b.toUpperCase()})};var w={elements:[],callbacks:{},init:function(){if(!s.test(navigator.userAgent)&&!t.test(window.document.compatMode)){return}var a=window.document.styleSheets,l=a.length;for(var i=0;i<l;i++){this.parseStylesheet(a[i])}},parseStylesheet:function(a){if(a.imports){try{var b=a.imports;var l=b.length;for(var i=0;i<l;i++){this.parseStylesheet(a.imports[i])}}catch(securityException){}}try{var c=a.rules;var r=c.length;for(var j=0;j<r;j++){this.parseCSSRule(c[j],a)}}catch(someException){}},parseCSSRule:function(a,b){var c=a.selectorText;if(m.test(c)){var d=a.style.cssText;var e=n.exec(c)[1];var f=c.replace(o,'on$1');var g=c.replace(p,'.$2'+f);var h=q.exec(g)[1];var i=e+h;if(!this.callbacks[i]){var j=u.get();var k=v(j);b.addRule(e,j+':expression(CSSHover(this, "'+f+'", "'+h+'", "'+k+'"))');this.callbacks[i]=true}b.addRule(g,d)}},patch:function(a,b,c,d){try{var f=a.parentNode.currentStyle[d];a.style[d]=f}catch(e){a.runtimeStyle[d]=''}if(!a.csshover){a.csshover=[]}if(!a.csshover[c]){a.csshover[c]=true;var g=new CSSHoverElement(a,b,c);this.elements.push(g)}return b},unload:function(){try{var l=this.elements.length;for(var i=0;i<l;i++){this.elements[i].unload()}this.elements=[];this.callbacks={}}catch(e){}}};var x={onhover:{activator:'onmouseenter',deactivator:'onmouseleave'},onactive:{activator:'onmousedown',deactivator:'onmouseup'},onfocus:{activator:'onfocus',deactivator:'onblur'}};function CSSHoverElement(a,b,c){this.node=a;this.type=b;var d=new RegExp('(^|\\s)'+c+'(\\s|$)','g');this.activator=function(){a.className+=' '+c};this.deactivator=function(){a.className=a.className.replace(d,' ')};a.attachEvent(x[b].activator,this.activator);a.attachEvent(x[b].deactivator,this.deactivator)}CSSHoverElement.prototype={unload:function(){this.node.detachEvent(x[this.type].activator,this.activator);this.node.detachEvent(x[this.type].deactivator,this.deactivator);this.activator=null;this.deactivator=null;this.node=null;this.type=null}};window.attachEvent('onbeforeunload',function(){w.unload()});return function(a,b,c,d){if(a){return w.patch(a,b,c,d)}else{w.init()}}})();
|
||||
</script>
|
||||
267
css/pacman.css
Normal file
267
css/pacman.css
Normal file
@@ -0,0 +1,267 @@
|
||||
#playgroundContainer {
|
||||
width: 448px;
|
||||
height: 512px;
|
||||
background-color: black;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.actor {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
position: relative;
|
||||
margin-top: -16px;
|
||||
margin-left: -16px;
|
||||
}
|
||||
|
||||
/** TILES **/
|
||||
|
||||
.tile {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
float: left;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.corner1 {
|
||||
background-image: url('../img/sprite.png');
|
||||
background-position: -0px -0px;
|
||||
}
|
||||
|
||||
.corner2 {
|
||||
background-image: url('../img/sprite.png');
|
||||
background-position: -16px -0px;
|
||||
}
|
||||
|
||||
.corner3 {
|
||||
background-image: url('../img/sprite.png');
|
||||
background-position: -32px 0px;
|
||||
}
|
||||
|
||||
.corner4 {
|
||||
background-image: url('../img/sprite.png');
|
||||
background-position: -48px 0px;
|
||||
}
|
||||
|
||||
.horizontalMidUp {
|
||||
background-image: url('../img/sprite.png');
|
||||
background-position: -96px -0px;
|
||||
}
|
||||
|
||||
.horizontalMidDown {
|
||||
background-image: url('../img/sprite.png');
|
||||
background-position: -112px -0px;
|
||||
}
|
||||
|
||||
.verticalMidLeft {
|
||||
background-image: url('../img/sprite.png');
|
||||
background-position: -64px -0px;
|
||||
}
|
||||
|
||||
.verticalMidRight {
|
||||
background-image: url('../img/sprite.png');
|
||||
background-position: -80px -0px;
|
||||
}
|
||||
|
||||
.squareCornerTopLeft {
|
||||
background-image: url('../img/sprite.png');
|
||||
background-position: -128px -0px;
|
||||
}
|
||||
|
||||
.squareCornerTopRight {
|
||||
background-image: url('../img/sprite.png');
|
||||
background-position: -144px -0px;
|
||||
}
|
||||
|
||||
.squareCornerBottomLeft {
|
||||
background-image: url('../img/sprite.png');
|
||||
background-position: -160px -0px;
|
||||
}
|
||||
|
||||
.squareCornerBottomRight {
|
||||
background-image: url('../img/sprite.png');
|
||||
background-position: -176px -0px;
|
||||
}
|
||||
|
||||
.gate {
|
||||
background-image: url('../img/sprite.png');
|
||||
background-position: -192px -0px;
|
||||
}
|
||||
|
||||
.dot {
|
||||
background-image: url('../img/sprite.png');
|
||||
background-position: -208px -0px;
|
||||
}
|
||||
|
||||
.bigDot {
|
||||
background-image: url('../img/sprite.png');
|
||||
background-position: -208px -16px;
|
||||
}
|
||||
|
||||
.ghost {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.blinky {
|
||||
background-image: url('../img/sprite.png');
|
||||
background-position: -160px -48px;
|
||||
}
|
||||
.pinky {
|
||||
background-image: url('../img/sprite.png');
|
||||
background-position: -160px -80px;
|
||||
}
|
||||
.inky {
|
||||
background-image: url('../img/sprite.png');
|
||||
background-position: -160px -112px;
|
||||
}
|
||||
.clyde {
|
||||
background-image: url('../img/sprite.png');
|
||||
background-position: -160px -144px;
|
||||
}
|
||||
|
||||
.cherries {
|
||||
background-image: url('../img/sprite.png');
|
||||
background-position: -208px -32px;
|
||||
}
|
||||
|
||||
.strawberry {
|
||||
background-image: url('../img/sprite.png');
|
||||
background-position: -208px -48px;
|
||||
}
|
||||
|
||||
.peach {
|
||||
background-image: url('../img/sprite.png');
|
||||
background-position: -208px -64px;
|
||||
}
|
||||
|
||||
.apple {
|
||||
background-image: url('../img/sprite.png');
|
||||
background-position: -208px -80px;
|
||||
}
|
||||
|
||||
.grapes {
|
||||
background-image: url('../img/sprite.png');
|
||||
background-position: -208px -96px;
|
||||
}
|
||||
|
||||
.galaxian {
|
||||
background-image: url('../img/sprite.png');
|
||||
background-position: -208px -112px;
|
||||
}
|
||||
|
||||
.bell {
|
||||
background-image: url('../img/sprite.png');
|
||||
background-position: -208px -128px;
|
||||
}
|
||||
|
||||
.key {
|
||||
background-image: url('../img/sprite.png');
|
||||
background-position: -208px -144px;
|
||||
}
|
||||
|
||||
.description {
|
||||
padding-left: 40px;
|
||||
line-height: 3em;
|
||||
vertical-align: middle;
|
||||
}
|
||||
/** HUD **/
|
||||
|
||||
#message {
|
||||
position : absolute;
|
||||
left : 50%;
|
||||
top : 50%;
|
||||
}
|
||||
|
||||
#level {
|
||||
position : relative;
|
||||
top: -10px;
|
||||
left: 5px;
|
||||
}
|
||||
|
||||
#levelNumber {
|
||||
position : relative;
|
||||
top: -14px;
|
||||
float: left;
|
||||
margin-left: 100px;
|
||||
}
|
||||
|
||||
#lives {
|
||||
position: absolute;
|
||||
top: -1px;
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
#scoreMessage {
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
}
|
||||
|
||||
.life {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
float: left;
|
||||
background-image: url('../img/sprite.png');
|
||||
background-position: 0px -16px;
|
||||
}
|
||||
|
||||
/** SCOREBOARD**/
|
||||
|
||||
.clock {
|
||||
background : transparent url("../img/font.png") no-repeat top left;
|
||||
height:32px;
|
||||
width:32px;
|
||||
float:left;
|
||||
}
|
||||
|
||||
.clock.red {
|
||||
background : transparent url("../img/font-red.png") no-repeat top left;
|
||||
}
|
||||
|
||||
.clock.yellow {
|
||||
background : transparent url("../img/font-yellow.png") no-repeat top left;
|
||||
}
|
||||
|
||||
.clock.small {
|
||||
position: relative;
|
||||
top: 45%;
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
.n0 {
|
||||
background-position : 0px 0px;
|
||||
}
|
||||
.n1 {
|
||||
background-position : -32px 0px;
|
||||
}
|
||||
.n2 {
|
||||
background-position : -64px 0px;
|
||||
}
|
||||
.n3 {
|
||||
background-position : -96px 0px;
|
||||
}
|
||||
.n4 {
|
||||
background-position : -128px 0px;
|
||||
}
|
||||
.n5 {
|
||||
background-position : -160px 0px;
|
||||
}
|
||||
.n6 {
|
||||
background-position : -192px 0px;
|
||||
}
|
||||
.n7 {
|
||||
background-position : -224px 0px;
|
||||
}
|
||||
.n8 {
|
||||
background-position : -256px 0px;
|
||||
}
|
||||
.n9 {
|
||||
background-position : -288px 0px;
|
||||
}
|
||||
|
||||
.hiddenDot {
|
||||
visibility: hidden;
|
||||
}
|
||||
Reference in New Issue
Block a user