Commit graph

35 commits

Author SHA1 Message Date
ehouse
73e0313263 Fix bug that number key tries to move tile to board even during trade.
Generalize use of number to select tile in tray so that during trade
keys will toggle selected tiles.  Letters too.
2008-05-19 01:18:43 +00:00
ehouse
d57c0f69a4 redraw tray (if dirty) even if hidden. On wince at least this
prevents the bottoms of the tiles from peeking out from under a
partially obscuring board, giving away information.  In cases where
the board completely hides the tray this is unnecessary, but making
that optimiztion can come later.  This is a bug.
2008-04-14 01:31:53 +00:00
ehouse
88ef41af15 rewrite invalCellsUnderRect to be less stupid: start from rect passed
in rather than whole board.
2008-03-14 09:20:26 +00:00
ehouse
c26eed3462 merge with drag_n_drop branch: apply patch generated with this command on that branch: svn diff -r 2080:2087 2008-03-08 23:16:21 +00:00
ehouse
69912147de When showing cell values, also show tile values if the don't-show tile values preference is set. 2007-04-06 01:41:16 +00:00
ehouse
c5fe2a7589 Get rid of draw_eraseMiniWindow: just inval what's under it; make use
of CELL_ISCURSOR consistent: when focus not dived all elements have it
set (or only perimeter for board, settable at compile time); get rid
of draw_drawCursor since CELL_ISCURSOR is all that's needed;
2007-01-19 08:20:11 +00:00
ehouse
6df629c445 on keyDown, look at what keyUp will do and, if nothing, don't handle
the event.  This lets focus transfer work as before there was keyDown.
2007-01-12 03:28:20 +00:00
ehouse
e90db9776f remove dead code. 2007-01-09 02:38:22 +00:00
ehouse
bce76a3d34 Break key handling into keyUp and keyDown, and treat keyDown the same
as penDown.  Idea is to be able to set timers to get bonus square
hints etc. without stylus.  Works, but transitions are rough because
keyDown doesn't know whether keyUp will result in a focus change.
2007-01-06 17:32:08 +00:00
ehouse
74ccc0ed34 When "dived" focus reaches and crosses border of object, return as if
not handled.  This causes the platform to handle the key event itself,
typically by moving the focus to the next top-level object.
2006-11-17 13:41:13 +00:00
ehouse
0d013a0599 Two big changes. Pass focus bit into all or and players when focus
not dived and tray or scoreboard focussed.  This lets platform decide
to display top-level focus via mods to all elements.  Second, when
moving focus to top level from dived, claim not to have handled the
key event (but return true if needs redraw).  This allows platform to
handle shifting focus without requiring callback (which removed.)
2006-11-14 06:46:04 +00:00
ehouse
f9dcd1820a Add to draw APIs of individual elements (e.g. board cells) whether
they're focussed so that they can draw that during rather than after
everything else.  On palm, use this to draw focus using the system
selected color rather than with the blue nav rect.  Since a new param
was too much, add new enum type CellFlags and pass as bitvector to
draw APIs.
2006-11-12 14:36:15 +00:00
ehouse
c91847f56f When moving focus through tray, skip empty space; when through board,
skip cells with tiles permanently played.  Space char raises focus but does
not move it laterally.
2006-11-09 06:05:40 +00:00
ehouse
9a00908cdb When internal focus reaches edge of object, move it back up and onto
the next object using a callback to the platform to determine what, if
any, object is next.  Adjust curses platform to cooperate.  Works
well.  Palm is next.
2006-11-07 05:46:44 +00:00
ehouse
005fd92fd4 More progress on one-handed navigation: fix ncurses board clipped to
bottom of tray; add focus-related params to draw*Finished routines
(and simplify to one) so platforms don't have to save from Begin
routines (and stop palm doing that); check version of saved game, and
handle case where older binary tries to open newer version; redraw
Palm tray buttons after focus change to stop focus-rect ghosting; fix
annoying overlap in saved games dialog; palm version goes to a3.
2006-11-05 16:54:18 +00:00
ehouse
b0102f8baa Lots of progress on one-handed navigation: add gadgets to stand in for board
scoreboard and tray on palm; make center drill into the focussed object and
spacebar come back up then move the focus among them.  Integrate with other
focussable objects on main form.  Go from separate drawCursor routines to
same for all three, with cursor only visible when focus is drilled down.
On curses, add a hilite rect routine that can be called after text is laid
down, and use for cursors.
2006-11-03 06:23:54 +00:00
ehouse
6b1fc7e5e4 Fix crash on pre-fiveway palmos where FrmGetFocus always returns -1;
add new preference for whether small value nums are drawn in tiles in
tray.
2006-10-29 17:41:14 +00:00
ehouse
c6598bef8a randIntArray runs once and returns whether array is modified. Tray calls
again until it is.  newgame calls once: it's possible that juggling won't
do anything.  Still pending: do we tell users when nothing changed, or
leave them to figure out that it's not a bug?
2006-06-27 06:30:44 +00:00
ehouse
1f81e62f12 add missing include file 2006-06-22 03:36:51 +00:00
ehouse
9259d5e91d move randIntArray to strutils, and use instead of similar code to juggle tiles in tray. 2006-06-16 01:19:11 +00:00
ehouse
dcd31cd092 update email address in header comments: no code change 2006-01-08 01:25:02 +00:00
ehouse
56accaaad5 dict_tilesToString sig change 2005-07-08 03:02:31 +00:00
ehouse
083104a49f nuke logging that was polluting ncurses screen 2005-03-19 21:44:35 +00:00
ehouse
85c72a91ba change trayCursorLoc to be a 3-bit number so stores smaller 2005-01-23 17:28:29 +00:00
ehouse
22b06909b4 kill log statement 2005-01-23 08:20:13 +00:00
ehouse
73f79a7dfa up/down arrow keys move divider 2005-01-04 03:11:56 +00:00
ehouse
76615fbc48 always hide arrow when undoing partial move, not just when done from
tray.
2004-07-10 22:57:17 +00:00
ehouse
b36124f01d Hide cursor arrow when pen in empty tray region returns tiles to tray. 2004-07-10 22:40:50 +00:00
ehouse
3f3f9541b3 remove unused variable 2004-06-24 05:19:52 +00:00
ehouse
9e77a21270 move some actions to penUp from penDown 2004-06-23 03:33:06 +00:00
ehouse
5b82486429 draw_trayBegin returns bool 2004-03-02 03:26:10 +00:00
ehouse
1657ec4288 hit-test in divider using bigger rect 2004-02-13 04:47:22 +00:00
ehouse
d23c7bdef3 add invalTilesUnderRect 2004-02-12 04:20:11 +00:00
ehouse
c0f2dd71bf Add test to allow dragging a selected tile. 2004-01-25 14:30:29 +00:00
ehouse
6a57cef012 first checkin 2003-11-01 05:35:29 +00:00