Commit Graph

188 Commits

Author SHA1 Message Date
Steve Checkoway 4517499f0f lroundf -> lrintf. 2007-01-03 05:05:28 +00:00
Steve Checkoway eb0b26cd82 Float to int is slow on ppc. It requires a store, a big stall, and then a load. It's even worse on a G5 if the compiler is dumb (and let's face it, I'm using gcc here...). Just use lroundf when we want an int. It will certainly be no slower. 2007-01-02 23:36:44 +00:00
Glenn Maynard a5f5fa0b78 HandleMessage( Message ) 2006-11-13 23:11:25 +00:00
Glenn Maynard ec030b56ba parent 2006-10-14 04:55:36 +00:00
Glenn Maynard 9b94f66bc0 fix leak 2006-09-20 22:09:44 +00:00
Glenn Maynard 685e2e7412 Split part of OptionRow::GetThemedItemText into OptionRowHandler::GetThemedItemText.
(OptionRowHandler handles low-level option sets, including row and option
titles; OptionRow handles ScreenOption-specific parts, like "NextRow".)
2006-09-01 04:54:15 +00:00
Glenn Maynard 8983d620c6 PrepareItemText -> GetThemedItemText 2006-09-01 04:44:30 +00:00
Glenn Maynard e6d1712c27 move OptionRowDefinition into OptionRowHandler
(want OptionRowHandler to be easily usable without OptionRow; ORH is
really part of ORD, not OptionRow)
2006-09-01 04:37:39 +00:00
Glenn Maynard 3f468cb30a move OptionTitle into OptionRowHandler 2006-09-01 04:29:24 +00:00
Chris Danford a31fd85b1d fix bullet DrawOrder doesn't take effect 2006-07-02 06:00:48 +00:00
Chris Danford 77e1f83a8c cleanup for debugging 2006-03-30 04:04:01 +00:00
Glenn Maynard bce305a0bf zoom long lines to fit if reasonable 2006-03-06 04:29:33 +00:00
Glenn Maynard 892fa90a59 change logic from "extends beyond end" to "width > max width" (preparatory) (fixup) 2006-03-06 04:23:08 +00:00
Glenn Maynard 5dea328ec6 change logic from "extends beyond end" to "width > max width" (preparatory) 2006-03-06 04:22:24 +00:00
Glenn Maynard 78848a0ca1 simplify 2006-02-27 06:08:29 +00:00
Glenn Maynard e54eca031c ugly: apply just the alpha to m_Underline. This is what used to be
done in UpdateEnabledDisabled, but we don't want to update this tweening
in two places; they collide and cancel each other.
2006-02-27 06:02:54 +00:00
Glenn Maynard bbf668ab97 remove unused 2006-02-27 05:54:21 +00:00
Glenn Maynard 977689ac83 Annoying: allow OptionRowHandlers to specify what they reloaded, and
don't re-create things if we've only changed what's enabled.  Use this
with the Lua interface, by making EnabledForPlayers a function returning
a table instead of a table.
2006-02-27 05:43:39 +00:00
Glenn Maynard 9488915ff0 fix initial underline width 2006-02-27 03:54:03 +00:00
Glenn Maynard 966da17301 simplify 2006-02-27 03:28:15 +00:00
Glenn Maynard f00e70e5d4 Collateral fix: SetBaseAlpha is propagated by ActorFrame. 2006-02-27 03:09:00 +00:00
Glenn Maynard c2243b0b0e ScreenOptions fading is a headache. We move rows up and down, and
fade them in and out at the same time; we do this by tweening the whole
row up and down, and fading each part of the row.  This is a big pain,
because we're also tweening each part for other reasons, and these
tweens tend to collide.  The whole thing is brittle and complicated,
and it's making fixing other problems a pain.

Try it a little differently: to fade the whole row, tween the alpha
along with the position of the whole row.  Then, manually propagate
the changing alpha value to each part, using BaseAlpha, so it doesn't
affect other tweens.

This also helps segregate the fading: with the exception of the actual
propagation, OptionRow doesn't have to know anything about it.  Before,
it had to constantly be careful that any tweening operations didn't
collide with the alpha tweening; often, one or the other would be cancelled,
resulting in either the change not happening at all, or snapping instead
of fading.

(This is still a hack, but it's more manageable; it puts control of high-level
tweening entirely in SOptionsMenu's control, instead of half in OptionRow.)
2006-02-27 03:04:56 +00:00
Glenn Maynard d5f650dce5 fix hidden underlines for disabled players (missed commit) 2006-02-26 21:38:44 +00:00
Glenn Maynard b73b9e66f0 cleanup 2006-02-26 21:35:18 +00:00
Chris Danford 06b19345a9 fix NextRow markers accumulate when a row is reloaded 2006-02-22 18:12:45 +00:00
Chris Danford 95c88765a0 fix options rows tween from top of screen instead of initially being in the row's position 2006-02-10 04:33:54 +00:00
Glenn Maynard 2e95edf9da PositionIcons(pn) 2006-02-03 09:31:51 +00:00
Glenn Maynard f96c1296d1 simplify 2006-01-30 08:08:04 +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 e89b93ba21 fix 0 tween length causing editor options menus to flicker
at y = 0 for one frame
2006-01-30 08:01:54 +00:00
Chris Danford 370d11ee19 theme -> localize 2006-01-29 22:17:54 +00:00
Chris Danford 7f821e8cfc CString -> RString 2006-01-22 01:00:06 +00:00
Glenn Maynard 235e9d622b use GetChoiceInRowWithFocus instead of m_iChoiceInRowWithFocus directly 2006-01-19 07:47:31 +00:00
Glenn Maynard 4e7e062d4e when LAYOUT_SHOW_ONE_IN_ROW, m_Underline will only have one entry anyway 2006-01-19 07:43:47 +00:00
Glenn Maynard 91a52982e4 simplify 2006-01-19 07:32:42 +00:00
Glenn Maynard b52e776f36 remove def param; use m_Def 2006-01-19 03:43:29 +00:00
Glenn Maynard 55958c952d err 2006-01-19 03:21:57 +00:00
Chris Danford 4b5d9a981e tab cleanup 2006-01-19 03:02:48 +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 7e005dfbb9 simplify 2006-01-19 01:27:02 +00:00
Glenn Maynard e87e8d77e4 update m_textTitle when choices change, eg. on load and reload--don't need to do it on import 2006-01-19 01:25:09 +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 10106ba600 remove redundant SetChoiceInRowWithFocus call 2006-01-19 01:17:07 +00:00
Glenn Maynard 054cfa98d8 use pn 2006-01-19 01:15:12 +00:00
Glenn Maynard 41f8a34c9f fewer code paths to set m_iChoiceInRowWithFocus 2006-01-19 01:14:59 +00:00
Glenn Maynard 8bcf6e8b12 fewer code paths to set m_iChoiceInRowWithFocus 2006-01-19 01:14:31 +00:00
Glenn Maynard 74bf033fe7 comment 2006-01-19 01:11:23 +00:00
Glenn Maynard b158147319 pull pn loop out of UpdateText 2006-01-19 01:01:13 +00:00
Glenn Maynard 24cd1d3242 pull pn loop out of UpdateText 2006-01-19 01:00:13 +00:00
Glenn Maynard 0b1ca16baf underline position depends on the focus (in LAYOUT_SHOW_ONE_IN_ROW), so set it after ResetFocusFromSelection 2006-01-19 00:33:48 +00:00