ehouse
3e4fe7c795
Make much smaller .ico file by hand using GIMP, and check it in. png
...
files are inputs to that process but not used in the build until I
figure out how to script building the .ico.
2008-10-26 21:05:44 +00:00
ehouse
9ac6b1be7a
Tray cannot be exactly same height as cells as it has thicker borders.
...
Reserve that difference from calculation of cell height so tray will
pick it up later.
2008-10-26 15:01:05 +00:00
ehouse
1b2f867e2f
Add a 16x16 icon. Remove the .ico file from svn, adding instead the
...
three .png files from which it's built. Build now depends on icotool,
which is in Debian and so not a problem. The resulting .ico is
probably 3x the size built with winders tools, so eventually I should
fix icotool or nag its author.
2008-10-25 21:59:46 +00:00
ehouse
552a6a5560
Get rid of string constants referencing \My Documents, using instead
...
SHGetSpecialFolderPath. Cache the result of calling it. Note that
mingw SHGetSpecialFolderPath headers define SHGetSpecialFolderPath as
SHGetSpecialFolderPathW which isn't in the library; hack around that.
2008-10-25 18:08:36 +00:00
ehouse
a4eb339c59
wince support for Rem: focus and showing remaining tiles
2008-10-24 09:05:13 +00:00
ehouse
f1a975c106
Save games in different directory for debug version to prevent
...
crashing when opening wrong-format files.
2008-10-24 08:36:44 +00:00
ehouse
9b75a4e4e8
change name of platform in about box
2008-10-24 08:35:50 +00:00
ehouse
76688cd706
Fix bug: tray too short on large screen. Always make tray a multiple
...
of cell size when possible, using minimum when needed.
2008-10-20 01:24:59 +00:00
ehouse
1bb0217785
Send message on back key only when coming up, not going down, to
...
prevent double-dismiss of dialogs.
2008-10-18 19:38:31 +00:00
ehouse
ff0bbb7c54
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
be93f274ee
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
20bcdea816
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
6b6d5d79d0
Remove logging; add WM_ constants for message logging.
2008-10-13 01:22:58 +00:00
ehouse
cfb42822e4
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
af6a7970a2
add 22x22 icon for smartphone
2008-10-13 01:05:42 +00:00
ehouse
3bbf428485
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
dd0f688b92
first cut at script to produce zipfile and readme
2008-10-11 22:59:18 +00:00
ehouse
e35a0c5e79
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
4f11e4270e
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
373a931b3e
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
b25f20587a
get rid of excessive logging
2008-10-09 12:07:30 +00:00
ehouse
8c9cfc358a
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
ab1cc03e41
Draw focussed scrollbar using WM_CTLCOLORSCROLLBAR. Onlyworks on
...
Win32, so keep old method for Wince.
2008-10-07 04:00:37 +00:00
ehouse
2bc132627f
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
9289df31a0
add width x height to title bar correctly (debug w32 only)
2008-09-29 05:07:35 +00:00
ehouse
305e9891e1
put dictionary in place if none there
2008-09-29 05:06:24 +00:00
ehouse
658a8f91fa
Draw divider using player color, not always black.
2008-09-28 17:55:27 +00:00
ehouse
79bb886495
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
0f3752ee12
Script for testing a bunch of Wince device resolution under Wine.
2008-09-28 17:38:18 +00:00
ehouse
d2afc68ba8
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
a72e4d0c13
comments and assertions
2008-09-28 16:47:11 +00:00
ehouse
5ea12405c0
clean up tile-picker dlg
2008-09-27 15:58:07 +00:00
ehouse
c1c7c34f84
Add more WM_ constants
2008-09-27 15:15:14 +00:00
ehouse
cac8497e3f
Improve the font dialog
2008-09-27 15:10:53 +00:00
ehouse
949a67b15f
{G|S}etWindowLong -> {G|S}etWindowLongPtr as per MSDN docs
2008-09-27 15:05:26 +00:00
ehouse
a9d255592a
cleanup: name changes; don't measure the same glyph twice.
2008-09-18 03:50:04 +00:00
ehouse
ed12a83a34
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
eea0f9e925
Check in files forgotten before: simple font browser.
2008-09-18 03:47:04 +00:00
ehouse
299beddc77
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
1b48b64cea
move logLastError
2008-09-14 16:06:51 +00:00
ehouse
6759fa8601
plug leak: DeleteObject can't nuke an object CE didn't create
2008-09-14 16:06:18 +00:00
ehouse
783b3a2860
move logLastError
2008-09-14 16:01:28 +00:00
ehouse
dfd61caf25
remove unused defines
2008-09-14 14:38:16 +00:00
ehouse
9b3974b9cb
Up copyright date.
2008-09-14 14:37:44 +00:00
ehouse
4a6be0dafb
Up beta version; fix sizes to avoid clipping on some CE devices.
2008-09-14 14:36:31 +00:00
ehouse
234c2971a1
Extend use of fitted fonts to scoreboard, allowing scoreboard to have
...
non-constant size eventually.
2008-09-13 15:24:23 +00:00
ehouse
25c59a25e7
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
87ce5f06d4
Reduce parameter count. No logic change.
2008-09-10 11:57:30 +00:00
ehouse
7299675adc
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
462bc96868
logRect utility
2008-09-09 12:20:45 +00:00
ehouse
181e880d8d
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
9be9842e48
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
226f1ea470
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
a5c0509b38
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
4fb1e05b3a
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
84758c8be2
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
11ca0d54d0
Fix cached pen remaining after color preference changed.
2008-08-02 14:35:40 +00:00
ehouse
ee820361e2
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
6a6ce44a59
fix major leakage by closing one game before opening another.
2008-08-01 10:47:32 +00:00
ehouse
38314f2a2e
fix scrollbars now that I finally understand what nPage is supposed to be.
2008-08-01 10:37:52 +00:00
ehouse
da03309bb6
fix drawing on 320x320 devices by forcing Wince to treat them as 320x320.
2008-07-30 04:08:45 +00:00
ehouse
b99aaa826b
add game names in sorted order
2008-07-28 05:02:39 +00:00
ehouse
d61b63986b
fix typo
2008-07-28 05:02:11 +00:00
ehouse
bff4b573c9
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
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
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
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
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
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
2dceb054b8
Move to new cegcc, whose tools have slightly different name.
2008-05-26 00:47:40 +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
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
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
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
ehouse
44186e220d
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
8a6df572ae
add some consts.
2008-05-06 12:49:37 +00:00
ehouse
d7d8c054b2
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
536de24e1d
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
37af03cae3
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
39212dcde2
Fix drawing of cursor arrow by moving the clip rect.
2008-04-12 15:47:15 +00:00
ehouse
f1ec47aa93
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
72457bf28c
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
f7c48a729f
shorten dialog
2008-04-02 03:51:12 +00:00
ehouse
120592324a
remove excessive logging
2008-04-02 03:50:55 +00:00
ehouse
95f26fe5c3
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