Mark the starting player until the game actually starts ;)
authorArun Persaud <arun@nubati.net>
Tue, 18 Sep 2012 04:36:46 +0000 (21:36 -0700)
committerArun Persaud <arun@nubati.net>
Tue, 18 Sep 2012 04:36:46 +0000 (21:36 -0700)
just a small text above the player with some CSS

css/standard.css
include/functions.php

index 3aadbbc4ad96c8cebf3418395bd181eb0af4e489..88ff9fde30d9d8beff9819fe846724c286e1b559 100644 (file)
@@ -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;
index 6873cbfa044443a5a1b57657dfc45907e091a5f2..84a0fccb76e21d12398d528016486e7babb94286 100644 (file)
@@ -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))