Commit Graph

37 Commits

Author SHA1 Message Date
Steve Checkoway 944a913790 PlayerNumber -> IEP. 2006-09-15 01:47:24 +00:00
Glenn Maynard bd2246f8ae ScreenWithMenuElementsSimple 2006-06-24 18:06:05 +00:00
Glenn Maynard 42b53d9334 add GenericTweenOff 2006-06-24 18:03:16 +00:00
Glenn Maynard 5b9bb999c0 cleanup 2006-03-13 23:10:22 +00:00
Glenn Maynard d42559a5cd I'm still slowly wrangling out just how Cancel should work.
Screens typically have two general simple models of transitioning;
either the menu elements transition out, or we drop a fade on top
of everything.  The former leaves the background in place, the
latter doesn't.  Transitioning is usually used when we're going
to a screen with the same background; fading is used otherwise.
(There are combinations of these, and more complex modes, but
these are the basics.)

Traditionally, cancelling has always wiped.  It usually goes back
to the title menu, which rarely has the same background; and it's
an uncommon path, so it's not worth setting up a full transition
for.  However, for cases where we don't go all the way back, this
is incorrect; it looks very strange to press escape in the options
submenu or the player options menu, and to have it wipe the screen.

I've dealt with this in the past by setting up a "cancel" transition
that simply runs "Off" and waits.  That works, but it's a pain, since
the wait duration needs to line up with the length of the transition.
Instead, add a transition mode "CancelTransitionsOut" that causes
Cancel to run the Out transition directly.  (This also plays the
start sound, due to a discrepency right now: with Out, it's the
screen's job to play the sound, but with Cancel, it's the transition's
job.  Figure that out later ...)

Ultimately, we should be able to have full CancelCommand transitions
if we want, but the SWME TweenOnScreen/TweenOffScreen code transition
needs to be completed first (replacing individual transitions with a
single "On"/"Off" command).
2006-02-24 03:01:28 +00:00
Chris Danford 7f821e8cfc CString -> RString 2006-01-22 01:00:06 +00:00
Glenn Maynard 65e58afda2 ctor transition (stage 3 ...) 2006-01-15 20:38:51 +00:00
Glenn Maynard 470c909ec6 Transition away from Screen(sName). 2006-01-15 18:54:03 +00:00
Thad Ward 7a2e51e7ea include cleanups. 2005-10-30 21:39:49 +00:00
Glenn Maynard dfc67cd84d ScreenWithMenuElements::StartTransitioning -> StartTransitioningScreen, to make searching
for it easier (vs. Transition::StartTransitioning).  (Trying to simplify tweening; this
may go back later.)
2005-10-13 22:17:13 +00:00
Glenn Maynard dae80d0805 add GenericTweenOn() 2005-09-22 01:27:00 +00:00
Glenn Maynard 701aff5ee8 avoid GetPathS during BeginScreen 2005-09-22 01:17:35 +00:00
Glenn Maynard 239121556c virtual 2005-09-10 20:02:56 +00:00
Glenn Maynard 61726858bb one stage graphic 2005-09-08 20:33:28 +00:00
Chris Danford f25852aa90 don't construct MenuTimer and MemoryCardStatusIcon if they're not used
cache TIMER_SECONDS
2005-09-07 22:25:10 +00:00
Glenn Maynard 253669547f simplify 2005-09-07 20:47:33 +00:00
Glenn Maynard 16b1fafa83 fix command 2005-09-07 05:31:35 +00:00
Glenn Maynard a4841c349b ScreenWithMenuElements::BeginScreen: start tweening, and also reset
any previous transitions.
2005-07-15 01:18:42 +00:00
Glenn Maynard 0158fa774b virtual TweenOffScreen
add TweenOnScreen.  This only sends OnCommands, not XY, since it should be
the inverse of TweenOffScreen (and eventually, maybe screens can simply
play On/Off recursively).
2005-07-14 22:36:50 +00:00
Glenn Maynard 4a416d34d0 Screen, ScreenWithMenuElements bindings 2005-07-12 05:44:54 +00:00
Chris Danford 2870644190 move sprStage into ScreenWithMenu elemnts 2005-05-06 12:29:38 +00:00
Glenn Maynard cb0e9613a9 virtual 2005-04-26 06:18:17 +00:00
Chris Danford 228ca9f166 reload SSM help text on sort changed
clean up SortOrder names
2005-04-15 07:18:40 +00:00
Chris Danford 5f2f3ab9c8 fix duplicate ScreenGameplay overlays, broken DancingState transitions 2005-04-02 02:45:17 +00:00
Glenn Maynard 59b59214e9 fix attract music logic 2005-03-22 22:53:39 +00:00
Chris Danford 348cf4d15c look at PLAY_MUSIC when calculating whether or not to stop the music 2005-03-21 01:14:30 +00:00
Chris Danford 48e6cb1a69 rename back -> cancel because "back" conflicts with "background" 2005-03-20 06:14:41 +00:00
Glenn Maynard b51b0cfb4c Use Init() for all screens, so we can set state before the base class
members are loaded--they'll see resets, score finalization, etc.  It
also results in smaller code, due to a g++ bug that causes constructors
to be emitted several times.
2005-02-23 06:29:05 +00:00
Glenn Maynard 8a04a3eeeb Add ScreenWithMenuElements::FirstUpdateCommand, a Lua expression
that gets called on first update.  Note the difference between
using ThemeMetric<LuaExpression> and ThemeMetric<ActorCommands>:
with ActorCommands, you get the special, backwards-compatible
parsing; with LuaExpression, only a regular expression is parsed.

You can still only (cleanly) call one function, since "return"
is prepended: if you say "f() g()", it'll try to run "return f() g()".
I tried having a separate type for "expression" and "script", but
it seems confusing to have some metrics parsed as scripts and
some as expressions, allowing multiple functions in only specific
metrics.  If you want to do that much, it's cleaner to create
a function and call it, anyway.  If you just want to add diagnostics
quickly, you can say "Foo=(function() x() y() z() end)()".  (I might
revisit this later.)
2005-02-17 06:13:23 +00:00
Glenn Maynard a6ccaff834 Add a separate underlay layer. This should be used for adding actors
instead of modifying background, since changing the background per-
screen breaks the "persist background" logic in ScreenManager.
2005-02-12 20:31:15 +00:00
Glenn Maynard c9091a1214 Don't play "On" automatically for non-generic BGAnimations; play it
explicitly, like we do with all other objects.
2005-01-15 19:21:09 +00:00
Chris Danford 1a5d766b01 add overlay 2005-01-05 04:32:12 +00:00
Chris Danford b6d711b3c1 Remove backgrounds on screens. Have one shared background that persists across screens. 2004-12-09 08:16:18 +00:00
Glenn Maynard e4d124dd91 license update 2004-06-08 05:22:33 +00:00
Glenn Maynard 282e502e6d fix ScreenSelectCharacter timer 2004-05-08 06:42:23 +00:00
Jason Felds d3f461220a No more newline warning. 2004-05-02 01:36:28 +00:00
Chris Danford df5cd5e813 move MenuElements into a base ScreenWithMenuElements so that metrics can be overridden using the Fallback mechanism 2004-05-01 23:19:33 +00:00