Commit graph

2081 commits

Author SHA1 Message Date
ehouse
0e31d4d33c 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
bc522c1acc nuke unused variable 2008-07-20 16:31:50 +00:00
ehouse
a370f67fd0 Draw divider smaller when focussed so color shows. Looks like crap,
but better than having focus disappear when on divider.
2008-07-18 09:20:20 +00:00
ehouse
e399a7b755 Quiet over-enthusiastic logging of state transitions. 2008-07-18 09:06:09 +00:00
ehouse
2d024b506d Return true on preflight for cursor move so will get called again.
Fixes tray nav on Palm.
2008-07-18 09:05:04 +00:00
ehouse
5fb7bb95d4 selInfo can't be left null when board created, as selPlayer is 0.
Point at pti[0] to fix crasher.
2008-07-18 09:03:54 +00:00
ehouse
52650992ee combine all per-player arrays in board into a single array of structs.
access can then be via a ptr, more effecient and faster.  The change
seems to save 1K of generated code.  No changes to algorithms, only to
field access.
2008-07-18 07:49:00 +00:00
ehouse
3d6ab4ffb4 Implement new model for focus/tray interaction aimed at smartphones
with five-ways and no obvious alt key.  Focus once dived into tray
moves over tiles *and* divider.  Tap of center key toggles
selectedness of object under focus.  Movement of focus when object is
selected drags the object (tile or divider) unless in trade mode.
This is easier to discover and behaves more like drag-and-drop -- and
lets you move the divider.  Works for linux and win32.  Key nav in
tray is broken on palm.
2008-07-17 05:16:09 +00:00
ehouse
95ad9bbc6e make function signature match param type 2008-07-17 05:07:01 +00:00
ehouse
e83786759c break board.c up so isn't too large for 68K on palm when compiled for
debugging.
2008-07-17 05:06:08 +00:00
ehouse
89edef9c18 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
95c6182b3c remove unused variable 2008-07-17 05:01:24 +00:00
ehouse
147f8a4357 Accept words that contain no vowels. 2008-07-12 19:37:27 +00:00
ehouse
d29968a3c1 update in accordance with current Dutch practice (says an informant) 2008-07-10 03:13:33 +00:00
ehouse
7899217aa4 separate UI-specific code so that a non-UI linux library can be compiled, e.g. for use with a toolkit not gtk or ncurses 2008-06-30 03:39:27 +00:00
ehouse
b265e3fa18 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
9ca72bd61a 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
2923f301a5 Fix cosmetic problems when changing focus and board overlaps tray.
The goal is to have the tray drawn on top, even if it's otherwise
hidden, when the whole thing's focussed.  Fix is to inval and
recalculate rects more often as focus changes or tray is hidden.
2008-06-07 23:14:26 +00:00
ehouse
0b5ad41899 Fix crasher: don't start a board-scroll operation and attempt to end
by dropping a tile.  (This part is to detect that no drag actuall happened.)
2008-06-07 23:07:31 +00:00
ehouse
087a05dd6a Fix crasher: don't start a board-scroll operation and attempt to end
by dropping a tile.
2008-06-07 23:05:54 +00:00
ehouse
6cbf62d4f0 Draw tiles hanging a bit below board when hidden to allow testing of
common case on wince devices.
2008-06-07 23:03:47 +00:00
ehouse
c521195554 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
a166e6f651 Remove tabs. Whitespace changes only. 2008-06-07 14:47:55 +00:00
ehouse
51a42ce2a2 Cleanup: fix for win32; remove constants that belong in cegcc; etc. 2008-06-07 14:42:20 +00:00
ehouse
5e06c72f5d 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
662bc9ec5f for win32, look for dicts locally. 2008-06-07 13:46:27 +00:00
ehouse
588c16d45f 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
7da66696ed 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
e60d338488 Remove all tabs. No code changes. 2008-05-31 03:26:16 +00:00
ehouse
2dceb054b8 Move to new cegcc, whose tools have slightly different name. 2008-05-26 00:47:40 +00:00
ehouse
d053f0731f Fix so curses-only builds and curses build doesn't segfault. 2008-05-26 00:27:48 +00:00
ehouse
7b781b9ff1 set background color in timer, preventing flash of color when focus on scoreboard. 2008-05-25 15:54:34 +00:00
ehouse
3d7595fb2c clip so arrow doesn't overwrite cell border on smartphone with small cells. 2008-05-25 15:31:54 +00:00
ehouse
7821a4c5e5 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
41192e60a0 cleanup: remove dead function; move variables closer to where used 2008-05-25 15:08:03 +00:00
ehouse
ca7c14128a fix bug: don't advance arrow if unable to move tile to board (introduced with recent tile index changes) 2008-05-24 16:21:03 +00:00
ehouse
321dbb6471 add missing error message 2008-05-24 16:08:13 +00:00
ehouse
464252ef55 Don't specify g++ version; add some consts to fix warnings with newer g++. 2008-05-21 03:49:11 +00:00
ehouse
73e0313263 Fix bug that number key tries to move tile to board even during trade.
Generalize use of number to select tile in tray so that during trade
keys will toggle selected tiles.  Letters too.
2008-05-19 01:18:43 +00:00
ehouse
467f93ce4f Don't include mingwm10.dll in .cab. Doesn't seem to be needed. 2008-05-12 02:51:22 +00:00
ehouse
1d5446bfdf 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
465daf0a15 While tap on draggable tile should not return it to tray, return-key on same tile should.
That's the only way to return a single tile on smartphone.
2008-05-11 16:20:37 +00:00
ehouse
90a10345b8 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
83c6abdfae A bit of cleanup; no code change. 2008-05-11 15:23:22 +00:00
ehouse
2744bcef97 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
255592ddec remove unnecessary memset 2008-05-11 13:55:58 +00:00
ehouse
f24965c093 Make prefs dialog narrower so fits smartphone screen. 2008-05-10 22:33:07 +00:00
ehouse
cba5a023d1 fix win32 build 2008-05-10 21:11:54 +00:00
ehouse
3b1d566eed 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
bec57181ed 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