ehouse
3b5337d7d2
wince support for Rem: focus and showing remaining tiles
2008-10-24 09:05:13 +00:00
ehouse
3992e4299f
Remove logging; add WM_ constants for message logging.
2008-10-13 01:22:58 +00:00
ehouse
0f3b206371
inval font cache when new dict has different chars; use cell size as a
...
minimum font heigth for tray; darken default player 4 color for better
contrast.
2008-10-11 16:53:22 +00:00
ehouse
37e922e92b
drawing tweaks: better test for wide short tray tile; don't inval
...
scroll rects unless focus shifting.
2008-10-09 12:12:25 +00:00
ehouse
190c0aca88
Modify layout code to keep cells close to square when possible,
...
leaving significant border space on highly rectangular screens.
2008-10-08 04:42:16 +00:00
ehouse
a4f27e5525
Draw focussed scrollbar using WM_CTLCOLORSCROLLBAR. Onlyworks on
...
Win32, so keep old method for Wince.
2008-10-07 04:00:37 +00:00
ehouse
5ba97223f8
Set aside portion of scrollbar rect above and below it and color that
...
with focus color when the scrollbar has keyboard focus. This should
help users figure out how one-handed nav works. Better would be to
override background color of the scrollbar and draw it full-sized, but
I havne't figured out how. This is good enough for beta.
2008-10-01 08:31:43 +00:00
ehouse
2f618616df
Draw divider using player color, not always black.
2008-09-28 17:55:27 +00:00
ehouse
f8bb0ae202
Two large changes. First, layout board etc. based only on screen
...
dimensions and one constant giving the minimum height of a cell.
Replaces a bunch of constants that didn't scale to different sized
screens well. Second, add the vertical scrollbar into the focus
rotation. Once I have it showing that it's focussed it'll be easier
to figure out how to scroll the screen.
2008-09-28 17:50:04 +00:00
ehouse
8a6992132b
comments and assertions
2008-09-28 16:47:11 +00:00
ehouse
1a1beed2f3
cleanup: name changes; don't measure the same glyph twice.
2008-09-18 03:50:04 +00:00
ehouse
33c99a2371
cleanup; to get better idea of what fonts are available on smartphone
...
add rough font chooser dialog. Is commented out and not meant to
ship.
2008-09-17 04:19:20 +00:00
ehouse
d27b0d4eed
Extend use of fitted fonts to scoreboard, allowing scoreboard to have
...
non-constant size eventually.
2008-09-13 15:24:23 +00:00
ehouse
720160e7de
Pass streams to cedraw on save and restore, adding version flag for
...
backward compatibility. Within cedraw, save cached font info to
remove the visible delay on startup.
2008-09-10 12:18:30 +00:00
ehouse
1825939981
Reduce parameter count. No logic change.
2008-09-10 11:57:30 +00:00
ehouse
34c4bdab9a
In case where board can't fully fill screen, track the rects on either
...
side and erase them when they're invalidated. When seeking best-fit
font, pull glyphs to measure from dictionary rather than assuming
A-Z. Speed font measuring code by passing over all glyphs only once,
noting tallest and lowest-extending then measuring only those two as
smaller sizes are tried. This *may* make the process fast enough that
I don't need to cache the information across boots: need to try on
real hardware.
2008-09-09 12:31:02 +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
36213460e0
Make CEDrawCtx def private; erase background when OS invalidates it.
...
This gets rid of what's visible behind the board when it's not
full-screen width, but causes a lot of flashing. Better will be to
make board.c own an entire rectangle and to decide board dimensions
itself.
2008-09-01 15:10:28 +00:00
ehouse
2daf7d503a
Pick fonts based on actual size of the subset of glyphs we'll use.
...
This allows a better fit without hard-coding offsets. It also takes
considerable time at startup, so either the algorithm has to be
improved or I need to cache the data as part of prefs (and delete it
when switching between landscape and portrait on devices that allow
that.)
2008-08-30 18:55:20 +00:00
ehouse
5588ed30ad
Fix cached pen remaining after color preference changed.
2008-08-02 14:35:40 +00:00
ehouse
b00a2ac384
Fix drawing of divider -- is too narrow to shrink horizontally so do so vertically; implement warnf with a dialog.
2008-07-24 04:16:48 +00:00
ehouse
9f82df49f6
Draw top-level board and tray focus as rect (like palm) rather than by
...
shading certain tiles/cells. Up version number. Change capitalization.
2008-07-20 16:33:19 +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
6153fc9854
Up version of APIs being used. Using non-hex may have been a mistake
...
anyway. Remove locally defined function that's available with higher
version.
2008-06-07 15:59:56 +00:00
ehouse
3555414ffc
Fix dictionary-search code to look in top-level temporary directories
...
rather than hard-coded "SD Card" etc. to work in non-English cases;
fix password dialog to fit, and simplify it; fix backspace on
smartphone for all dialogs with EDIT fields to actually backspace
rather than exiting app; and in main window have it raise focus. This
change requires SHSendBackToFocusWindow(), which is not yet in cegcc.
Until I get a patch accepted this breaks wince builds.
2008-05-31 22:07:29 +00:00
ehouse
1355b61906
set background color in timer, preventing flash of color when focus on scoreboard.
2008-05-25 15:54:34 +00:00
ehouse
64199cf1ec
clip so arrow doesn't overwrite cell border on smartphone with small cells.
2008-05-25 15:31:54 +00:00
ehouse
556e947cad
Prevent Pts in temp score display from overwriting number: draw it
...
first, and use a font the right size.
2008-05-25 15:08:59 +00:00
ehouse
f5b5da9dc5
Fix trade window draw and timer draw by setting clip rect. Change
...
softkey to turnDone when trading. Tweak trade-related user messages.
2008-05-11 15:25:04 +00:00
ehouse
18ea57fa38
Set clip rect before scrolling screen. Fixes bug where scroll forced
...
by hint left board drawn incorrectly.
2008-04-12 19:29:20 +00:00
ehouse
b085e0cea7
Fix drawing of cursor arrow by moving the clip rect.
2008-04-12 15:47:15 +00:00
ehouse
9e38eb7336
name change only
2008-03-30 23:58:04 +00:00
ehouse
996e88a575
Pick fonts for tray and board based on sizes at runtime; bury tile
...
values menuitem.
2008-03-16 14:23:57 +00:00
ehouse
a69092bc53
Use clipping to prevent spillage when cells are very small.
2008-03-15 23:06:06 +00:00
ehouse
355cfa9fcc
add owner param to drawTileMidDrag so can color tiles correctly
2008-03-11 11:48:53 +00:00
ehouse
963c59b0b5
implement drawTileMidDrag (same as tile in tray for now)
2008-03-09 23:32:24 +00:00
ehouse
a79dfdecc0
fix warning
2008-02-16 17:19:31 +00:00
ehouse
de6e0d4f2d
Make cegcc the default build environment for wince. Make inclusion of hacks needed to work with mingw/pocketpc-sdk conditional.
2008-02-16 16:33:46 +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
eeebeca542
substitute macro for common sizeof(x)/sizeof(x[0]) pattern; no generated code change
2007-05-26 14:03:07 +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
0b68a917f7
preliminary addition of xplatform-only focus, esp drawing of cursor
...
and handling of arrow keys via WM_KEYUP; added focus/cursor color to
prefs and color edit dialog. Tested only on win32 (WINE), and not
integrated with platform nav/focus model.
2007-01-19 08:24:02 +00:00
ehouse
e9871b1fb6
change constant names. No change to code compiled.
2007-01-19 06:43:52 +00:00
ehouse
382848f556
Fix to work with draw API changes
2006-11-12 15:22:26 +00:00
ehouse
4daabf6fe5
Set -Wunused-parameter for those versions of gcc that support it, and
...
deal with the output by removing params where possible and elsewhere
by adding XP_UNUSED macro wrapping __attribute__((unused)). There
should be NO change in function in spite of the large number of files.
2006-08-16 13:44:44 +00:00
ehouse
61959b394a
patch from Peter Rovnak. For Slovak support, need to specify the tray
...
font by name in order to get one that has all the necessary faces. Seems
to make no difference on US/English systems, but it works for him on a
localized device.
2006-08-16 01:29:21 +00:00
ehouse
a6d140581c
Turn on BitBlt scrolling.
2006-06-24 01:22:10 +00:00
ehouse
6870178490
implement vertical scrolling using BitBlt. It's faster and smoother, but
...
commented out for now since it may be better not to add so late in the cycle.
2006-06-22 04:59:18 +00:00
ehouse
a4cabd9cf7
Allow no space for REM text when no tiles left to allow more room for scores.
2006-06-16 01:15:44 +00:00
ehouse
0fe04af4b4
Turned on leak-checking at shutdown for debug version, and fixed leaks and
...
crashes in destructors that had never been called before. Seems now to
free all allocated memory before exiting.
2006-05-30 05:12:02 +00:00
ehouse
e26e149f4c
silence compiler warnings.
2006-05-28 16:16:46 +00:00
ehouse
04e9dfb76a
strcat becomes strcpy: trivial optimization
2006-05-25 04:07:49 +00:00
ehouse
27b740c03b
draw lines rather than bullets to indicate whose turn it is in vertical mode
2006-05-20 06:21:53 +00:00
ehouse
54e17e76b1
rewrite score formatting to put is-turn bullets above/below for
...
vertical scoreboard; reduce inter-line spacing and otherwise tweak
drawing.
2006-05-12 07:58:31 +00:00
ehouse
216615577b
minor fixes to drawing spacing (what I meant to check in)
2006-05-11 03:00:50 +00:00
ehouse
3b7e22dc1c
minor fixes to drawing spacing
2006-05-11 02:58:36 +00:00
ehouse
468c6efd37
first cut at supporting landscape mode by moving scoreboard to left edge of screen from top.
2006-05-09 02:01:27 +00:00
ehouse
2300d55567
Draw bitmap chars ("specials", e.g. for Spanish) centered in rect
...
rather than at x,y. This lines them up with normal letters on the
board as it changes size.
2006-04-02 22:27:44 +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
25b0d63b1a
get rid of unneeded DH()
2006-03-20 04:13:40 +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
3f577181dd
use debhacks
2006-01-28 19:03:10 +00:00
ehouse
92485783af
update email address in header comments: no code change
2006-01-08 01:25:02 +00:00
ehouse
cab0622c9d
Increase size of tray and fonts for win32; turn on windoze-style
...
menus.
2005-11-27 22:06:04 +00:00
ehouse
b462252ebb
fix syntax errors; other catch up with changes
2005-11-27 20:05:33 +00:00
ehouse
f6a6827c59
fix compile warnings
2005-06-23 14:12:09 +00:00
ehouse
6c9caadd43
use clipping when drawing bitmaps, can center 'em. This fixes
...
overwriting borders when cells shrink when SIP is visible.
2005-06-13 13:32:06 +00:00
ehouse
c2297590eb
fix incorrect signature that was causing all scores to be drawn as 0.
2005-06-09 14:18:55 +00:00
ehouse
3e1dfcb1ac
fix hint borders for arrowcursor
2004-12-12 17:39:59 +00:00
ehouse
f1dd28387c
draw hint rect borders
2004-06-16 04:17:08 +00:00
ehouse
566d21fc7b
position Spanish bitmaps better
2004-05-22 15:23:38 +00:00
ehouse
66e80a5689
use CR so showing last score works
2004-05-01 14:29:44 +00:00
ehouse
7f3a3040c7
cast
2004-04-03 16:39:54 +00:00
ehouse
018cc42e74
first cut at color editing
2004-03-28 01:14:34 +00:00
ehouse
d48ae1a216
draw_trayBegin returns bool
2004-03-02 03:26:10 +00:00
ehouse
934777e567
make two-line miniWindows work
2004-02-28 05:25:21 +00:00
ehouse
b0210ab672
change how blanks are indicated so one pixel's possible
2004-02-18 04:24:21 +00:00
ehouse
7742a90722
show which tiles on board are blanks; use tile background for on-board tiles
2004-02-15 23:37:45 +00:00
ehouse
ceb34e32c0
remove background from pts display in tray; center arrow; fix draw
...
during multiple hints.
2004-02-13 13:47:37 +00:00
ehouse
95f7452b35
commented-out experimental draw changes
2004-02-12 04:36:48 +00:00
ehouse
7226c92adf
move logLastError
2004-01-30 05:45:23 +00:00
ehouse
354427d33c
fix non-debug compile
2004-01-25 16:47:12 +00:00
ehouse
aea4964feb
always draw arrows in black
2004-01-22 03:20:19 +00:00
ehouse
1ec43c2262
fix tile drawing; move rem string
2004-01-10 18:02:10 +00:00
ehouse
6919c06826
move center "X" to middle of cell
2003-12-09 05:17:49 +00:00
ehouse
40c8c5036d
first checkin from personal archive
2003-11-20 16:26:35 +00:00