|
resonance 1.0.1
|
Dialogue that shows one message. More...
#include <metmsgscreen.h>


Public Member Functions | |
| MetMsgScreen (MetRenderer *pRenderer, int nPriority) | |
| Construct the screen. | |
| virtual | ~MetMsgScreen () |
| Delete the two-button list and then the one-button list. | |
| void | SetButtons (const std::vector< HxStr > &buttons) |
| Replace the button labels. | |
| void | Refresh () |
| Rebuild the dialogue for the current name, title, text, and button count. | |
| void | SetName (const HxStr &name) |
| Assign the dialogue name. | |
| void | SetTitle (const HxStr &title) |
| Assign the title line. | |
| void | SetText (const HxStr &text) |
| Assign the message text. | |
| virtual void | DispatchPriv (Message *pMsg) |
| Discard the message's type and forward the message to the owner. | |
| virtual void | EnterAndShow () |
| Clear the showing flag, refresh the dialogue, and show the screen. | |
| virtual void | BeginExit () |
| Start the exit, or schedule it for a dialogue with no buttons. | |
| virtual void | HandleCommand (const MetScreenCommand *pCommand) |
| Act on one navigation command. | |
| virtual void | PlaySlideSound (int nSelector) |
| Play the slide sound when the dialogue has buttons and accepts nSelector. | |
| virtual void | PlayLeaveSound (int) |
| Silence the leave sound. | |
| virtual void | PlayHighSound (int) |
| Silence the high sound. | |
| virtual void | PlayCycleLeftSound (int nSelector) |
| Play the cycle-left sound when the dialogue has two buttons and accepts nSelector. | |
| virtual void | PlayCycleRightSound (int nSelector) |
| Play the cycle-right sound when the dialogue has two buttons and accepts nSelector. | |
| virtual void | UpdateIdle (float flTime) |
| Exit once a scheduled exit time has passed. | |
| virtual void | OnEnterFinished () |
| Mark the dialogue as showing and tell the owner. | |
| virtual void | OnExitFinished () |
| Mark the dialogue as gone and report the choice to the owner. | |
| virtual void | ResolveContainerViews () |
| Build the button lists and resolve the dialogue's text objects and button view. | |
| Public Member Functions inherited from MetScreenMultiSoundBank | |
| MetScreenMultiSoundBank (MetRenderer *pRenderer, int nPriority, const HxStr &name, const HxStr &directory, const HxStr &file) | |
| Construct a screen that uses the multiplayer sound bank. | |
| virtual | ~MetScreenMultiSoundBank () |
| Public Member Functions inherited from MetScreen | |
| MetScreen (MetRenderer *pRenderer, int nPriority, const HxStr &name, const HxStr &directory, const HxStr &file) | |
| Construct a screen and start its container load. | |
| virtual | ~MetScreen () |
| Unregister from the renderer and release the container. | |
| void | DeliverCommand (const MetScreenCommand *pCommand) |
| Play the sound one navigation command calls for and then act on the command. | |
| void | UpdateAnimationFrame (float flTime) |
| Drive the frame of whichever animation is running and run the idle hook when none is. | |
| void | UpdateFrame (float flTime) |
| Advance one screen by one frame. | |
| virtual void | PushNamedScreen (const HxStr &name) |
| Bring one named screen onto the renderer's screen stack. | |
| virtual void | ActivateNamedPanel (const HxStr &name) |
| Make one named screen the renderer's active panel. | |
| virtual void | OnPanelActivated () |
| Act on this screen having become the renderer's active panel. | |
| virtual void | ExitScreenByName (const HxStr &name) |
| Start one named screen's exit animation. | |
| virtual void | OnUnusedHook () |
| Do nothing. | |
| virtual void | OnKeyboardDismissed () |
| Take control back after the keyboard screen has finished. | |
| virtual void | OnDrawPass () |
| Contribute to the renderer's draw pass. | |
| virtual void | OnDestroying () |
| Release what the screen acquired, ahead of the rest of destruction. | |
| virtual int | PollContainerLoad () |
| Advance this screen's container load and resolve its views once the load finishes. | |
| virtual void | OnMsgScreenDismissed (const HxStr &name, int nChoice) |
| Act on the choice the user made in a message dialogue. | |
| virtual void | OnMsgScreenShown (const HxStr &name) |
| Act on a message dialogue becoming visible. | |
| virtual void | SetShowing (int nShowing) |
| Show or hide the view and every drawable the container loaded. | |
| virtual void | BeginContainerLoad (const HxStr &directory, const HxStr &file) |
| Intern a container load under this screen's container name and enqueue it. | |
| virtual void | PlayErrorSound (int nSelector) |
| Play the sound that accompanies a rejected input. | |
| virtual void | UpdateIdleAnimation (float flTime) |
| Advance whatever the screen animates while it is neither entering nor exiting. | |
| virtual void | StartRepeatingSound (float flStartTime, float flInterval, Rnd::Button *pButton, int nCycles) |
| Start alternating one button between its states 2 and 1. | |
| virtual void | UpdateRepeatingSound (float flTime) |
| Advance the alternation that StartRepeatingSound() started. | |
| virtual void | OnRepeatingSoundFinished (Rnd::Button *pButton) |
| Act on the alternation that StartRepeatingSound() started having finished. | |
| virtual void | StartEnterAnimation (float flTime) |
| Rewind the enter animation and record the time it starts at. | |
| virtual void | UpdateEnterAnimation (float flTime) |
| Drive the enter animation and finish it once it passes its end. | |
| virtual void | StartExitAnimation (float flTime) |
| Record the time the exit animation starts at. | |
| virtual void | UpdateExitAnimation (float flTime) |
| Drive the exit animation and hide the screen once it passes its end. | |
| virtual void | Draw () |
| Draw the view. | |
| Public Member Functions inherited from MsgSink | |
| void * | operator new (size_t nSize) |
| Allocate a sink from the tagged heap under the tag "MsgSink". | |
| void | operator delete (void *pBlock) |
| Release a sink to the tagged heap. | |
| virtual | ~MsgSink () |
| virtual void | Dispatch (Message *pMsg) |
| Accept a message. | |
Static Public Member Functions | |
| static MetMsgScreen * | New (MetRenderer *pRenderer, int nPriority) |
| Build the screen on the heap. | |
| static void | Show (const HxStr &name, const HxStr &title, const HxStr &text, int nButtons, const std::vector< HxStr > &buttons, MetScreen *pOwner) |
| Fill the registered message screen and bring it up. | |
| static void | ShowActive (const HxStr &name, const HxStr &title, const HxStr &text, int nButtons, const std::vector< HxStr > &buttons, MetScreen *pOwner) |
| Fill the registered message screen and make it the active panel. | |
| static void | SetOwnerPad (int nPad) |
| Limit the registered message screen to one controller. | |
| Static Public Member Functions inherited from MetScreen | |
| static std::map< HxStr, MetContainerLoad * > & | ContainerLoaderMap () |
| Shared table of container loads, interned under the container name. | |
| static std::map< HxStr, MetScreenEntry > & | ScreenRegistry () |
| Shared table of live screens, interned under the screen registry key. | |
| static MetScreen * | FindScreenByName (const HxStr &name) |
| Resolve one screen by its registry key. | |
| static MetScreen * | FindEndScreen (MetRenderer *pRenderer, const HxStr &name) |
| Resolve one end-of-game screen by its registry key, failing fatally when it is absent. | |
| static void | CreateMainMenuScreens (MetRenderer *pRenderer) |
| Create the main-menu screens. | |
| static void | DestroyAllScreens () |
| Delete every registered screen and release every container loader. | |
| static void | CreateStartupScreens (MetRenderer *pRenderer) |
| Create the four screens the front end needs before its containers have loaded. | |
| static void | CreateFrontEndScreens (MetRenderer *pRenderer) |
| Create every remaining front-end screen, once. | |
| static void | DestroyCategory2Screens () |
| Delete and unregister every screen in category 2. | |
| static void | DestroyCategory1Screens () |
| Delete and unregister every screen in category 1. | |
| static void | DestroyNonDefaultScreens () |
| Delete and unregister every screen outside category 0, then rewind the rndMetLocAndNet zone. | |
| static void | PollContainerLoads () |
| Poll every container load that has not finished, and hide the drawables of each that does. | |
Additional Inherited Members | |
| Public Attributes inherited from MetScreen | |
| Rnd::View * | mView |
| The container's root view. | |
| int | mEnterPending |
| Set when the screen was pushed before its container load finished. | |
| int | mActivatePending |
| Set when the screen was activated as a panel before its container load finished. | |
| float | mRepeatScale |
| Scale on the input auto-repeat interval. | |
| Protected Member Functions inherited from MetScreen | |
| void | ResolveAnimationViews () |
| Resolves the two animation views from the screen name and records the enter animation's end frame. | |
| Protected Attributes inherited from MetScreen | |
| float | mAnimEndFrame |
| float | mEnterStartTime |
| MetRenderer * | mRenderer |
| int | mExitChoice |
| int | mAcceptsCommands |
| Rnd::View * | mEnterAnim |
| std::vector< HxStr > | mHelpKeys |
| int | mViewsUnresolved |
| int | mPlaysCommandSounds |
| int | mShowsLoadedDrawables |
Dialogue that shows one message.
Its RTTI descriptor is at 0x008f0100. It has MetScreenMultiSoundBank as its one public non-virtual base at offset 0.
The 39-entry primary vtable is at 0x007fe668, the same length as the MetScreenMultiSoundBank table, so the class declares no virtual of its own.
The constructor at 0x002ec290 takes only the renderer and the load priority, and supplies dlg for the screen name, metagame/Shared for the directory, and dialogue for the container. It zeroes the two button lists, default-constructs the label vector and the three strings, and sets mChoice and mOwnerPad to -1 and mExitTime and mShowing to zero.
It and MetLogoScreen are the only two classes that override slot 3, MsgSink::DispatchPriv, with a body.
The object is 0xe0 bytes, which the factory at 0x002f02c0 fixes by requesting exactly that many with the tag MsgSink.
Apart from the type function and the destructor, the slots that differ from the MetScreenMultiSoundBank table are 3 0x002f0640, 5 0x002f04d0, 9 0x002f0588, 19 0x002ecba0, 20 0x002f0410, 21 0x002f02b8, 22 0x002f02b0, 23 0x002f0450, 24 0x002f0490, 26 0x002f0540, 33 0x002f0500, 36 0x002f05d0, 38 0x002ec6f8.
| MetMsgScreen::MetMsgScreen | ( | MetRenderer * | pRenderer, |
| int | nPriority ) |
Construct the screen.
| pRenderer | The front-end renderer this screen registers on. |
| nPriority | The load priority. |
|
virtual |
Delete the two-button list and then the one-button list.
|
static |
Build the screen on the heap.
| pRenderer | The front-end renderer the screen registers on. |
| nPriority | The load priority. |
|
static |
Fill the registered message screen and bring it up.
The screen registered as MetMsgScreen receives the dialogue name, the title, the text, the button count, and the owner, and mOwnerPad becomes -1. A non-empty button list replaces the labels through SetButtons(). A screen already showing is refreshed in place. Otherwise MetSonyScreen pushes the message screen and makes it the active panel. Neither screen lookup is checked for null. The title is inferred.
| name | The dialogue name, which the owner's OnMsgScreenShown() and OnMsgScreenDismissed() receive back. |
| title | The title line. |
| text | The message text. |
| nButtons | The number of buttons, which picks the one-button or two-button layout. |
| buttons | The button labels, or an empty list to retain the current labels. |
| pOwner | The screen the dialogue reports to. |
|
static |
Fill the registered message screen and make it the active panel.
The same as Show(), except that a screen already showing is also made the active panel again after the refresh. The title is inferred.
| name | The dialogue name. |
| title | The title line. |
| text | The message text. |
| nButtons | The number of buttons. |
| buttons | The button labels, or an empty list to retain the current labels. |
| pOwner | The screen the dialogue reports to. |
|
static |
Limit the registered message screen to one controller.
Writes mOwnerPad of the screen registered as MetMsgScreen, which Show() and ShowActive() reset to -1. Every caller passes MetSaveRemix::mOwnerPad, the index of the controller that started the save. The result of the cast is not checked. The title is inferred.
| nPad | The controller index. |
| void MetMsgScreen::SetButtons | ( | const std::vector< HxStr > & | buttons | ) |
Replace the button labels.
An empty list does nothing. The title is inferred.
| buttons | The new labels. |
| void MetMsgScreen::Refresh | ( | ) |
Rebuild the dialogue for the current name, title, text, and button count.
Hangs dlg_<n>but.view under mButtonView, writes the title and the text, sizes the frame by hanging dlg_small.view, dlg_medium.view, or dlg_large.view under dlg_group.view for fewer than three, fewer than six, or more text lines, labels the buttons of the list the count selects and selects the first, and sets mChoice to -1. The title is inferred.
|
inline |
Assign the dialogue name.
Inline. Show() and ShowActive() expand it, and 0x002f0230 is its uncalled out-of-line copy.
| name | The new name. |
|
inline |
Assign the title line.
Inline. 0x002f0250 is its uncalled out-of-line copy.
| title | The new title. |
|
inline |
Assign the message text.
Inline. 0x002f0270 is its uncalled out-of-line copy.
| text | The new text. |
|
virtual |
Discard the message's type and forward the message to the owner.
Slot 3. The type is read through Message::Type() and not used.
| pMsg | The message. |
Reimplemented from MetScreen.
|
virtual |
Clear the showing flag, refresh the dialogue, and show the screen.
Slot 5.
Reimplemented from MetScreen.
|
virtual |
Start the exit, or schedule it for a dialogue with no buttons.
Slot 9.
A dialogue with no buttons records an exit time 480 units after the renderer's current time, which slot 26 then waits for. Any other dialogue exits at once through MetScreen::BeginExit().
Reimplemented from MetScreen.
|
virtual |
Act on one navigation command.
Slot 19.
A dialogue with no buttons ignores every command, and so does a command from a controller other than mOwnerPad when that is not -1. Left and right move the selection through the button list's slots 2 and 3, and select records the selected index as mChoice, clears the active panel, and exits.
| pCommand | The command. |
Reimplemented from MetScreen.
|
virtual |
Play the slide sound when the dialogue has buttons and accepts nSelector.
Slot 20.
| nSelector | The controller index the sound is for. |
Reimplemented from MetScreenMultiSoundBank.
|
inlinevirtual |
Silence the leave sound.
Slot 21, a two-instruction stub.
Reimplemented from MetScreenMultiSoundBank.
|
inlinevirtual |
Silence the high sound.
Slot 22, a two-instruction stub.
Reimplemented from MetScreenMultiSoundBank.
|
virtual |
Play the cycle-left sound when the dialogue has two buttons and accepts nSelector.
Slot 23.
| nSelector | The controller index the sound is for. |
Reimplemented from MetScreenMultiSoundBank.
|
virtual |
Play the cycle-right sound when the dialogue has two buttons and accepts nSelector.
Slot 24.
| nSelector | The controller index the sound is for. |
Reimplemented from MetScreenMultiSoundBank.
|
virtual |
Exit once a scheduled exit time has passed.
Slot 26.
A zero mExitTime does nothing. Otherwise a time past it clears mExitTime and exits through MetScreen::BeginExit() directly.
| flTime | The renderer's current time. |
Reimplemented from MetScreen.
|
virtual |
Mark the dialogue as showing and tell the owner.
Slot 33.
Reimplemented from MetScreen.
|
virtual |
Mark the dialogue as gone and report the choice to the owner.
Slot 36.
The owner's OnMsgScreenDismissed() receives mName and mChoice.
Reimplemented from MetScreen.
|
virtual |
Build the button lists and resolve the dialogue's text objects and button view.
Slot 38.
The two-button list holds dlg2_01.but and dlg2_02.but, and the one-button list holds dlg1_01.but, each with an empty label. dlg_warning.txt receives the title, dlg_message.txt the message, and dlg_buts.view the button layout.
Reimplemented from MetScreen.