summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArun Persaud <arun@nubati.net>2012-09-17 21:36:46 -0700
committerArun Persaud <arun@nubati.net>2012-09-17 21:36:46 -0700
commit25a9eda6b069a6f2e29de3d8c440e9a1c82fd85f (patch)
tree03745117bac353ccd7baea8b1c67d28e2525e2ef
parent444d740c6de6a1728421f2b2504a18a3d60d3766 (diff)
downloade-DoKo-25a9eda6b069a6f2e29de3d8c440e9a1c82fd85f.tar.gz
e-DoKo-25a9eda6b069a6f2e29de3d8c440e9a1c82fd85f.tar.bz2
e-DoKo-25a9eda6b069a6f2e29de3d8c440e9a1c82fd85f.zip
Mark the starting player until the game actually starts ;)
just a small text above the player with some CSS
-rw-r--r--css/standard.css8
-rw-r--r--include/functions.php10
2 files changed, 16 insertions, 2 deletions
diff --git a/css/standard.css b/css/standard.css
index 3aadbbc..88ff9fd 100644
--- a/css/standard.css
+++ b/css/standard.css
@@ -185,6 +185,7 @@ div.table div.table1 {
z-index:20;
margin: 0 auto;
}
+
div.middle {
position:relative;
min-height: 6em;
@@ -199,6 +200,13 @@ div.table div.table0 {
text-align:center;
z-index:20;
}
+div.table div.table0 .start {
+ background-color: #f00;
+ border-radius: 5px;
+ padding: 3px;
+ margin: 3px;
+}
+
div.table img.table {
width:25%;
z-index:5;
diff --git a/include/functions.php b/include/functions.php
index 6873cbf..84a0fcc 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -1002,7 +1002,7 @@ function display_table_begin ()
echo "<div class=\"table\">\n";
display_single_user($row1);
echo "\n<div class=\"middle\">\n";
- display_single_user($row0);
+ display_single_user($row0,1); /* mark starting player in case re/contra is not set yet */
echo " <img class=\"table\" src=\"pics/table.png\" alt=\"table\" />\n";
display_single_user($row2);
@@ -1040,8 +1040,10 @@ function display_table_end ()
return;
}
-function display_single_user($r)
+function display_single_user($r,$start=0)
{
+ /* start=1, mark starting player, default=0, so the player on the left is not marked */
+
global $gameid, $GT, $debug,$INDEX,$defaulttimezone,$session;
global $RULES,$GAME,$gametype;
@@ -1064,6 +1066,10 @@ function display_single_user($r)
echo " <div class=\"table".($pos-1)."\">\n";
+ /* mark starting player */
+ if($start && ! ($party=="re" || $party=="contra"))
+ echo ' <span class="start">'._('Starting Player')."</span> <br />\n";
+
if($debug)
echo " <a href=\"".$INDEX."?action=game&amp;me=".$hash."\">";
if($vacation = check_vacation($user))