From a95686958a08bb3d1aa940b781ac557d47ab2f65 Mon Sep 17 00:00:00 2001 From: Michael Leuschel <leuschel@uni-duesseldorf.de> Date: Thu, 1 Jul 2021 10:48:18 +0200 Subject: [PATCH] try to disable Solve when no solution --- Sudoku/SudokuFeld.svg | 18 ++++++++++++++---- Sudoku/visb_sudoku.json | 5 +++++ 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/Sudoku/SudokuFeld.svg b/Sudoku/SudokuFeld.svg index 60a63c8..3098cc9 100644 --- a/Sudoku/SudokuFeld.svg +++ b/Sudoku/SudokuFeld.svg @@ -89,7 +89,17 @@ -ms-user-select: none; user-select: none; pointer-events: none; - + fill: black; + } + .disabledActionbuttons { + font-size: 8px; + font-family: sans-serif; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + pointer-events: none; + fill: darkgray; } .normalNumbers { font-size: 8px; @@ -1066,20 +1076,20 @@ <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="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="darkgray">+</text> + <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> <g id="Remove" transform="translate(140,22.5)"> <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="black">-</text> + <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">-</text> </g> <g id="Solve" transform="translate(155,22.5)"> <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="black">L</text> + <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">L</text> </g> <g id="SmallBoxes"> diff --git a/Sudoku/visb_sudoku.json b/Sudoku/visb_sudoku.json index ad350bb..1a4ff80 100644 --- a/Sudoku/visb_sudoku.json +++ b/Sudoku/visb_sudoku.json @@ -40,6 +40,11 @@ "id": "TipFrame_%0", "attr": "class", "value" : "IF %0:PossibleVals(curx,cury) THEN \"OnTipFrames\" ELSE \"OffTipFrames\" END" + }, + { + "id": "SolveText", + "attr": "class", + "value" : "IF ENABLED(\"Solve\")=TRUE THEN \"normalActionbuttons\" ELSE \"disabledActionbuttons\" END" } ], "events": [ -- GitLab