Browse Source

hint the moves for newcomers

Maxim Sokhatsky 10 years ago
parent
commit
0b6f248153

+ 28 - 25
apps/web/priv/static/app/Kakaranet-Scene.svg

@@ -173,29 +173,10 @@
                 </g>
             </g>
             <g id="Table" transform="translate(219.000000, 310.000000)" sketch:type="MSShapeGroup">
-                <path d="M634.171,146.66 L-0.36,146.66 L115.967,0.23 L524.45,0.23 L634.171,146.66 L634.171,146.66 Z" id="Shape" fill="#48AF5E"></path>
+                <path d="M-0.36,146.66 L115.967,0.23 L524.45,0.23 L634.171,146.66 L-0.36,146.66 Z" id="Shape" fill="#48AF5E"></path>
                 <path d="M475.849,63.473 C484.752,87.426 414.057,108.909 317,108.909 C219.942,108.909 149.248,87.428 158.15,63.473 C166.156,41.932 236.962,26 317,26 C397.037,26 467.843,41.932 475.849,63.473 L475.849,63.473 L475.849,63.473 Z" id="Table-Oval" fill="#5CBF6F"></path>
             </g>
-            <g id="Player-Me" transform="translate(398.000000, 413.000000)">
-                <g id="Name" transform="translate(43.000000, 0.000000)">
-                    <rect id="Player-Me-Pad" fill="#517ECE" sketch:type="MSShapeGroup" x="0" y="0" width="89" height="39" rx="8"></rect>
-                    <text id="Player-Me-Name" fill="#FFFFFF" sketch:type="MSTextLayer" font-family="Exo 2" font-size="24" font-weight="normal">
-                        <tspan x="26.9998" y="28.7344">Me</tspan>
-                    </text>
-                </g>
-                <g id="Timer">
-                    <path d="M5.558,38 C2.492,38 0,35.504 0,32.436 L0,5.564 C0,2.496 2.492,0 5.558,0 L32.439,0 C35.505,0 38,2.496 38,5.564 L38,32.436 C38,35.504 35.505,38 32.439,38 L5.558,38 L5.558,38 Z" id="Timer-Pad" fill="#517ECE" sketch:type="MSShapeGroup"></path>
-                    <rect id="progress" fill="#5CBF6F" sketch:type="MSShapeGroup" x="2" y="2" width="34" height="33" rx="3"></rect>
-                    <text id="value" fill="#FFFFFF" sketch:type="MSTextLayer" font-family="Exo 2" font-size="20.7143027" font-weight="normal">
-                        <tspan x="9" y="27">12</tspan>
-                    </text>
-                </g>
-            </g>
-            <g id="Mustafa-Deck" transform="translate(421.000000, 269.000000)" sketch:type="MSShapeGroup">
-                <path d="M234.674,19.765 L1.715,19.765 L0.218,23.232 L236.245,23.232 L234.674,19.765 L234.674,19.765 Z" id="Shape" fill="#AA6F48"></path>
-                <path d="M234.598,2.849 L1.993,2.849 L3.456,-0.404 L233.049,-0.404 L234.598,2.849 L234.598,2.849 Z" id="Shape" fill="#BC8864"></path>
-                <path d="M234.598,23.232 L234.598,2.849 L1.993,2.849 L1.993,23.232 L0.218,23.232 L0.218,46.726 L236.245,46.726 L236.245,23.232 L234.598,23.232 L234.598,23.232 Z" id="Shape" fill="#AF7B58"></path>
-            </g>
+            <path d="M522.000212,339 C519.790956,339 517.895287,340.781814 517.765678,342.987277 L516,373.032413 L516,407.008564 C516,409.212973 517.781851,411 519.994844,411 L550.005156,411 C552.211447,411 554,409.206998 554,407.008564 L553.999998,373.032413 L552.234321,342.987277 C552.104908,340.785165 550.207967,339 547.999786,339 L522.000212,339 Z" id="Center-Card-Selection" stroke="#F8E81C" stroke-width="5" fill="#F8E81C" sketch:type="MSShapeGroup"></path>
             <g id="Center-Cards" transform="translate(518.000000, 341.000000)" sketch:type="MSShapeGroup">
                 <g id="Group" transform="translate(0.000000, 31.000000)">
                     <path d="M33.973,35.172 C34.029,36.361 32.806,37.329 31.24,37.329 L2.957,37.329 C1.394,37.329 0.168,36.361 0.222,35.172 L1.55,5.65 C1.595,4.65 2.784,3.845 4.207,3.845 L29.936,3.845 C31.36,3.845 32.551,4.65 32.598,5.65 L33.973,35.172 L33.973,35.172 Z" id="Shape" fill="#AFD5D8"></path>
@@ -218,6 +199,26 @@
                     <path d="M33.714,30.496 C33.768,31.652 32.561,32.596 31.017,32.596 L3.118,32.596 C1.575,32.596 0.366,31.655 0.419,30.496 L1.715,1.734 C1.759,0.758 2.934,-0.026 4.34,-0.026 L29.748,-0.026 C31.155,-0.026 32.332,0.758 32.377,1.734 L33.714,30.496 L33.714,30.496 Z" id="Shape" fill="#FFFFFF"></path>
                 </g>
             </g>
+            <g id="Player-Me" transform="translate(398.000000, 413.000000)">
+                <g id="Name" transform="translate(43.000000, 0.000000)">
+                    <rect id="Player-Me-Pad" fill="#517ECE" sketch:type="MSShapeGroup" x="0" y="0" width="89" height="39" rx="8"></rect>
+                    <text id="Player-Me-Name" fill="#FFFFFF" sketch:type="MSTextLayer" font-family="Exo 2" font-size="24" font-weight="normal">
+                        <tspan x="26.9998" y="28.7344">Me</tspan>
+                    </text>
+                </g>
+                <g id="Timer">
+                    <path d="M5.558,38 C2.492,38 0,35.504 0,32.436 L0,5.564 C0,2.496 2.492,0 5.558,0 L32.439,0 C35.505,0 38,2.496 38,5.564 L38,32.436 C38,35.504 35.505,38 32.439,38 L5.558,38 L5.558,38 Z" id="Timer-Pad" fill="#517ECE" sketch:type="MSShapeGroup"></path>
+                    <rect id="progress" fill="#5CBF6F" sketch:type="MSShapeGroup" x="2" y="2" width="34" height="33" rx="3"></rect>
+                    <text id="value" fill="#FFFFFF" sketch:type="MSTextLayer" font-family="Exo 2" font-size="20.7143027" font-weight="normal">
+                        <tspan x="9" y="27">12</tspan>
+                    </text>
+                </g>
+            </g>
+            <g id="Mustafa-Deck" transform="translate(421.000000, 269.000000)" sketch:type="MSShapeGroup">
+                <path d="M234.674,19.765 L1.715,19.765 L0.218,23.232 L236.245,23.232 L234.674,19.765 L234.674,19.765 Z" id="Shape" fill="#AA6F48"></path>
+                <path d="M234.598,2.849 L1.993,2.849 L3.456,-0.404 L233.049,-0.404 L234.598,2.849 L234.598,2.849 Z" id="Shape" fill="#BC8864"></path>
+                <path d="M234.598,23.232 L234.598,2.849 L1.993,2.849 L1.993,23.232 L0.218,23.232 L0.218,46.726 L236.245,46.726 L236.245,23.232 L234.598,23.232 L234.598,23.232 Z" id="Shape" fill="#AF7B58"></path>
+            </g>
             <g id="Gosterme" transform="translate(621.000000, 397.000000)" font-size="18" font-family="Exo 2" fill="#FFFFFF" sketch:type="MSTextLayer" font-weight="normal">
                 <text>
                     <tspan x="0" y="18">Gosterme</tspan>
@@ -438,11 +439,13 @@
                 <path d="M60.445,81.92 L68.778,93.579 L65.409,93.579 L60.445,81.92 L60.445,81.92 Z" id="Shape" fill="#BB8764"></path>
                 <path d="M68.778,93.579 L65.409,93.579 L54.231,67.33 L47.091,67.33 L47.091,121.374 L78.109,121.374 L68.778,93.579 L68.778,93.579 Z" id="Shape" fill="#C2906E"></path>
             </g>
-            <g id="Gabrielo-Discard" transform="translate(233.000000, 391.000000)" fill="#B5C6D8" sketch:type="MSShapeGroup">
-                <rect id="Shape" x="0" y="-0.0465116279" width="40" height="59.8006645" rx="8"></rect>
+            <rect id="Gabrielo-Discard-Shape" stroke="#F8E81C" stroke-width="10" sketch:type="MSShapeGroup" x="231" y="391" width="42" height="63.012453" rx="8"></rect>
+            <g id="Gabrielo-Discard" transform="translate(233.000000, 392.000000)" fill="#D8D8D8" sketch:type="MSShapeGroup">
+                <rect id="Gabrielo-Discard-Shape" x="0" y="-0.0465116279" width="39" height="59.8006645" rx="8"></rect>
             </g>
-            <g id="You-Discard" transform="translate(800.000000, 393.000000)" fill="#B5C6D8" sketch:type="MSShapeGroup">
-                <rect id="Shape" x="0" y="0" width="40" height="60" rx="8"></rect>
+            <rect id="You-Discard-Shape" stroke="#F8E81C" stroke-width="10" sketch:type="MSShapeGroup" x="798" y="391" width="42" height="63" rx="8"></rect>
+            <g id="You-Discard" transform="translate(800.000000, 393.000000)" fill="#D8D8D8" sketch:type="MSShapeGroup">
+                <rect id="You-Discard-Shape" x="0" y="0" width="38" height="60" rx="8"></rect>
             </g>
             <g id="Alina-Discard" transform="translate(667.000000, 261.000000)" fill="#B5C6D8" sketch:type="MSShapeGroup">
                 <rect id="Shape" x="0" y="0" width="40" height="60" rx="8"></rect>

+ 8 - 0
apps/web/priv/static/app/js/bootloader.js

@@ -156,12 +156,20 @@ function translateScene(e)
     }
 
     document.getElementById("Users-Online-Message").firstElementChild.textContent = i18n("Online");
+    try {
     document.getElementById("OnlineChatEditor").firstElementChild.textContent = i18n("EditMessage");
     document.getElementById("GameChatEditor").firstElementChild.textContent = i18n("EditMessage");
+    } catch (e) { console.log("Please add foreignObjects to schene from SVG.txt"); }
     $("#Point-Table").find("text")[0].lastElementChild.textContent = i18n("Statistics");
     $("#Rules").find("text")[0].lastElementChild.textContent = i18n("Rules");
     $("#Login-Text")[0].lastElementChild.textContent = i18n("Login");
     $("#Kakush")[0].lastElementChild.textContent = i18n("Kakush") + ": " + 0;
+    
+    $("#Gabrielo-Discard-Shape").hide();
+    $("#Center-Card-Selection").hide();
+    $("#You-Discard-Shape").hide();
+    
+
 }
 
 function initChatSample() {

+ 2 - 2
apps/web/priv/static/app/js/chat.js

@@ -278,7 +278,7 @@ function initChat()
     document.getElementById("Right-Bar").onmouseout = barHoverOut;
     document.getElementById("Left-Bar").onmouseover = onlineHover;
     document.getElementById("Left-Bar").onmouseout = onlineHoverOut;
-
+try {
     document.getElementById('onlineChatEdit').setAttribute("contentEditable","true");
     document.getElementById('onlineChatEdit').onkeydown = chatEditor;
     document.getElementById('onlineChatEdit').onfocus = chatEditorClearContent;
@@ -288,7 +288,7 @@ function initChat()
     document.getElementById('edit').onkeydown = chatEditor;
     document.getElementById('edit').onfocus = chatEditorClearContent;
     document.getElementById("edit").style.display = '';
-
+} catch (e) { console.log("foreignObjects missing from SVG.txt"); }
     document.getElementById('Page-1').addEventListener(mousewheelevt, mouseWheelHandler, false);
 
 }

+ 16 - 2
apps/web/priv/static/app/js/okey/okey.js

@@ -132,11 +132,19 @@ function PostLoad()
             scope.deck.length() < 15 ? 
             (   scope.centralCard.dragHandler.enable(),
                 scope.centralCard.$el.on(document.createTouch ? "touchstart" : "mousedown", fadeIn).on(document.createTouch ? "touchend" : "mouseup", fadeOut), 
-                scope.centralCard.on("dragmove", removeFadeOut).on("dragstop", addFadeOut).on("revert", fadeOut)
-            ):( scope.centralCard.dragHandler.disable(), 
+                scope.centralCard.on("dragmove", removeFadeOut).on("dragstop", addFadeOut).on("revert", fadeOut),
+                $("#Gabrielo-Discard-Shape").show(),
+                $("#Center-Card-Selection").show()
+
+            ):( $("#You-Discard-Shape").show(),
+                scope.centralCard.dragHandler.disable(), 
                 scope.centralCard.$el.off(document.createTouch ? "touchstart" : "mousedown", fadeIn).off(document.createTouch ? "touchend" : "mouseup", fadeOut)
             );
+
         } else {
+
+            $("#You-Discard-Shape").hide();
+
             playerTurn = !1,
             scope.centralCard.dragHandler.disable(),
             scope.centralCard.$el.off(document.createTouch ? "touchstart" : "mousedown", fadeIn).off(document.createTouch ? "touchend" : "mouseup", fadeOut);
@@ -169,6 +177,12 @@ function PostLoad()
             new scope.Card({color:scope.CARD_COLORS[revealed[1]-1],value:revealed[2]});
         }
 
+        if (scope.deck.justTaken && player == scope.user) {
+            $("#Gabrielo-Discard-Shape").hide();
+            $("#Center-Card-Selection").hide();
+            $("#You-Discard-Shape").show();
+        }
+
         if (pile && !scope.deck.justTaken && scope.playersLeftHandsMap[player].take(), 
             0 === pile && player == scope.user && (scope.centralCard.color = scope.CARD_COLORS[revealed[1]-1], 
             scope.centralCard.value = revealed[2], scope.centralCard.render(), createCentralCard()), 

+ 1 - 1
apps/web/priv/static/app/js/selector.js

@@ -12,7 +12,7 @@ var scope = {
     MALE_SKINS: [ "Gabrielo", "Mustafa" ],
     FEMALE_SKINS: [ "Alina" ],
     paused: false,
-    version: 1806201404
+    version: 1806201408
 };
 
 var $ = function(_undefind)

BIN
apps/web/priv/static/doc/Kakaranet-Scene.sketch/Data


+ 1 - 1
apps/web/priv/static/doc/Kakaranet-Scene.sketch/metadata

@@ -16,7 +16,7 @@
 		<string>ZapfDingbatsITC</string>
 	</array>
 	<key>length</key>
-	<integer>3008907</integer>
+	<integer>3018346</integer>
 	<key>version</key>
 	<integer>37</integer>
 </dict>