Commit graph

473 commits

Author SHA1 Message Date
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
ehouse
be219b71f2 fix scrollbars now that I finally understand what nPage is supposed to be. 2008-08-01 10:37:52 +00:00
ehouse
691f5fea19 fix drawing on 320x320 devices by forcing Wince to treat them as 320x320. 2008-07-30 04:08:45 +00:00
ehouse
925964675a add game names in sorted order 2008-07-28 05:02:39 +00:00
ehouse
da105cfb16 fix typo 2008-07-28 05:02:11 +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
7ded50b908 nuke unused variable 2008-07-20 16:31:50 +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
ebc481ddc0 Implement dup, delete and rename buttons in saved games dialog.
Differs from Palm in having no edit field.  Rather, a separate dialog
comes up to get the new name.  Rather than reload the spinbox with a
new set of saved games after an action, just close and reopen the
dialog.
2008-06-26 04:17:14 +00:00
ehouse
951d7e1c7e Use GetModuleFileName to find dictionaries in same directory as executable. Replace cute attempt to cons up list of possible dict locations with a string in a resource. Get rid of two-year-old code explaining a change in where dicts live. Fix typo putting 4K buffer on stack. 2008-06-13 05:25:20 +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
80b73824e1 Cleanup: fix for win32; remove constants that belong in cegcc; etc. 2008-06-07 14:42:20 +00:00
ehouse
930ed69d6b Finally fix scroll-follows-focus for color edit dialog (the tallest).
Trick was to add BS_NOTIFY property to dialog controls and look for
the WM_COMMAND->BN_SETFOCUS message.
2008-06-07 14:40:05 +00:00
ehouse
fa1f65283f for win32, look for dicts locally. 2008-06-07 13:46:27 +00:00
ehouse
a29ab639fc rename and reorganize/simplify dialog-handling code common to all
dialogs, handling scrolling and backspace key (smartphone only) and
scroll-by-focus in a single place.
2008-06-05 04:29:28 +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
af089de849 Move to new cegcc, whose tools have slightly different name. 2008-05-26 00:47:40 +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
ec8786b2a7 cleanup: remove dead function; move variables closer to where used 2008-05-25 15:08:03 +00:00
ehouse
51d4c608f9 Don't include mingwm10.dll in .cab. Doesn't seem to be needed. 2008-05-12 02:51:22 +00:00
ehouse
5502c3ef8b Trying to give smartphone users way to use keypad to move tiles to
board.  Enabling key-to-text works, but constants to turn it off
aren't in cegcc.  So for b2 add a quick hack where 1 means first tile
in tray, 7 means last (rightmost).  Enable and test on gtk.
2008-05-11 20:29:43 +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
cf6a3db940 Work around what appears to be smartphone bug where grouped radio
buttons are not kept in sync by manually unchecking one when the
other's selected. Also add terminating WS_GROUP bits; they're supposed
to be there, but did not help.
2008-05-11 13:58:04 +00:00
ehouse
4e9f1c6c2b remove unnecessary memset 2008-05-11 13:55:58 +00:00
ehouse
9617f503a9 Make prefs dialog narrower so fits smartphone screen. 2008-05-10 22:33:07 +00:00
ehouse
bbd9384a9e fix win32 build 2008-05-10 21:11:54 +00:00
ehouse
180de81e58 Fix color edit dialog itself. Shrink to fit smartphone screen. And
use another owner-drawn button for the sample so it can be located in
the resource file.
2008-05-10 21:09:12 +00:00
ehouse
3d6f26cc3d Work around apparent limitation to smartphone/ppc, that ownerdraw
buttons don't generate WM_MESSAGE events and ownerdraw static controls
don't get drawn: have one disabled ownerdraw button as the color
sample and a real button to trigger the edit.
2008-05-10 18:41:16 +00:00
ehouse
e178b7ccf5 Use SHInitDialog on smartphone to create fullscreen dialogs. Move
test for smartphone into util functions so can't forget it.  This
fixes scrolling on smartphone.
2008-05-10 15:42:52 +00:00
ehouse
ebad668227 add some consts. 2008-05-06 12:49:37 +00:00
ehouse
ac63d5621f Clean up saved games dialogs, and remove (temporarily) controls that
won't do anything for b2.  Rename a couple of structs.
2008-04-13 17:14:16 +00:00
ehouse
63419db11a Put game name in title bar on launch as well as after opening saved
game.  Clear when opening unnamed/defaultnamed game
2008-04-13 17:01:09 +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
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
fd4cc02c13 shorten dialog 2008-04-02 03:51:12 +00:00
ehouse
97b8d81d40 remove excessive logging 2008-04-02 03:50:55 +00:00
ehouse
0225343c09 Remove params from ceDlgSetup and ceDoDlgFocusScroll; use the right
message to fetch text from listbox on CE.
2008-03-31 00:26:18 +00:00