Skip to content
Permalink
Browse files

GUI for chat is 90% done

woooo
  • Loading branch information...
LexTheGreat committed Mar 11, 2015
1 parent 7ae676e commit ad589bcf24d7d1294fdd9a5715fa93568d70ec7c
@@ -16,6 +16,7 @@ window.GameEngine = function() {

this.GUI = {
parent: this,
miniButtonToggle: true,
hide: function(obj) {
$("#" + obj).hide();
},
@@ -24,6 +25,22 @@ window.GameEngine = function() {
},
toggle: function(obj) {
$("#" + obj).toggle();
},
//
miniButtonClick: function() {
if(this.miniButtonToggle) {
$("#miniButton").text("-");
$("#chatLog").animate({ "height": 0}, 1000, function(){
$(this).css('height',0);
});
} else {
$("#miniButton").text("+");
$("#chatLog").animate({ "height": 200}, 1000, function(){
$(this).css('height',200);
});
}

this.miniButtonToggle = !this.miniButtonToggle;
}
};

Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -8,6 +8,7 @@
<style>
* { margin:0; padding:0; cursor: url(/img/gui/mouse.png), default;}
*:active { cursor: url(/img/gui/click.png), default; }
*:focus { outline: 0; }
html, body,#container { width:100%; height:100%; position: relative; }
canvas { display: block; width: 100%; height: 100%; }
*[hidden] { display: none; }
@@ -32,17 +33,52 @@
width: 50%;
position: absolute;
}
#miniButton
{
border-style: solid;
border-width: 3px 7px 0px;
-moz-border-image: url(/img/gui/miniButton.png) 3 7 0 stretch;
-webkit-border-image: url(/img/gui/miniButton.png) 3 7 0 stretch;
-o-border-image: url(/img/gui/miniButton.png) 3 7 0 stretch;
border-image: url(/img/gui/miniButton.png) 3 7 0 fill stretch;
}
#chatLog
{
width:50%;
max-height: 200px;
height: 200px;
overflow-y: scroll;
border-style: solid;
border-width: 34px 11px 12px;
-moz-border-image: url(/img/gui/chatLogWindow.png) 34 11 12 stretch;
-webkit-border-image: url(/img/gui/chatLogWindow.png) 34 11 12 stretch;
-o-border-image: url(/img/gui/chatLogWindow.png) 34 11 12 stretch;
border-image: url(/img/gui/chatLogWindow.png) 34 11 12 fill stretch;
}
#chatBox
{
width: 50%;
cursor: text;
border-style: solid;
border-width: 13px 16px 9px 9px;
-moz-border-image: url(/img/gui/chatAreaWindow.png) 13 16 9 9 repeat;
-webkit-border-image: url(/img/gui/chatAreaWindow.png) 13 16 9 9 repeat;
-o-border-image: url(/img/gui/chatAreaWindow.png) 13 16 9 9 repeat;
border-image: url(/img/gui/chatAreaWindow.png) 13 16 9 9 fill repeat;
}
::-webkit-scrollbar {
width: 12px;
}
::-webkit-scrollbar-track {
background-color: #eaeaea;
border-left: 1px solid #ccc;
}
::-webkit-scrollbar-thumb {
background-color: #ccc;
}
::-webkit-scrollbar-thumb:hover {
background-color: #aaa;
}
</style>

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
@@ -63,6 +99,7 @@
</form>
</menu>
<menu id="gameGUI" style="display: none;">
<input id="miniButton" type="button" value="-" onclick="Game.GUI.miniButtonClick();">
<div id="chatLog">
</div>
<input id="chatBox" type="text">

0 comments on commit ad589bc

Please sign in to comment.
You can’t perform that action at this time.