Commit graph

43 commits

Author SHA1 Message Date
Eric House
a26dced506 drawing tray tiles can fail, e.g. when font info not yet available, so
only clear bits when successful. Fixes problem where tray didn't get
drawn until tiles were somehow invalidated.
2013-11-07 07:29:54 -08:00
Eric House
d41c1a4ca8 add new param so pending text can be drawn differently when it's not
the player's turn.
2013-05-30 07:17:13 -07:00
Eric House
9b0436d1ee Make rem string measure function return boolean to indicate rect will
be invisible rather than setting width and height to 0.  No real
change beyond simplifying/speeding platform code.
2012-07-15 09:30:27 -07:00
Eric House
2fc2a60842 create alternate scoreboard draw flow, disabled by compile-time flag,
that does layout and draw in a single pass and with more information
so platform has more responsibilty for dealing with space constraints
and can, I hope, do a better job.  There's no change until the flag is
turned on.  Works for GTK with flag on, but is stubbed out for ncurses.
2012-06-26 07:20:09 -07:00
Eric House
405cb23023 fix bug where current player's scoreboard would disappear if other
players' names were too long by giving all a the same proportion of
what they request and passing in the percent given in case draw
implementation wants to use it as a cue to truncate.
2012-06-15 06:26:40 -07:00
Andy2
52d02f04dd pass tile value into drawCell(). Java code doesn't use it yet, but I
want to play with drawing cells tray-tile-style when they're big
enough.
2011-12-02 18:58:52 -08:00
Andy2
3ec97d5c07 Turn "Turn done" into "Pass" when the pending score is 0. To do that
I had to pass the score into draw_trayBegin since
draw_drawPendingScore() isn't called until the first tile's placed.
Note: as long as I'm messinng with this menuitem it should be disabled
when it's not the player's turn.
2011-10-04 18:48:33 -07: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
Andy2
3b7b4802a9 add ability to specify, track and use separate dictionaries for each
player.  Works for gtk client.  Compiles for Android but there's no UI
yet to specify more than one dict.  Management of dupicate dicts
without duplicating memory -- refcounting -- will be up to the
platforms.
2011-04-01 19:57:10 -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
eehouse
c79b3e2395 make draw_scoreBegin return a boolean like the other two draw_*Begin
methods
2010-05-12 11:51:14 +00:00
eehouse
a87ecf5638 pass vScale and hScale into draw_boardBegin so platform can use same
size font for all cells regardless of size; fix scrolling to pass
actual sum of the disappearing rows' heights.
2010-04-08 04:14:55 +00:00
ehouse
3eadd93aa6 Pass scores and remaining tiles count to draw_scoreBegin so can
determine font size based on max length.   API change.
2009-11-18 13:24:56 +00:00
ehouse
1fa8b2e48f remove unused param (not even compiled on Palm); on wince, try to
duplicate for timer the vertical offset used for scores.
2009-10-16 03:20:39 +00:00
ehouse
dde7cfa9b1 add a const 2009-10-15 12:37:42 +00:00
ehouse
6d7a81fce6 change draw api so all available bitmaps (only 2 in current format)
can be passed for tile and cell drawing
2009-01-13 12:57:56 +00:00
ehouse
cefd69d8b3 Since there's now a flag indicating whether to show the value of a
tile, make value unsigned.  Adjust/fix platforms.  Add cmdline flag to
linux apps for hiding values.
2008-12-29 03:09:35 +00:00
ehouse
13001301ec Indicate tiles whose values should be hidden with a new bit rather
than a negative value.
2008-12-13 07:32:53 +00:00
ehouse
77d14163b1 track focus on Rem: region of scoreboard in addition to players' score
areas, pass into draw whether to show it highlighted, and fire a util
method when it's clicked on.  Intent is that platforms show the
remaining tiles dialog.
2008-10-24 08:56:20 +00:00
ehouse
36627fb051 Add listeners to model so board can be notified whenever dictionary
changes.  Pass dict into draw via new API, removing it from the
draw_begin calls.
2008-09-05 12:11:37 +00:00
ehouse
bc05761c4a change API for drawing divider so it can be focussed as well as
selected.  Being using that information in palm and wince.  For GTK,
use color rather than ugly black rects to indicate focus.
2008-07-17 05:03:01 +00:00
ehouse
f749fdd560 Remove all tabs. No code changes. 2008-05-31 03:26:16 +00:00
ehouse
355cfa9fcc add owner param to drawTileMidDrag so can color tiles correctly 2008-03-11 11:48:53 +00:00
ehouse
0b1f4b8f0a 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
6e715d63ee change name of field. No code change. Pending on symbian and franklin which don't compile. 2008-02-02 15:17:53 +00:00
ehouse
81dac2ec1b draw hint borders wider on high-res devices so they're actually visible (part 2) 2007-12-19 05:31:53 +00:00
ehouse
7c8b7294cd add const to a bunch of char* decls in APIs and variables; no code change 2007-02-03 17:54:20 +00:00
ehouse
a998e96de9 Tweak scroll-of-focussed-board inval code so we don't inval the whole
board, which looks crappy.  Instead inval only what was previously a
border row, and pass a new param to draw_vertScrollBoard so the
platform can choose not to scroll cells that will just get overwritten
with different bits.
2007-01-21 22:59:29 +00:00
ehouse
0a426b0876 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
d3812271a2 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
44eaa36319 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
3153e2b867 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
63a8e0adbb Add macros to draw.h, and use 'em for wince, so that a platform can choose to call draw.h methods via a vtable or static linking. 2006-04-01 21:01:20 +00:00
ehouse
fb0d471dae add const decls to draw.h and dictnry.h functions where appropriate,
and modify "subclass" methods to match.  Should be no code change, but
this makes the intent of the APIs clearer.
2006-02-18 06:39:40 +00:00
ehouse
92485783af update email address in header comments: no code change 2006-01-08 01:25:02 +00:00
ehouse
9e76871306 (conditionally) modify dicts to support getting height of platform
glyphs, pass into drawing code so can be fetched and cached, and
implement for Palm.  This is to allow drawing glyphs (like Danish's
A-with-circle) that are taller than normal without the visual padding
the rest can have.  So far works for 68K/non-highres.  Will not
compile for ARM yet.
2005-07-07 03:46:07 +00:00
ehouse
36bba4024b move playerNum into dsi so can be used in formatting score 2005-03-15 03:27:24 +00:00
ehouse
7482c07ba5 add callback for most recent score 2005-01-22 19:49:19 +00:00
ehouse
47f81507af add HintAtts param to draw_drawBoardArrow 2004-11-14 16:06:30 +00:00
ehouse
da4fe889f1 Track drag on board to form a rect whose borders are drawn via
attributes on cells; pass that rect to engine when hint requested.
Still rough, and needs to be made per-user.  Also needs a way to hide
the rect.
2004-06-15 01:56:01 +00:00
ehouse
d48ae1a216 draw_trayBegin returns bool 2004-03-02 03:26:10 +00:00
ehouse
6940f21009 change return type of draw_boardBegin 2004-02-13 04:45:19 +00:00
ehouse
5776da0b93 first checkin 2003-11-01 05:35:29 +00:00