Commit graph

62 commits

Author SHA1 Message Date
ehouse
231c0b4f44 claiming to handle EN_SETFOCUS broke text insertion for StrBox on PPC
(but not SP).  So for now, note focus changes and scroll if
appropriate but don't claim to have handled them.
2009-10-25 15:06:52 +00:00
ehouse
fa5d36517a Track EDITTEXTs in dialogs when following focus with scroll position.
This seems to fix bug where conns dialog wouldn't scroll on
Smartphone, though I'm not sure why.
2009-10-25 00:55:19 +00:00
ehouse
899c67f3fe ce code no longer needs to ask if dict is utf-8, as internally all
are.
2009-10-23 09:02:02 +00:00
ehouse
ad2ba1c249 Don't assume resources aren't utf-8 because current dict isn't.
Always assuming they're utf-8 seems to work, so do that for now.
Fixes problems with Catalan messages when using English dict.
2009-10-17 04:10:28 +00:00
ehouse
0d326c0252 Generalize code for moving lower items up to cover hidden items, and
use for role-config and juggle buttons in gameinfo dlg.
2009-10-17 04:01:59 +00:00
ehouse
f83f6d64ed drop a bit of logging 2009-09-12 23:17:04 +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
927c363edf Move more (hopefully this is it) strings into resources; make sure all
three .rc files have all strings.
2009-04-30 04:25:17 +00:00
ehouse
e4977e2c5f Add ability to scroll dialogs by dragging. Works only on
touchscreens, and has no sense of momentum.
2009-04-26 20:10:28 +00:00
ehouse
efe9fdf974 When resize dialog, put half the now-wider right margin on the left. 2009-04-21 12:42:51 +00:00
ehouse
481e2acb92 Add dialog for choosing localization .dll; save choice in prefs and open on boot. 2009-04-19 17:33:39 +00:00
ehouse
d19f052503 Track HINSTANCE of localization .dll separately, passing it where
appropriate; move rest (I think) of strings into resource; load menu
for win32 app after loading localization .dll.
2009-04-11 15:45:59 +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
06632f5495 get rid of excess logging (one line) 2009-01-18 18:17:08 +00:00
ehouse
8aadcb3406 Get rid of unused parameter 2009-01-14 13:02:08 +00:00
ehouse
4595191395 Always use GetForegroundWindow to find parent 2009-01-05 14:06:52 +00:00
ehouse
dab2f23479 Use Ok for stringbox, Done for Saved games dialog; next release to be
rc1, not b7
2008-12-13 04:39:06 +00:00
ehouse
cb7b8bf84f Back out change: button to dismiss Saved games dialog is "Done" again,
not "Ok".
2008-12-12 05:28:53 +00:00
ehouse
e28363f369 Warn when unable to open a saved game (generally when an older version
of the app tries to open game saved by newer version.)
2008-12-11 13:48:59 +00:00
ehouse
19d8f307b1 Add appropriate icon flags to all uses of MessageBox; remove a couple
of unnecessary Cancel buttons.
2008-12-07 16:24:26 +00:00
ehouse
c791010603 Don't let smartphone users set hintlimits checkbox, and explain
why. Fix bug calling MessageBox with main window ptr from dialog.
Include name of preexisting file when warning user who enters it while
saving/renaming.
2008-12-07 01:30:18 +00:00
ehouse
5f27b1552c When fewer than 4 players shown in game info dialog, move controls
higher that are below player rows. On some screen sizes this prevents
those items from being off-screen. Note that this requires use of
DM_RESETSCROLL message to get Smartphone to recalc scroll info and
that DM_RESETSCROLL is not yet defined in cegcc.
2008-11-18 12:36:27 +00:00
ehouse
ce82507db0 Add checkmarks to four menuitems to show state; add fullScreen
menuitem to w32 version and give it something to do.
2008-11-10 18:49:26 +00:00
ehouse
be3863dd5a For win32 builds, locate files relative to ./ 2008-11-02 04:15:10 +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
3c8f9d7049 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
bff5f9b7c9 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
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
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
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
be219b71f2 fix scrollbars now that I finally understand what nPage is supposed to be. 2008-08-01 10:37:52 +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
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
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
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
7790bf13ff make ceDlgSetup figure out from sizes whether to scroll; make
ceDoDlgFocusScroll parse params passed into WM_NEXTDLGCTL message to
figure out what object is about to get focus.
2008-03-31 00:22:24 +00:00
ehouse
8e285f1097 rename ceStackButtonsRight ceDlgSetup, and make it do more general
setup of dialogs on CE.  No need to move buttons, but now scrolling
may need to be enabled, dialogs made fullscreen, and softkeys added.
Add functions to be called from dialog's wndprocs to implement
scrolling.
2008-03-23 19:37:53 +00:00
ehouse
b7f35d2958 Don't subtract command bar height from client rect height on
smartphone.  This prevents windows from being too small in
non-fullscreen mode.  Make ceSizeIfFullscreen work based on state
rather than assuming it's toggling.
2008-03-15 18:32:22 +00:00
ehouse
cae88f5b6c Rework dialogs to fit or (eventually) scroll on small screen; put
dialogs in fullscreen mode; switch from dropdowns to spinbuttons on
CE; grab OS version on startup (not yet used.)
2008-03-15 15:39:58 +00:00
ehouse
244d58b957 Work on soft key and menu: derive text from menu item being moved so
that we can pull out and later replace any item by id alone.  Do
something similar on Win32 to ease development.  Remove '&' from
menuitem text, allowing winders to assign command keys, so that we
don't have to pull it before assigning text to softkey.
2008-03-10 01:47:46 +00:00
ehouse
885e7f0192 Put back "turn done" menu, and add call to change the left softkey.
Call it when turn changes, new game is begun, and hint feature has
been used.  Currently menuitem is duplicated.  Goal is to remove the
item being attached to the left button and to replace it when another
is chosen.
2008-02-26 13:49:41 +00:00
ehouse
4a464b6ef5 modify ceStackButtonsRight to place dialog ok/cancel buttons in
bottom menubar where possible; move XP_LOGW to cedebug.c
2008-02-16 17:14:35 +00:00
ehouse
eeebeca542 substitute macro for common sizeof(x)/sizeof(x[0]) pattern; no generated code change 2007-05-26 14:03:07 +00:00
ehouse
3db196156b Calculate old window width correctly when figuring new width. Fixes
problem of buttons drawn too close to right edge.
2006-05-28 00:40:28 +00:00
ehouse
fde2ef1ee2 Before putting dialog into landscape mode, make sure it won't be wider
than the screen.  That is, don't be fooled when in portrait mode by a
screen height that's SIP-reduced.
2006-05-27 22:52:10 +00:00
ehouse
3e934624a4 modify API for "portraitizing" dialogs, and space the buttons evenly
rather than stacking all from bottom.  This doesn't quit work on ce
since GetWindowInfo isn't available and IsWindowVisible does the wrong
thing.
2006-05-27 17:18:42 +00:00