Commit graph

514 commits

Author SHA1 Message Date
ehouse
c81e85deef Remove overdesigned edit-control-caching mechanism in favor of just
asking if the current focus owner is an edit control.
2008-10-14 05:25:15 +00:00
ehouse
4dde28bc28 Walk dialog's controls and make a list of Edit controls so that dialog
procs don't have to pass them in.  Compare handles rather than IDs.
2008-10-13 05:46:45 +00:00
ehouse
7281423100 Trapped back key should exit dialog even if it has an edit control if
that control does not have focus.  Do that.  And since I can't figure
out how to use APIs available in CE to find edit controls dynamically
each dialog proc has to pass its IDs in.  May fix that later, in which
case ceDlgSetEdits() should be removed.
2008-10-13 01:26:20 +00:00
ehouse
3992e4299f Remove logging; add WM_ constants for message logging. 2008-10-13 01:22:58 +00:00
ehouse
40e33036db Test (including a hack on undocumented bits in WM_HOTKEY's lParam)
whether back key resulted in a focus undive, and if it didn't, quit
the app.  Not quitting would best be done using SHNavigateBack, but
cegcc doesn't seem to have that.  And even the default behavior,
without messing with back keys at all, is to minimize, which means you
can't delete the .exe later without soft reset.  That may be my bug,
but for now we're exiting.
2008-10-13 01:17:13 +00:00
ehouse
4e07fb053d add 22x22 icon for smartphone 2008-10-13 01:05:42 +00:00
ehouse
097a85d115 Fix bug: don't delete current game name when user might still cancel
new game creation.
2008-10-11 23:56:04 +00:00
ehouse
3e3ff73e52 first cut at script to produce zipfile and readme 2008-10-11 22:59:18 +00:00
ehouse
ac5bbced8f mark debug-only formals and wrap in #defines to fix compile-time
warnings of clean wince build.
2008-10-11 17:58:43 +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
5e839d82e4 get rid of excessive logging 2008-10-09 12:07:30 +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
e0d73f4cd4 add width x height to title bar correctly (debug w32 only) 2008-09-29 05:07:35 +00:00
ehouse
8cecbd45c4 put dictionary in place if none there 2008-09-29 05:06:24 +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
ae6610a94f Script for testing a bunch of Wince device resolution under Wine. 2008-09-28 17:38:18 +00:00
ehouse
41e6f4abe2 Fix nasty crashers: restore previous game when unable to open new,
e.g. because it was created with a dict that's no longer available (in
which case warn to that effect.)
2008-09-28 16:48:30 +00:00
ehouse
8a6992132b comments and assertions 2008-09-28 16:47:11 +00:00
ehouse
e84a7c7a2d clean up tile-picker dlg 2008-09-27 15:58:07 +00:00
ehouse
7627672324 Add more WM_ constants 2008-09-27 15:15:14 +00:00
ehouse
df28e86fc8 Improve the font dialog 2008-09-27 15:10:53 +00:00
ehouse
0fd14dc0b7 {G|S}etWindowLong -> {G|S}etWindowLongPtr as per MSDN docs 2008-09-27 15:05:26 +00:00
ehouse
1a1beed2f3 cleanup: name changes; don't measure the same glyph twice. 2008-09-18 03:50:04 +00:00
ehouse
1536a05ac2 bug fix: check which combo is generating events rather than assume all
are meant to change number of players.
2008-09-18 03:48:29 +00:00
ehouse
b3f8902307 Check in files forgotten before: simple font browser. 2008-09-18 03:47: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
fd6345c1cb move logLastError 2008-09-14 16:06:51 +00:00
ehouse
82030b5382 plug leak: DeleteObject can't nuke an object CE didn't create 2008-09-14 16:06:18 +00:00
ehouse
4d7a781673 move logLastError 2008-09-14 16:01:28 +00:00
ehouse
e176540b5e remove unused defines 2008-09-14 14:38:16 +00:00
ehouse
93f120e274 Up copyright date. 2008-09-14 14:37:44 +00:00
ehouse
302f7524ef Up beta version; fix sizes to avoid clipping on some CE devices. 2008-09-14 14:36:31 +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
69f667fba3 logRect utility 2008-09-09 12:20:45 +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
cc627f6b6d Shrink scoreboard a bit. Goal's to not needs scrolling on small
screens, but still needs work.
2008-09-01 15:07:46 +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
1384be6895 Get rid of cute-but-confusing feature whereby the menuitem to which
the left softkey is set is removed from the right key's menu.  More
important is that menu-9-6 always mean "exit".
2008-08-27 12:38:01 +00:00
ehouse
bf505d1a62 Go back to using combobox on PPC but keep spinners on Smartphone.
Meaning: both exist in the resource, and at runtime we disable the
unwanted one and lookup IDs and sometimes window messages in order to
operate on 'em.  Also, spinners send WM_NOTIFY messages, so handle
that.  Current implementation is a bit of a hack but works.
2008-08-27 12:16:33 +00:00
ehouse
5588ed30ad Fix cached pen remaining after color preference changed. 2008-08-02 14:35:40 +00:00
ehouse
39eb88b14f Replace dropdowns in limited-hint dialog with spinners. Combine flags
for spinners into a macro to guarantee all same.
2008-08-01 11:13:13 +00:00
ehouse
3859e84c52 fix major leakage by closing one game before opening another. 2008-08-01 10:47:32 +00:00