NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
dYesNoWindow_c Class Reference

#include <d_profileNP/bases/d_yes_no_window.hpp>

Inheritance diagram for dYesNoWindow_c:
[legend]

Description

Displays a confirmation prompt.

This appears, for example, when the game asks the player if their progress should be saved.

Definition at line 9 of file d_yes_no_window.hpp.

Public Types

enum  WINDOW_TYPE_e {
  SAVE_DATA_CREATED ,
  SAVE ,
  SAVED ,
  EXIT_FREE_MODE ,
  WATCH_UNLOCKED_HINT_MOVIE ,
  SKIP_COURSE ,
  WATCH_HINT_MOVIE ,
  GOT_ALL_STAR_COINS ,
  GOT_ALL_STAR_COINS_MENTION_W9 ,
  BOWSERJR_SINGLEPLAYER ,
  RETURN_TITLE ,
  BOWSERJR_MULTIPLAYER ,
  RETURN_TO_MAP ,
  BACK_TO_COURSE_SELECTION ,
  GOT_ALL_STAR_COINS_ALL_WORLDS ,
  QUICK_SAVE ,
  QUICK_SAVED ,
  ALL_TOAD_HOUSES_RETURNED ,
  ITEM_INFO ,
  COURSE_CLEAR_WITH_SUPER_GUIDE ,
  SKIP_COURSE_CONFIRM ,
  COMPLETED_EVERYTHING ,
  PROGRESS_AUTOSAVE_AFTER_W9_UNLOCK ,
  BLOCK_TRANSFORMATION ,
  BLOCK_TRANSFORMATION_REVERSE ,
  EXIT_COIN_BATTLE ,
  RETURN_TO_MAP2 ,
  PEACH_CASTLE_HINT1 ,
  PEACH_CASTLE_HINT2 ,
  NUM_WINDOW_TYPES
}
 The prompt type. More...
 
enum  CURSOR_POS_e {
  POS_YES ,
  POS_NO ,
  POS_OK
}
 The possible cursor positions. More...
 
enum  SOUND_e {
  SOUND_CLOSE ,
  SOUND_WAIT ,
  SOUND_CURSOR_MOVE ,
  SOUND_OPEN_ANIME
}
 The sound effect types used by the window. More...
 
enum  ANIMS_e {
  ANIM_IN_WINDOW ,
  ANIM_IN_QUICK_SAVE ,
  ANIM_LOOP_WINDOW ,
  ANIM_LOOP_QUICK_SAVE ,
  ANIM_IN_YES ,
  ANIM_IN_NO ,
  ANIM_IN_OK ,
  ANIM_ON_YES ,
  ANIM_ON_NO ,
  ANIM_ON_OK ,
  ANIM_IDLE_YES ,
  ANIM_IDLE_NO ,
  ANIM_IDLE_OK ,
  ANIM_HIT_YES ,
  ANIM_HIT_NO ,
  ANIM_HIT_OK ,
  ANIM_HIT_QUICK_SAVE ,
  ANIM_OFF_YES ,
  ANIM_OFF_NO ,
  ANIM_OFF_OK ,
  ANIM_IN_BG ,
  ANIM_OUT_BG ,
  ANIM_OUT_WINDOW
}
 The animations used for the window. More...
 
- Public Types inherited from fBase_c
enum  LIFECYCLE_e {
  CREATING ,
  ACTIVE ,
  DELETING
}
 The possible lifecycle states. More...
 
enum  GROUP_TYPE_e {
  OTHER ,
  SCENE ,
  ACTOR
}
 The possible group types. More...
 
enum  MAIN_STATE_e {
  CANCELED ,
  ERROR ,
  SUCCESS ,
  WAITING
}
 The possible operation results. More...
 
enum  PACK_RESULT_e {
  NOT_READY ,
  SUCCEEDED ,
  FAILED
}
 The possible operation step results. More...
 
enum  PROC_DISABLE_e {
  ROOT_DISABLE_EXECUTE = 1 ,
  DISABLE_EXECUTE = 2 ,
  ROOT_DISABLE_DRAW = 4 ,
  DISABLE_DRAW = 8
}
 Controls if the execute and draw operations should be skipped. More...
 

Public Member Functions

virtual int create ()
 do method for the create operation.
 
virtual int execute ()
 do method for the execute operation.
 
virtual int draw ()
 do method for the draw operation.
 
virtual int doDelete ()
 do method for the delete operation.
 
- Public Member Functions inherited from dBase_c
virtual int preCreate ()
 See fBase_c::preCreate.
 
virtual void postCreate (fBase_c::MAIN_STATE_e status)
 See fBase_c::postCreate.
 
virtual int preDelete ()
 See fBase_c::preDelete.
 
virtual void postDelete (fBase_c::MAIN_STATE_e status)
 See fBase_c::postDelete.
 
virtual int preExecute ()
 Code to be executed before execute.
 
virtual void postExecute (fBase_c::MAIN_STATE_e status)
 See fBase_c::postExecute.
 
virtual int preDraw ()
 Code to be executed before draw.
 
virtual void postDraw (fBase_c::MAIN_STATE_e status)
 See fBase_c::postDraw.
 
virtual const char * getKindString () const
 Gets a string describing the kind of this base.
 
- Public Member Functions inherited from fBase_c
 fBase_c ()
 Constructs a new base.
 
void deleteRequest ()
 Requests deletion of the base.
 
fBase_cgetConnectParent () const
 Gets the base's parent.
 
fBase_cgetConnectChild () const
 Gets the base's first child.
 
fBase_cgetConnectBrNext () const
 Gets the base's next sibling.
 
bool checkChildProcessCreateState () const
 Checks if the base has at least one child in the CREATING state.
 
- Public Member Functions inherited from cOwnerSetMg_c
 cOwnerSetMg_c ()
 Constructs a new set container.
 
 ~cOwnerSetMg_c ()
 Destroys the set.
 
void add (cOwnerSetNd_c *nd, void *owner)
 Adds a node to the set.
 
void remove (cOwnerSetNd_c *nd, void *owner)
 Removes a node from the set.
 

Public Attributes

int mStarCoinsRequired
 The number of star coins required to unlock a hint movie.
 
bool mHitButton
 Whether a button has been pressed.
 
bool mIsAnimating
 Whether an animation is currently playing.
 
bool mKeepOpen
 Whether the window should stay open after a button has been pressed.
 
bool mCancel
 Whether the window has been cancelled (and closed).
 
bool mHideBG
 Whether to hide the translucent background that fills the screen.
 
- Public Attributes inherited from fBase_c
fBaseID_e mUniqueID
 The base's unique identifier.
 
u32 mParam
 A bitfield that configures the base's behaviour. [Represents nybbles 5 to 12 of Reggie's spritedata].
 
ProfileName mProfName
 The base's profile name.
 

Private Member Functions

void populateLayout ()
 Fills out the window content according to the settings.
 
 STATE_FUNC_DECLARE (dYesNoWindow_c, InitWait)
 Initial state. Switches to OpenAnimeStartWait immediately.
 
 STATE_FUNC_DECLARE (dYesNoWindow_c, OpenAnimeEndWait)
 Waiting for the window to finish the opening animation.
 
 STATE_FUNC_DECLARE (dYesNoWindow_c, ButtonOnStageAnimeEndWait)
 Plays the button appearing animation and waits for it to finish.
 
 STATE_FUNC_DECLARE (dYesNoWindow_c, ButtonChangeAnimeEndWait)
 Playing the button change animations.
 
 STATE_FUNC_DECLARE (dYesNoWindow_c, SelectWait)
 Waiting for either a button change or button hit to occur.
 
 STATE_FUNC_DECLARE (dYesNoWindow_c, HitAnimeEndWait)
 Waiting for the button to finish the hit animation.
 
 STATE_FUNC_DECLARE (dYesNoWindow_c, ClouseAnimeEndWait)
 Waiting for the window to finish the closing animation.
 
 STATE_FUNC_DECLARE (dYesNoWindow_c, HitAnimeAfterWait)
 Waiting in an infinite loop after the button was pressed.
 
nw4r::lyt::PicturegetPicturePane (int n)
 Gets the n-th picture pane.
 

Private Attributes

LytBase_c mLayout
 The layout for the window.
 
sFStateMgr_c< dYesNoWindow_c, sStateMethodUsr_FI_cmStateMgr
 The state manager for the window.
 
nw4r::lyt::PanempRootPane
 The root pane of the window.
 
nw4r::lyt::PictureP_yesBase_00
 
nw4r::lyt::PictureP_noBase_00
 
nw4r::lyt::PictureP_centerBase_00
 
LytTextBox_cT_questionS_00
 
LytTextBox_cT_question_00
 
LytTextBox_cT_otehonTextS_01
 
LytTextBox_cT_otehonText_01
 
LytTextBox_cT_needCoinX_00
 
LytTextBox_cT_needCoin_00
 
LytTextBox_cT_yes_00
 
LytTextBox_cT_yes_01
 
LytTextBox_cT_no_00
 
LytTextBox_cT_no_01
 
nw4r::lyt::PaneN_otehonText_00
 
nw4r::lyt::PaneN_saveIcon_00
 
int mCursorPos
 The current cursor position.
 
int mPrevCursorPos
 The previous cursor position.
 
WINDOW_TYPE_e mType
 The type of the window.
 
bool mHasLoadedLayout
 Whether the layout has been loaded.
 
bool mIsActive
 Whether the window is currently open.
 

Additional Inherited Members

- Static Public Member Functions inherited from dBase_c
static dBase_csearchBaseByProfName (ProfileName profile, const dBase_c *parent)
 Searches for a base with a given profile name, optionally under a given parent.
 
static void initLoader ()
 [Unknown purpose. Callbacks do nothing and don't seem to ever be called].
 
static dBase_ccreateBase (ProfileName profName, dBase_c *parent, unsigned long param, u8 groupType)
 See fBase_c::createChild.
 
static dBase_ccreateRoot (ProfileName profName, unsigned long param, u8 groupType)
 See fBase_c::createRoot.
 
- Static Public Member Functions inherited from fBase_c
static void * operator new (size_t)
 new operator override for all bases.
 
static void operator delete (void *)
 delete operator override for all bases.
 
static fBase_ccreateChild (ProfileName profName, fBase_c *parent, unsigned long param, u8 groupType)
 Creates a child base under the given parent.
 
static fBase_ccreateRoot (ProfileName profName, unsigned long param, u8 groupType)
 Creates a root base.
 
- Protected Member Functions inherited from fBase_c
bool isProcControlFlag (u8 flag) const
 Checks if a flag is set in mProcControl.
 
void setProcControlFlag (u8 flag)
 Sets a flag in mProcControl.
 
void clearProcControlFlag (u8 flag)
 Clears a flag in mProcControl.
 
virtual int create ()
 do method for the create operation.
 
virtual int preCreate ()
 pre method for the create operation.
 
virtual void postCreate (MAIN_STATE_e state)
 post method for the create operation.
 
virtual int doDelete ()
 do method for the delete operation.
 
virtual int preDelete ()
 pre method for the delete operation.
 
virtual void postDelete (MAIN_STATE_e state)
 post method for the delete operation.
 
virtual int execute ()
 do method for the execute operation.
 
virtual int preExecute ()
 pre method for the execute operation.
 
virtual void postExecute (MAIN_STATE_e state)
 post method for the execute operation.
 
virtual int draw ()
 do method for the draw operation.
 
virtual int preDraw ()
 pre method for the draw operation.
 
virtual void postDraw (MAIN_STATE_e state)
 post method for the draw operation.
 
virtual void deleteReady ()
 Informs the base that it's about to be deleted.
 
virtual bool entryFrmHeap (unsigned long size, EGG::Heap *parentHeap)
 [Unused]. Creates a heap of the given size for the base.
 
virtual bool entryFrmHeapNonAdjust (unsigned long size, EGG::Heap *parentHeap)
 [Unused]. Creates a heap of the given size for the base.
 
virtual bool createHeap ()
 [Unused]. [Does nothing].
 
virtual ~fBase_c ()
 Destroys the base.
 
- Protected Attributes inherited from fBase_c
u8 mLifecycleState
 The base's lifecycle state. Value is a LIFECYCLE_e.
 
bool mDeleteRequested
 If deletion of the base was requested, but the corresponding operation has not been scheduled yet.
 
bool mDeferExecute
 If the create operation was completed, but scheduling the execute and draw operations isn't possible at this time.
 
bool mDeferRetryCreate
 If the create operation has not been completed, and rescheduling it isn't possible at this time.
 
u8 mGroupType
 The base's group type. Value is a GROUP_TYPE_e.
 
u8 mProcControl
 The operations to be skipped. Value is a PROC_DISABLE_e.
 
fManager_c mMng
 The base's process manager.
 
fBaHelper_cmpUnusedHelper
 [Unused]. See Unused Content.
 
fLiMgBa_c mUnusedList
 [Unused]. See Unused Content.
 
EGG::FrmHeapmpHeap
 [Unused]. The base's dedicated heap.
 
- Static Protected Attributes inherited from fBase_c
static int(* sLoadAsyncCallback )()
 [Unused]. See Unused Content.
 
static void(* sUnloadCallback )()
 [Unused]. See Unused Content.
 

Member Enumeration Documentation

◆ WINDOW_TYPE_e

The prompt type.

Definition at line 12 of file d_yes_no_window.hpp.

◆ CURSOR_POS_e

The possible cursor positions.

Definition at line 46 of file d_yes_no_window.hpp.

◆ SOUND_e

The sound effect types used by the window.

Definition at line 53 of file d_yes_no_window.hpp.

◆ ANIMS_e

The animations used for the window.

Definition at line 61 of file d_yes_no_window.hpp.

Constructor & Destructor Documentation

◆ dYesNoWindow_c()

dYesNoWindow_c::dYesNoWindow_c ( )

Definition at line 26 of file d_yes_no_window.cpp.

◆ ~dYesNoWindow_c()

dYesNoWindow_c::~dYesNoWindow_c ( )
virtual

Definition at line 30 of file d_yes_no_window.cpp.

Member Function Documentation

◆ create()

int dYesNoWindow_c::create ( )
virtual

do method for the create operation.

Returns
A PACK_RESULT_e value.

Reimplemented from fBase_c.

Definition at line 32 of file d_yes_no_window.cpp.

◆ execute()

int dYesNoWindow_c::execute ( )
virtual

do method for the execute operation.

Returns
A PACK_RESULT_e value.

Reimplemented from fBase_c.

Definition at line 138 of file d_yes_no_window.cpp.

◆ draw()

int dYesNoWindow_c::draw ( )
virtual

do method for the draw operation.

Returns
A PACK_RESULT_e value.

Reimplemented from fBase_c.

Definition at line 149 of file d_yes_no_window.cpp.

◆ doDelete()

int dYesNoWindow_c::doDelete ( )
virtual

do method for the delete operation.

This method was renamed due to conflict with the delete C++ keyword.

Returns
A PACK_RESULT_e value.

Reimplemented from fBase_c.

Definition at line 158 of file d_yes_no_window.cpp.

◆ populateLayout()

void dYesNoWindow_c::populateLayout ( )
private

Fills out the window content according to the settings.

This includes:

  • Filling out the text boxes
  • Setting the visibility of the buttons
  • Showing the quick save balloon if necessary

Definition at line 266 of file d_yes_no_window.cpp.

◆ STATE_FUNC_DECLARE() [1/8]

dYesNoWindow_c::STATE_FUNC_DECLARE ( dYesNoWindow_c  ,
InitWait   
)
private

Initial state. Switches to OpenAnimeStartWait immediately.

◆ STATE_FUNC_DECLARE() [2/8]

dYesNoWindow_c::STATE_FUNC_DECLARE ( dYesNoWindow_c  ,
OpenAnimeEndWait   
)
private

Waiting for the window to finish the opening animation.

◆ STATE_FUNC_DECLARE() [3/8]

dYesNoWindow_c::STATE_FUNC_DECLARE ( dYesNoWindow_c  ,
ButtonOnStageAnimeEndWait   
)
private

Plays the button appearing animation and waits for it to finish.

◆ STATE_FUNC_DECLARE() [4/8]

dYesNoWindow_c::STATE_FUNC_DECLARE ( dYesNoWindow_c  ,
ButtonChangeAnimeEndWait   
)
private

Playing the button change animations.

◆ STATE_FUNC_DECLARE() [5/8]

dYesNoWindow_c::STATE_FUNC_DECLARE ( dYesNoWindow_c  ,
SelectWait   
)
private

Waiting for either a button change or button hit to occur.

◆ STATE_FUNC_DECLARE() [6/8]

dYesNoWindow_c::STATE_FUNC_DECLARE ( dYesNoWindow_c  ,
HitAnimeEndWait   
)
private

Waiting for the button to finish the hit animation.

◆ STATE_FUNC_DECLARE() [7/8]

dYesNoWindow_c::STATE_FUNC_DECLARE ( dYesNoWindow_c  ,
ClouseAnimeEndWait   
)
private

Waiting for the window to finish the closing animation.

◆ STATE_FUNC_DECLARE() [8/8]

dYesNoWindow_c::STATE_FUNC_DECLARE ( dYesNoWindow_c  ,
HitAnimeAfterWait   
)
private

Waiting in an infinite loop after the button was pressed.

◆ getPicturePane()

nw4r::lyt::Picture * dYesNoWindow_c::getPicturePane ( int  n)
inlineprivate

Gets the n-th picture pane.

Definition at line 123 of file d_yes_no_window.hpp.

Member Data Documentation

◆ mLayout

LytBase_c dYesNoWindow_c::mLayout
private

The layout for the window.

Definition at line 111 of file d_yes_no_window.hpp.

◆ mStateMgr

sFStateMgr_c<dYesNoWindow_c, sStateMethodUsr_FI_c> dYesNoWindow_c::mStateMgr
private

The state manager for the window.

Definition at line 114 of file d_yes_no_window.hpp.

◆ mpRootPane

nw4r::lyt::Pane* dYesNoWindow_c::mpRootPane
private

The root pane of the window.

Definition at line 116 of file d_yes_no_window.hpp.

◆ P_yesBase_00

nw4r::lyt::Picture* dYesNoWindow_c::P_yesBase_00
private

Definition at line 118 of file d_yes_no_window.hpp.

◆ P_noBase_00

nw4r::lyt::Picture * dYesNoWindow_c::P_noBase_00
private

Definition at line 119 of file d_yes_no_window.hpp.

◆ P_centerBase_00

nw4r::lyt::Picture * dYesNoWindow_c::P_centerBase_00
private

Definition at line 120 of file d_yes_no_window.hpp.

◆ T_questionS_00

LytTextBox_c* dYesNoWindow_c::T_questionS_00
private

Definition at line 125 of file d_yes_no_window.hpp.

◆ T_question_00

LytTextBox_c * dYesNoWindow_c::T_question_00
private

Definition at line 126 of file d_yes_no_window.hpp.

◆ T_otehonTextS_01

LytTextBox_c * dYesNoWindow_c::T_otehonTextS_01
private

Definition at line 127 of file d_yes_no_window.hpp.

◆ T_otehonText_01

LytTextBox_c * dYesNoWindow_c::T_otehonText_01
private

Definition at line 128 of file d_yes_no_window.hpp.

◆ T_needCoinX_00

LytTextBox_c * dYesNoWindow_c::T_needCoinX_00
private

Definition at line 129 of file d_yes_no_window.hpp.

◆ T_needCoin_00

LytTextBox_c * dYesNoWindow_c::T_needCoin_00
private

Definition at line 130 of file d_yes_no_window.hpp.

◆ T_yes_00

LytTextBox_c * dYesNoWindow_c::T_yes_00
private

Definition at line 131 of file d_yes_no_window.hpp.

◆ T_yes_01

LytTextBox_c * dYesNoWindow_c::T_yes_01
private

Definition at line 132 of file d_yes_no_window.hpp.

◆ T_no_00

LytTextBox_c * dYesNoWindow_c::T_no_00
private

Definition at line 133 of file d_yes_no_window.hpp.

◆ T_no_01

LytTextBox_c * dYesNoWindow_c::T_no_01
private

Definition at line 134 of file d_yes_no_window.hpp.

◆ N_otehonText_00

nw4r::lyt::Pane* dYesNoWindow_c::N_otehonText_00
private

Definition at line 136 of file d_yes_no_window.hpp.

◆ N_saveIcon_00

nw4r::lyt::Pane * dYesNoWindow_c::N_saveIcon_00
private

Definition at line 137 of file d_yes_no_window.hpp.

◆ mCursorPos

int dYesNoWindow_c::mCursorPos
private

The current cursor position.

Definition at line 139 of file d_yes_no_window.hpp.

◆ mPrevCursorPos

int dYesNoWindow_c::mPrevCursorPos
private

The previous cursor position.

Definition at line 140 of file d_yes_no_window.hpp.

◆ mType

WINDOW_TYPE_e dYesNoWindow_c::mType
private

The type of the window.

This determines the text and the layout of the window.

Definition at line 144 of file d_yes_no_window.hpp.

◆ mStarCoinsRequired

int dYesNoWindow_c::mStarCoinsRequired

The number of star coins required to unlock a hint movie.

This is only to be used with the WATCH_UNLOCKED_HINT_MOVIE type.

Definition at line 149 of file d_yes_no_window.hpp.

◆ mHasLoadedLayout

bool dYesNoWindow_c::mHasLoadedLayout
private

Whether the layout has been loaded.

Definition at line 152 of file d_yes_no_window.hpp.

◆ mIsActive

bool dYesNoWindow_c::mIsActive
private

Whether the window is currently open.

Definition at line 153 of file d_yes_no_window.hpp.

◆ mHitButton

bool dYesNoWindow_c::mHitButton

Whether a button has been pressed.

Definition at line 156 of file d_yes_no_window.hpp.

◆ mIsAnimating

bool dYesNoWindow_c::mIsAnimating

Whether an animation is currently playing.

Definition at line 157 of file d_yes_no_window.hpp.

◆ mKeepOpen

bool dYesNoWindow_c::mKeepOpen

Whether the window should stay open after a button has been pressed.

Definition at line 158 of file d_yes_no_window.hpp.

◆ mCancel

bool dYesNoWindow_c::mCancel

Whether the window has been cancelled (and closed).

Definition at line 159 of file d_yes_no_window.hpp.

◆ mHideBG

bool dYesNoWindow_c::mHideBG

Whether to hide the translucent background that fills the screen.

Definition at line 160 of file d_yes_no_window.hpp.