Commit graph

30 commits

Author SHA1 Message Date
Andy2
b0470d5276 add new preference that when set prevents calculation and drawing of
crosshairs.
2011-12-06 18:17:55 -08:00
Eric House
c01981bc8f Make miniwindow stuff compile-time optional. The goal's to use native
features where they look better or are easier to manage, e.g. Toasts
and dialogs on Android.
2011-08-29 20:36:01 -07:00
Eric House
f4ea54c30b cleanup; no behavior change 2011-03-29 18:12:55 -07:00
Andy2
3ee3af8881 init crosshairs correctly so 0th column and row aren't drawn short. 2010-11-22 07:04:51 -08:00
Andy2
5b33df4e25 modify model_getTile to take NULL for out parms where the result is
often ignored, then pass NULL instead of the address of variables
called 'ignore'.  Should be no behavior change.
2010-10-29 19:52:15 -07:00
Andy2
d1f6057987 fix stupid typo that meant crosshairs started on top row was only
three cols wide at first.
2010-08-26 18:20:24 -07:00
Andy2
09bc83429e add and set new flags for crosshairs so platforms can do better than
fill cells as is done for focus.
2010-08-11 18:50:16 -07:00
Andy2
dbed23e240 change definition of movement during drag to include not just drag of
a tile but motion on the board which will include crosshairs.  This
prevents miniwindow from coming up and stopping crosshairs movement
when it happened to start on a bonus square.
2010-07-16 18:57:08 -07:00
Andy2
21d705c6e7 make wrap code for popping tile up above cursor hotspot (or finger)
conditionally compiled.  I probably want it off on Android now that I
have crosshairs.
2010-07-12 19:11:24 -07:00
Andy2
fd9464b909 first cut at crosshairs: drawing in focus color the entire column and
row that's currently being touched/dragged through.  Meant to aid
users of capacitive touch screens in figuring out what cell they're
on.
2010-07-12 06:39:46 -07:00
eehouse
da2cfa5934 changes (commited earlier but now somehow missing) putting
scroll-related fields into a struct so vertical and horizontal can be
handled by the same code; add to board_zoom out params indicating
whether further zooming is possible.
2010-04-15 02:15:50 +00:00
eehouse
774d3f8a13 copyright change 2010-04-08 04:14:34 +00:00
eehouse
d263b47a56 lots of changes, still rough, to allow zooming in and out on board.
Includes ability to scroll horizontally by dragging.  Board init API
changes to specify board width and max height instead of cell
dimensions, so now board owns task of picking cell size.  If the
number of cells does not evenly divide into a board dimension then the
extra pixels are distributed among some columns/rows in a way that
still allows bitblit-based scroll implementations (though horizontal
scrolling at this point always does an invalAll()).  Not yet tested
with overlapping tray.  And still need to allow rows to be taller than
cols are wide if platform code has given the space.  Stream format
changes with this checkin.
2010-04-08 04:14:14 +00:00
eehouse
ec24df8546 include any mid-drag tile, if it's a blank, in the set of blank tiles
rendered in the second pass.  Mid-drag tiles were not being rendered
if they happened to be blanks.
2010-03-08 06:10:37 +00:00
eehouse
b6a151a7e8 don't adjust y upward if divider's being dragged -- should be tiles
only.  Fixes bug where divider can't be dragged unless grabbed low or
started quickly.
2010-02-27 18:04:40 +00:00
eehouse
b52c9f0d14 Fixes bug found by alpha tester by dragging third tile to left of
divider.  Inval all tiles when a drag ends off any managed space.  We
don't know what tiles have already been moved, and when it's returned
to its initial spot may appear a dup.
2010-02-27 18:03:15 +00:00
ehouse
1073a98f9f add dragDropSetAdd which causes mid-drag tiles to be treated as if
they're 2/3 their height higher.  Meant to work better on touchscreens
where finger would otherwise prevent user from seeing where the drop
will land.  Still not tested or tuned on device.
2010-01-25 00:19:54 +00:00
ehouse
af1ca9af84 Quash some compile-time warnings. snprintf instead of sprintf. 2008-12-06 15:59:30 +00:00
ehouse
f8870da48f Don't draw hint rect, or start drag to change it, if hints are disallowed. 2008-12-01 13:06:37 +00:00
ehouse
c20e85eccd combine all per-player arrays in board into a single array of structs.
access can then be via a ptr, more effecient and faster.  The change
seems to save 1K of generated code.  No changes to algorithms, only to
field access.
2008-07-18 07:49:00 +00:00
ehouse
183d5514ca Fix crasher: don't start a board-scroll operation and attempt to end
by dropping a tile.
2008-06-07 23:05:54 +00:00
ehouse
bd6aed4b5a Fix so curses-only builds and curses build doesn't segfault. 2008-05-26 00:27:48 +00:00
ehouse
c2fbb06438 force miniwindow entirely onto board even if natural position is on
tray; fix overdrawing onto miniwindow by making timer proc return a
boolean and only redrawing (on wince) when it's true.
2008-04-12 15:36:31 +00:00
ehouse
ff254fcef4 add ability to scroll the board by dragging it. add new method
util_altKeyDown to allow user to choose between scrolling board and
dragging the hint rect when both are possible.  add adjustYOffset;
make it and board_setYOffset more tolerant of out-of-bounds inputs and
use that to simplify calling code.
2008-04-08 03:55:53 +00:00
ehouse
1e7bc3839b Implement scrolling during drag via timer rather than by counting on
getting notified when pen is dragged off the board.  The latter won't
happen if the board is up against the edge of the screen.
2008-03-29 20:23:27 +00:00
ehouse
1de7ca6697 When scrolling in response to a drag, invalidate under the tile both
before and after the scroll.  Otherwise on platforms where scrolling
is via a bitmove the old position gets scrolled away and never redrawn
leaving ghost tile parts lying around.
2008-03-15 14:00:05 +00:00
ehouse
d00aa75a12 fold hint-region-drag into dragdrpp, saving a bunch of code and
gaining scrolling during drag on small screens.
2008-03-13 12:23:22 +00:00
ehouse
4a6f07d1fa Don't return tile to tray on a simple tap when drag-drop is available; move
function between files.
2008-03-11 12:22:10 +00:00
ehouse
c526d86a88 invalidate divider when first touched so that it's drawn in-drag immediately. 2008-03-10 00:49:06 +00:00
ehouse
193bc90a06 add dragdrpp.{c,h}, since apparently merging doesn't include svn adding 2008-03-08 23:19:04 +00:00