Commit Graph

427 Commits

Author SHA1 Message Date
Glenn Maynard 9a865ac5cd MoveRowRelative should skip disabled rows, but didn't because
it was used by MoveRowAbsolute.  Refactor: MoveRowAbsolute sets
directly, ignoring whether a row is disabled (if you say "select
row 3", you mean it).  MoveRowRelative checks disabled rows,
with logic pulled from MenuUpDown (slightly refactored).  That
way, the disabled-row logic affects all relative movement.  (Net
simplification.)
2006-02-03 06:52:51 +00:00
Glenn Maynard 8704b5ec1e cleanup 2006-02-03 06:26:16 +00:00
Glenn Maynard 65a795a2dc hey also unused 2006-02-03 06:17:47 +00:00
Glenn Maynard 16a08f8500 unused 2006-02-03 06:17:25 +00:00
Glenn Maynard 441d23cbc9 move "bFirstChoiceGoesDown back to first choice" logic into AfterChangeRow 2006-02-03 06:16:38 +00:00
Glenn Maynard 652536ea83 simplify 2006-02-03 06:09:17 +00:00
Glenn Maynard e4c6fbafff fixup 2006-02-03 06:07:57 +00:00
Glenn Maynard 48a691534d cleanup 2006-02-03 06:06:34 +00:00
Glenn Maynard 02f5839746 cleanup 2006-02-03 06:04:27 +00:00
Glenn Maynard afa74ef150 move NAV_TOGGLE_FIVE_KEY focus handling into AfterChangeRow 2006-02-03 06:02:17 +00:00
Glenn Maynard ccab670ae8 add ScreenOptions::RestartOptions, to allow changing option rows
without restarting the screen completely
2006-02-03 05:36:16 +00:00
Glenn Maynard db0354cdf8 cleanup 2006-02-03 04:50:42 +00:00
Glenn Maynard 8ed452252a MoveRowRelative has had a side-effect of playing a sound, but
that only makes sense if the function was called as the result
of the user pressing a key.  ScreenOptionsEditCourse, etc.
use MoveRowAbsolute to set the default row, which calls MoveRowRelative,
causing an extranneous sound.
2006-02-03 04:50:25 +00:00
Glenn Maynard b74febae7a return bChanged 2006-02-03 04:40:49 +00:00
Glenn Maynard b556348e31 being a bit more explicit than usual, since the stuff in this screen is complicated 2006-02-03 04:36:48 +00:00
Glenn Maynard cb0c7ce59d Set up tsDestination directly. It doesn't make sense for a
function named "UpdateEnabledDisabled" to do this, and we
don't need to delay it anymore as GetWidthXY says (that was
before we moved the text into a frame).
2006-01-30 08:06:31 +00:00
Glenn Maynard 5995043bf0 Don't play the Start sound in SM_BeginFadingOut. It might
have been triggered by something that just played a sound,
or the screen might want to play a different sound.  It's
not SM_BeginFadingOut's job to play a sound.

(fixes double-start sound when "next screen" options are
selected from context menus in ScreenOptionsManage*)
2006-01-30 05:41:46 +00:00
Glenn Maynard 5ea602e4a2 hack to fix RowType_Exit in NAV_THREE_KEY_MENU 2006-01-25 09:38:58 +00:00
Chris Danford 7f821e8cfc CString -> RString 2006-01-22 01:00:06 +00:00
Glenn Maynard 5a3356e94e fix inactive underlines showing 2006-01-19 06:02:52 +00:00
Glenn Maynard 078017317c fix NAV_TOGGLE_FIVE_KEY focus navigation 2006-01-19 04:32:31 +00:00
Glenn Maynard b52e776f36 remove def param; use m_Def 2006-01-19 03:43:29 +00:00
Glenn Maynard 7e261bb44b merge code paths 2006-01-19 01:56:40 +00:00
Glenn Maynard 544733b287 don't have to import both players at once, so AfterImportOptions takes pn 2006-01-19 01:52:18 +00:00
Glenn Maynard 8da0e94aa2 UpdateText is used when the focus changes, so call it from
SetChoiceInRowWithFocus.
2006-01-19 01:23:14 +00:00
Glenn Maynard b158147319 pull pn loop out of UpdateText 2006-01-19 01:01:13 +00:00
Glenn Maynard b98fa213b5 only used in one place (makes it hard to see exactly where PositionUnderlines itself is used) 2006-01-19 00:42:50 +00:00
Glenn Maynard 127059874e simplify
(this stuff looks like overzealous abstraction, but I think most of it used to
be more complicated code that was moved off into other classes, and the
stubs were left behind)
2006-01-18 23:32:51 +00:00
Glenn Maynard 34b86a2185 reload on BeginScreen 2006-01-18 05:30:29 +00:00
Glenn Maynard 7b4c4643da update underlines in AfterImportOptions 2006-01-18 04:25:52 +00:00
Glenn Maynard 71cb277d84 InitText automatically 2006-01-18 04:10:31 +00:00
Glenn Maynard a42ba8e13f simplify 2006-01-17 21:40:39 +00:00
Glenn Maynard 39509ccb49 remove vDefs param 2006-01-17 21:32:52 +00:00
Glenn Maynard 8fd297bdfc phase out vDefs param 2006-01-17 21:31:50 +00:00
Glenn Maynard 9e5c128980 simplify 2006-01-17 05:38:02 +00:00
Glenn Maynard 3c63e09ca3 Previously, OptionRowHandler was owned and freed by
ScreenOptionsMaster (and ScreenOptionsManageProfiles).
Make it owned by OptionRow; the only pointer to them
is where they're stored in the OptionRow.  This
eliminates the remaining association between m_OptionRowHandlers
and m_pRows; that was confusing, because they're in
different places, and aren't always the same size.  It
also simplifies using OptionRowHandlers.
2006-01-16 22:55:57 +00:00
Glenn Maynard 3f60d2e26a I'm not sure what case BeginFadingOut wouldn't run SM_BeginFadingOut.
The NextScreen metric would have to be blank, and there aren't any
blank NextScreen metrics.

Move this handling into SM_BeginFadingOut itself.  Handle the case
of a blank NextScreen with a warning.
2006-01-16 22:42:11 +00:00
Glenn Maynard 031d359e98 remove redundant conditional 2006-01-16 22:11:22 +00:00
Glenn Maynard b3643f2451 This isn't reachable; we'll always exit through the bEndThisScreen path.
Actually, this changed behavior a little, if a screen was in NAV_THREE_KEY_MENU
and used SELECT_MULTIPLE rows.  That combination doesn't make much sense,
though; you'd have to press start on MULTIPLE rows and right on SELECT_ONE
rows.  That NAV mode is meant for SELECT_NONE.
2006-01-16 21:50:11 +00:00
Glenn Maynard 786d8a4d96 cleanup 2006-01-16 21:44:04 +00:00
Glenn Maynard 282ef1a9e4 When start is pressed or repeated, and we'd normally BeginFadingOut,
we'd set bEndThisScreen to false and continue on.  Instead, if we
were going to set a new screen, but stopped because we're transitioning
or the button was a repeat, just ignore it.  This eliminates an obscure
code path.
2006-01-16 21:41:50 +00:00
Glenn Maynard d9c4c62bc2 Allow NAV_THREE_KEY_MENU rows to do something other than set a screen,
in which case we'll apply it and stay on the menu.
2006-01-16 21:33:23 +00:00
Glenn Maynard dde02a286e split out ScreenOptions::GetNextScreenForSelection 2006-01-16 20:39:52 +00:00
Glenn Maynard 5320b3e92e OptionRowHandlers were originally exclusive to SOMaster, but
they're accessible by SOptions now, too.  Move this slightly
tricky next-screen logic into SOptions, since it can apply
to any screen that sets OptionRowHandlers.

(Actually, this doesn't really belong in BeginFadingOut, since
it's not called "MaybeBeginFadingOutDependingOnTheCurrentOption".
Maybe this should be done in ExportOptions, I'm not sure yet,
but this is a step in the right direction.)
2006-01-16 20:30:55 +00:00
Glenn Maynard 0d5f75e736 const 2006-01-16 20:30:19 +00:00
Glenn Maynard e581d43cdb Move m_sprDisqualify to ScreenPlayerOptions. 2006-01-16 05:09:11 +00:00
Glenn Maynard 67cb967ad3 overly abstracted 2006-01-16 04:44:29 +00:00
Glenn Maynard 9b2b22ffc0 overly abstracted 2006-01-16 04:35:00 +00:00
Glenn Maynard d612d2de98 consistency 2006-01-16 04:18:31 +00:00
Glenn Maynard 243f5b3d8f cleanup 2006-01-16 04:17:06 +00:00