Skip to content
Snippets Groups Projects
Commit 43a43055 authored by Michael Leuschel's avatar Michael Leuschel
Browse files

properly support tip hover

parent 58403fe6
No related branches found
No related tags found
No related merge requests found
......@@ -29,10 +29,20 @@
fill : rosybrown
}
.hover {
stroke : black;
stroke : lightgray;
stroke-width : 0.1;
fill : whitesmoke
}
.conflictpos {
stroke : lightgray;
stroke-width : 0.1;
fill : whitesmoke
}
.samevalue {
stroke : lightgray;
stroke-width : 0.1;
fill : lavender
}
.normalKeypad {
fill : lightgray
}
......@@ -96,7 +106,16 @@
.SmallBoxes{
stroke: lightgray;
}
.OnTipFrames{
stroke: purple;
fill: none;
stroke-width : 1.0;
}
.OffTipFrames{
stroke: none;
fill: none;
stroke-width : 0.1;
}
</style>
......@@ -992,6 +1011,7 @@
</text>
</g>
<g id="Buttons" transform="translate(110,40)">
<title>Set cell to</title>
......@@ -1015,34 +1035,47 @@
<text x="48.90335" y="52.000538" id="bt_9" xml:space="preserve" class="normalTextkeyboard">9</text>
</g>
<g id="TipFrame" transform="translate(110,40)" visibility="hidden">
<rect rx="0.6" class="OffTipFrames" x="0.9" y="0.9" width="18.2" height="18.2" id="TipFrame_1"/>
<rect rx="0.6" class="OffTipFrames" x="0.9" y="20.9" width="18.2" height="18.2" id="TipFrame_4"/>
<rect rx="0.6" class="OffTipFrames" x="20.9" y="0.9" width="18.2" height="18.2" id="TipFrame_2"/>
<rect rx="0.6" class="OffTipFrames" x="20.9" y="20.9" width="18.2" height="18.2" id="TipFrame_5"/>
<rect rx="0.6" class="OffTipFrames" x="40.9" y="0.9" width="18.2" height="18.2" id="TipFrame_3"/>
<rect rx="0.6" class="OffTipFrames" x="40.9" y="20.9" width="18.2" height="18.2" id="TipFrame_6"/>
<rect rx="0.6" class="OffTipFrames" x="40.9" y="40.9" width="18.2" height="18.2" id="TipFrame_9"/>
<rect rx="0.6" class="OffTipFrames" x="20.9" y="40.9" width="18.2" height="18.2" id="TipFrame_8"/>
<rect rx="0.6" class="OffTipFrames" x="0.9" y="40.9" width="18.2" height="18.2" id="TipFrame_7"/>
</g>
<g id="NewGameButton" transform="translate(110,10)">
<title>NewGame</title>
<rect rx="1.2" id="newGameRect" height="9.3" width="59.4" y="0.4" x="0.3" stroke="#6200cc" fill="#7b00ff"/>
<text transform="matrix(1 0 0 1 0 0)" font-style="normal" font-weight="bold" xml:space="preserve" text-anchor="start" font-family="sans-serif" font-size="3.9" id="NewGameText" y="6.25" x="20.039063" stroke-width="0" stroke="#6000c6" fill="#ffffff" >New Game</text>
<text transform="matrix(1 0 0 1 0 0)" font-style="normal" font-weight="bold" xml:space="preserve" text-anchor="start" font-family="sans-serif" font-size="3.9" id="NewGameText" y="6.25" x="20.039063" stroke-width="0" stroke="#6000c6" fill="#ffffff" >New Puzzle</text>
</g>
<g id="Tip" transform="translate(110,22.5)">
<title>Tip</title>
<title>Show feasible values</title>
<ellipse ry="7" rx="7" id="TippCircle" cy="7.5" cx="7.5" class="normalKeyboard"/>
<text transform="matrix(1 0 0 1 0 0)" class="normalActionbuttons" font-style="normal" font-weight="normal" xml:space="preserve" text-anchor="start" font-family="sans-serif" font-size="10" id="TippText" y="10.96203" x="4.71516" stroke-width="0" stroke="null" fill="#7f00ff">?</text>
</g>
<g id="Add" transform="translate(125,22.5)">
<title>Add</title>
<title>(not available)</title>
<ellipse ry="7" rx="7" id="AddCircle" cy="7.5" cx="7.5" class="normalKeyboard"/>
<text style="cursor: move;" font-style="normal" class="normalActionbuttons" font-weight="normal" xml:space="preserve" text-anchor="start" font-family="sans-serif" font-size="10" id="AddText" y="10.96203" x="4.71516" stroke-width="0" stroke="null" fill="#7f00ff">+</text>
</g>
<g id="Remove" transform="translate(140,22.5)">
<title>Remove</title>
<title>Erase cell value</title>
<ellipse ry="7" rx="7" id="RemoveCircle" cy="7.5" cx="7.5" class="normalKeyboard"/>
<text style="cursor: move;" font-style="normal" class="normalActionbuttons" font-weight="normal" xml:space="preserve" text-anchor="start" font-family="sans-serif" font-size="10" id="RemoveText" y="10" x="6" stroke-width="0" stroke="null" fill="#7f00ff">-</text>
</g>
<g id="Solve" transform="translate(155,22.5)">
<title>Solve</title>
<title>Solve the puzzle automatically</title>
<ellipse ry="7" rx="7" id="SolveCircle" cy="7.5" cx="7.5" class="normalKeyboard"/>
<text style="cursor: move;" transform= "scale(-1,1) rotate(-40 -9 9)" font-style="normal" class="normalActionbuttons" font-weight="normal" xml:space="preserve" text-anchor="start" font-family="sans-serif" font-size="10" id="SolveText" y="11" x="-9" stroke-width="0" stroke="null" fill="#7f00ff">L</text>
</g>
......
......@@ -19,7 +19,7 @@
"repeat": [1,2,3,4,5,6,7,8,9],
"id": "board_%0_%1",
"attr": "class",
"value" : "IF curx=%0 & cury=%1 THEN \"selected\" ELSIF %0|->%1:conflict_pos(curx,cury) THEN IF %1:dom(Board(%0)) & BOARD(%0)(%1)=BOARD(curx)(cury) THEN \"wrong\" ELSE \"hover\" END ELSIF %1:dom(Board(%0)) & BOARD(%0)(%1)=BOARD(curx)(cury) THEN \"hover\" ELSIF %1:dom(PuzzleBoard(%0)) THEN \"fixed\" ELSE \"normal\" END"
"value" : "IF curx=%0 & cury=%1 THEN \"selected\" ELSIF %0|->%1:conflict_pos(curx,cury) THEN IF %1:dom(Board(%0)) & BOARD(%0)(%1)=BOARD(curx)(cury) THEN \"wrong\" ELSE \"conflictpos\" END ELSIF %1:dom(Board(%0)) & BOARD(%0)(%1)=BOARD(curx)(cury) THEN \"samevalue\" ELSIF %1:dom(PuzzleBoard(%0)) THEN \"fixed\" ELSE \"normal\" END"
},
{
"for": {"from":1, "to":9},
......@@ -27,6 +27,12 @@
"id": "txt_%0_%1",
"attr": "visibility",
"value" : "IF %1 : dom(Board(%0)) THEN \"visible\" ELSE \"hidden\" END"
},
{
"for": {"from":1, "to":9},
"id": "TipFrame_%0",
"attr": "class",
"value" : "IF %0:PossibleVals(curx,cury) THEN \"OnTipFrames\" ELSE \"OffTipFrames\" END"
}
],
"events": [
......@@ -59,6 +65,11 @@
"hovers": [{ "attr":"class", "enter":"hoverKeyboard", "leave":"normalKeyboard"}
]
},
{
"id": "Tip",
"hovers": [{ "id":"TipFrame", "attr":"visibility", "enter":"visible", "leave":"hidden"}
]
},
{
"id": "NewGameButton",
"event": "SetPuzzle",
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment