From fc5408715112ba936dbed42c6ab8e9daea5f68cf Mon Sep 17 00:00:00 2001
From: Michael R Sweet
Date: Tue, 29 Nov 2005 09:49:02 +0000
Subject: Update help and add support for keypad numbers.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4671 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
---
test/sudoku.cxx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
(limited to 'test')
diff --git a/test/sudoku.cxx b/test/sudoku.cxx
index 593352046..178ecf464 100644
--- a/test/sudoku.cxx
+++ b/test/sudoku.cxx
@@ -166,6 +166,7 @@ SudokuCell::handle(int event) {
case FL_KEYDOWN :
int key = Fl::event_key() - '0';
+ if (key < 0 || key > 9) key = Fl::event_key() - FL_KP - '0';
if (key > 0 && key <= 9) {
if (readonly()) {
fl_beep(FL_BEEP_ERROR);
@@ -461,7 +462,8 @@ Sudoku::help_cb(Fl_Widget *, void *) {
"first syllable) is a simple number-based puzzle/game played on a\n"
"9x9 grid that is divided into 3x3 subgrids. The goal is to enter\n"
"a number from 1 to 9 in each cell so that each number appears\n"
- "only once in each column and row.
\n"
+ "only once in each column and row. In addition, each 3x3 subgrid\n"
+ "may only contain one of each number.\n"
"This version of the puzzle is Copyright 2005 by Michael R Sweet
\n"
--
cgit v1.2.3