From 677b7454a37a0152f50d40993460d8f5a071e181 Mon Sep 17 00:00:00 2001 From: Patrick Davison Date: Tue, 5 Mar 2013 14:17:08 -0800 Subject: Map editor 0.1! --- css/mapeditor.css | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 css/mapeditor.css (limited to 'css') diff --git a/css/mapeditor.css b/css/mapeditor.css new file mode 100644 index 0000000..60a6e78 --- /dev/null +++ b/css/mapeditor.css @@ -0,0 +1,10 @@ + + + +.plusMinus { + float:left; + width:130px; + border:1px solid gray; + padding:2px; + margin:2px; +} \ No newline at end of file -- cgit v1.2.3 From 474878d48788acd5ea8dafef095f3283478012ab Mon Sep 17 00:00:00 2001 From: Patrick Davison Date: Tue, 5 Mar 2013 14:23:02 -0800 Subject: Chat mute, chat in Title. --- css/chat.css | 8 ++++++-- pages/chat.php | 34 +++++++++++++++++++++++++++------- 2 files changed, 33 insertions(+), 9 deletions(-) (limited to 'css') diff --git a/css/chat.css b/css/chat.css index 9608093..66cd086 100644 --- a/css/chat.css +++ b/css/chat.css @@ -3,7 +3,7 @@ font-family: 'Trebuchet MS1', 'Trebuchet MS', sans-serif; border: 1px solid gray; background-color:#999; - width: 700px; + width: 680px; margin: 7px; padding: 2px; border-radius: 10px; @@ -11,7 +11,11 @@ border-top-right-radius: 20px; } .chatButton { - margin: 4px; + margin: 0px; +} +.chatMute { + margin: 0px; + width: 15px; } #chatContainer { diff --git a/pages/chat.php b/pages/chat.php index 27122d8..f2d2231 100644 --- a/pages/chat.php +++ b/pages/chat.php @@ -45,6 +45,9 @@ function getChatDone(data) { var p; //our prep string var newChats = false; + var lastDisplay = ''; + var lastMessage = ''; + ////console.log('datalength', data.length); if (data.length < 3 || data == 'false') @@ -118,6 +121,8 @@ function getChatDone(data) { items.push('
' + p + '
'); newChats = true; } + lastDisplay = chat.displayName + lastMessage = chat.message if (chat.ID > 0) lastID = chat.ID; }); @@ -130,15 +135,18 @@ function getChatDone(data) { var atBottom = (elem.scrollTop() >= elem[0].scrollHeight - elem.outerHeight() - 1); $("#chatContainer").append(items.join('')); - + if (atBottom || firstGetChat) { $("#chatContainer").scrollTop($("#chatContainer")[0].scrollHeight); firstGetChat = false; } - soundManager.setVolume('charm', 20); - soundManager.setPan('charm', -60) - soundManager.setPosition('charm',150); - soundManager.play('charm'); + document.title = lastDisplay+': '+lastMessage.substring(0, 10)+'... Pathery Chat'; + if (!document.getElementById('chatMute').checked) { + soundManager.setVolume('charm', 20); + soundManager.setPan('charm', -60) + soundManager.setPosition('charm',150); + soundManager.play('charm'); + } } } @@ -150,10 +158,10 @@ function chatReplaceAndEncode(chat) { //Surround all URLs with a link var URLexp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig; - chat = chat.replace(URLexp, "$1"); + chat = chat.replace(URLexp, "$1"); //Replace # in the URL with %23 - chat = chat.replace(//ig, ""); + chat = chat.replace(//ig, ""); return chat; } @@ -212,6 +220,10 @@ function htmlEncode(value){ } } +function setChatMute(value) { + savePref('chatMute', value); +} +
@@ -223,6 +235,14 @@ function htmlEncode(value){
+ + "; + ?> + -- cgit v1.2.3 From 62e2798a769d62e2c1714f3eb27b64f212d3fd65 Mon Sep 17 00:00:00 2001 From: Patrick Davison Date: Tue, 5 Mar 2013 14:23:39 -0800 Subject: Whoops missed this for the mapeditor. --- css/maps.css | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'css') diff --git a/css/maps.css b/css/maps.css index 604192c..86a2f76 100644 --- a/css/maps.css +++ b/css/maps.css @@ -188,6 +188,13 @@ background-image: url(../images/OverlayTileFaceted20.png); } +.tileDisplay div { + float:left; + border:1px solid blue; + margin:2px; + width:36px; + height:36px; +} /* grid stuff */ -- cgit v1.2.3