ehouse
4ce9a87be5
Use new relay status callback, and similar callback added to socket
...
read/writer, to provide connection status beside scoreboard (in area
outside that managed by code in common/). Simple letters now, it'll
be icons eventually.
2009-09-15 13:04:34 +00:00
ehouse
2f0ec7e583
fix some string display bugs by using utf8 when converting; handle
...
Resend Messages menuitem (with error when standalone); add string for
that new error.
2009-09-11 07:44:27 +00:00
ehouse
c5ade1431a
Move a few more strings into resources.
2009-04-19 17:34:14 +00:00
ehouse
2727cacae0
Start factoring out strings for localization: move most to resource,
...
add new file that loads resources (working around LoadString not
working as docs say it should). Add all-caps version for testing and
not-yet-working cmdline change to use it.
2009-04-09 13:48:38 +00:00
ehouse
f3b53e4aaf
When dict is utf8, convert to wchar_t assuming CP_UTF8 rather than CP_ACP.
2009-04-05 20:18:46 +00:00
ehouse
44a3888d6d
Add enum to debug-only logging.
2009-02-14 16:24:06 +00:00
ehouse
0d08147472
Turn off SMS by default (pending confirming a way to use the apis in unsigned app); add commented-out NO_DRAW option.
2009-01-31 18:02:02 +00:00
ehouse
52a4a92e14
If smallest bitmap is too big, use it anyway at full size.
2009-01-18 19:52:46 +00:00
ehouse
50a6f93b99
Pick largest possible bitmap; fix inconsistency between cedict's idea
...
of bitmap format and cedraw's: rows are padded to 8-bit boundary, not
necessarily 16-bit.
2009-01-18 18:29:27 +00:00
ehouse
e1bc780beb
In tray, when values are hidden draw letters instead of bitmap if
...
they'll fit.
2009-01-17 20:30:49 +00:00
ehouse
e6132b3dde
Scale bitmaps for specials to the size of an M so they look right next
...
to other letters.
2009-01-17 18:49:35 +00:00
ehouse
2e488374f1
bug fix: fix reversed width and height params to StretchBlt
2009-01-17 15:45:24 +00:00
ehouse
08ceeb85b7
Fix size test for bitmap caching
2009-01-14 13:27:56 +00:00
ehouse
aee316372e
Use new api. Use small for cell and large for tile still, but now
...
create and cache an actual HBITMAP, and prefer it to letters. This is
needed for Catalan where "L-L" will never fit. Still to be done:
prefer letters to bitmap where they'll actually fit (devices where
tiles drawn wider), and position better in tray. May also want to
allow scaling.
2009-01-13 13:11:05 +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
bc01341f95
When values are hidden, draw letters as large as possible in the tile.
2008-12-13 07:34:16 +00:00
ehouse
59cd2a83d1
Make tray tiles one pixel taller, extending all the way to bottom of
...
screen.
2008-12-12 13:40:41 +00:00
ehouse
6da758b5fa
set text color before drawing star bitmap to make color consistent;
...
add utility function for setting colors to reduce code size.
2008-12-06 16:22:43 +00:00
ehouse
a9fbd3c027
Ignore bitmap for tiles, using string instead.
2008-12-04 06:16:37 +00:00
ehouse
088ab1451e
Use minimum height for tile value; draw bitmaps (clipped) even if too large.
2008-12-03 13:42:30 +00:00
ehouse
de6f6dcdef
draw bitmaps larger when will fit; draw hint region border thicker and
...
in player color; rename constants.
2008-12-02 13:47:18 +00:00
ehouse
44ae99a075
remove redundant set of #defines for whether we're compiling for desktop or wince
2008-11-22 16:43:55 +00:00
ehouse
e2cd0b5807
Speed up font calculation by interleaving width and height
...
constraints; simplify pending score display by using %dp rather than
trying to fit two strings in the many possible sizes of tiles.
2008-11-08 16:25:49 +00:00
ehouse
3958950ad1
When finding font to fit height, optionally force it to fit width as
...
well. Mechanism used for Rem only so far, but will work for score too
as long as we don't need it to shrink font as score gets longer.
Current impl worries about height first, then width; would be better
to look at both simultaneously to reach the goal more quickly.
2008-11-02 23:17:38 +00:00
ehouse
e6399c74c1
Fix bug making glyphs from random garbage; when narrowing in on
...
correct font size, compute based on ratio from what we have rather
than just reducing by one each pass.
2008-11-02 04:17:42 +00:00
ehouse
9e9d8a9d79
show non-dived focus as tray with background and perimeter tiles with
...
background rather than opaque border. Looks better on a range of
screen sizes.
2008-10-31 04:33:20 +00:00
ehouse
cbdf8edcf5
Use SHGetSpecialFolderPath to locate dicts in /Document Files/Crosswords; reserve 1-pixel space around Rem: text
2008-10-29 08:46:02 +00:00
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