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

add help event to go to position with forced value

parent b57b8a1b
Branches
No related tags found
No related merge requests found
......@@ -100,6 +100,11 @@ OPERATIONS
SetCurPos(x,y) = PRE x:DOM & y:DOM THEN
curx, cury := x,y // change current position
END;
SetCurPosToDetPosition(dx,dy) = PRE dx:DOM & dy:DOM &
not(dy:dom(Board(dx))) &
card(PossibleVals(dx,dy))=1 /*@desc "exactly one value possible" */ THEN
curx, cury := dx,dy // change current position
END;
SetBoard(val) = PRE val:RAN & cury /: dom(PuzzleBoard(curx)) THEN
Board(curx)(cury) := val // Set the Value at the current position
END;
......
......@@ -1073,10 +1073,10 @@
<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="black">?</text>
</g>
<g id="Add" transform="translate(125,22.5)">
<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="disabledActionbuttons" 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">+</text>
<g id="Help" transform="translate(125,22.5)">
<title>Show a position with forced value</title>
<ellipse ry="7" rx="7" id="HelpCircle" 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="HelpText" y="10.96203" x="4.71516" stroke-width="0" stroke="null">+</text>
</g>
<g id="Remove" transform="translate(140,22.5)">
......
......@@ -45,6 +45,11 @@
"id": "SolveText",
"attr": "class",
"value" : "IF ENABLED(\"Solve\")=TRUE THEN \"normalActionbuttons\" ELSE \"disabledActionbuttons\" END"
},
{
"id": "HelpText",
"attr": "class",
"value" : "IF ENABLED(\"SetCurPosToDetPosition\")=TRUE THEN \"normalActionbuttons\" ELSE \"disabledActionbuttons\" END"
}
],
"events": [
......@@ -83,6 +88,12 @@
{ "id":"TipFrame", "attr":"visibility", "enter":"visible", "leave":"hidden"}
]
},
{
"id": "HelpCircle",
"event": "SetCurPosToDetPosition",
"hovers": [{ "attr":"class", "enter":"hoverKeypad", "leave":"normalKeypad"}
]
},
{
"id": "newGameRect",
"event": "SetPuzzle",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment