diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2005-11-29 09:49:02 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2005-11-29 09:49:02 +0000 |
| commit | fc5408715112ba936dbed42c6ab8e9daea5f68cf (patch) | |
| tree | 24426497d956d053d2ff58356f5d28cd79042d49 | |
| parent | 312aa3a3c0ed8cec53907048ea9590e09c02f460 (diff) | |
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
| -rw-r--r-- | test/sudoku.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
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.</P>\n" + "only once in each column and row. In addition, each 3x3 subgrid\n" + "may only contain one of each number.</P>\n" "<P>This version of the puzzle is Copyright 2005 by Michael R Sweet</P>\n" |
