Sudoku: Improved value hint.
* Removed toggling its visibility on click - it's now always visible once it's there. * Also update and show it when changing a value or hint.
This commit is contained in:
@@ -599,8 +599,7 @@ SudokuView::MouseDown(BPoint where)
|
|||||||
if (buttons == B_PRIMARY_MOUSE_BUTTON && clicks == 1) {
|
if (buttons == B_PRIMARY_MOUSE_BUTTON && clicks == 1) {
|
||||||
uint32 value = fField->ValueAt(x, y);
|
uint32 value = fField->ValueAt(x, y);
|
||||||
if (value != 0) {
|
if (value != 0) {
|
||||||
// Toggle value hint
|
_SetValueHintValue(value);
|
||||||
_SetValueHintValue(fValueHintValue == value ? ~0UL : value);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -612,6 +611,7 @@ SudokuView::MouseDown(BPoint where)
|
|||||||
uint32 value = hintX + hintY * fBlockSize;
|
uint32 value = hintX + hintY * fBlockSize;
|
||||||
uint32 field = x + y * fField->Size();
|
uint32 field = x + y * fField->Size();
|
||||||
_PushUndo();
|
_PushUndo();
|
||||||
|
_SetValueHintValue(value + 1);
|
||||||
|
|
||||||
if ((clicks == 2 && fLastHintValue == value && fLastField == field)
|
if ((clicks == 2 && fLastHintValue == value && fLastField == field)
|
||||||
|| (buttons & (B_SECONDARY_MOUSE_BUTTON
|
|| (buttons & (B_SECONDARY_MOUSE_BUTTON
|
||||||
|
|||||||
Reference in New Issue
Block a user