NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
d_yes_no_window.hpp
1#pragma once
2#include <game/bases/d_base.hpp>
3#include <game/bases/d_lytbase.hpp>
4#include <game/sLib/s_State.hpp>
5
9class dYesNoWindow_c : public dBase_c {
10public:
13 SAVE_DATA_CREATED,
14 SAVE,
15 SAVED,
16 EXIT_FREE_MODE,
17 WATCH_UNLOCKED_HINT_MOVIE,
18 SKIP_COURSE,
19 WATCH_HINT_MOVIE,
20 GOT_ALL_STAR_COINS,
21 GOT_ALL_STAR_COINS_MENTION_W9,
22 BOWSERJR_SINGLEPLAYER,
23 RETURN_TITLE,
24 BOWSERJR_MULTIPLAYER,
25 RETURN_TO_MAP,
26 BACK_TO_COURSE_SELECTION,
27 GOT_ALL_STAR_COINS_ALL_WORLDS,
28 QUICK_SAVE,
29 QUICK_SAVED,
30 ALL_TOAD_HOUSES_RETURNED,
31 ITEM_INFO,
32 COURSE_CLEAR_WITH_SUPER_GUIDE,
33 SKIP_COURSE_CONFIRM,
34 COMPLETED_EVERYTHING,
35 PROGRESS_AUTOSAVE_AFTER_W9_UNLOCK,
36 BLOCK_TRANSFORMATION,
37 BLOCK_TRANSFORMATION_REVERSE,
38 EXIT_COIN_BATTLE,
39 RETURN_TO_MAP2,
40 PEACH_CASTLE_HINT1,
41 PEACH_CASTLE_HINT2,
42 NUM_WINDOW_TYPES
43 };
44
47 POS_YES,
48 POS_NO,
49 POS_OK
50 };
51
53 enum SOUND_e {
54 SOUND_CLOSE,
55 SOUND_WAIT,
56 SOUND_CURSOR_MOVE,
57 SOUND_OPEN_ANIME
58 };
59
61 enum ANIMS_e {
62 ANIM_IN_WINDOW,
63 ANIM_IN_QUICK_SAVE,
64 ANIM_LOOP_WINDOW,
65 ANIM_LOOP_QUICK_SAVE,
66 ANIM_IN_YES,
67 ANIM_IN_NO,
68 ANIM_IN_OK,
69 ANIM_ON_YES,
70 ANIM_ON_NO,
71 ANIM_ON_OK,
72 ANIM_IDLE_YES,
73 ANIM_IDLE_NO,
74 ANIM_IDLE_OK,
75 ANIM_HIT_YES,
76 ANIM_HIT_NO,
77 ANIM_HIT_OK,
78 ANIM_HIT_QUICK_SAVE,
79 ANIM_OFF_YES,
80 ANIM_OFF_NO,
81 ANIM_OFF_OK,
82 ANIM_IN_BG,
83 ANIM_OUT_BG,
84 ANIM_OUT_WINDOW
85 };
86
88 virtual ~dYesNoWindow_c();
89 virtual int create();
90 virtual int execute();
91 virtual int draw();
92 virtual int doDelete();
93
94private:
100 void populateLayout();
101
104 STATE_FUNC_DECLARE(dYesNoWindow_c, ButtonOnStageAnimeEndWait);
105 STATE_FUNC_DECLARE(dYesNoWindow_c, ButtonChangeAnimeEndWait);
108 STATE_FUNC_DECLARE(dYesNoWindow_c, ClouseAnimeEndWait);
109 STATE_FUNC_DECLARE(dYesNoWindow_c, HitAnimeAfterWait);
110
112
115
117
118 nw4r::lyt::Picture *P_yesBase_00,
119 *P_noBase_00,
120 *P_centerBase_00;
121
123 nw4r::lyt::Picture *getPicturePane(int n) { return (&P_yesBase_00)[n]; }
124
125 LytTextBox_c *T_questionS_00,
126 *T_question_00,
127 *T_otehonTextS_01,
128 *T_otehonText_01,
129 *T_needCoinX_00,
130 *T_needCoin_00,
131 *T_yes_00,
132 *T_yes_01,
133 *T_no_00,
134 *T_no_01;
135
136 nw4r::lyt::Pane *N_otehonText_00,
137 *N_saveIcon_00;
138
141
145
146public:
150
151private:
154
155public:
159 bool mCancel;
160 bool mHideBG;
161};
The minimum required implementation for a base.
Definition d_base.hpp:41
Displays a confirmation prompt.
nw4r::lyt::Pane * mpRootPane
The root pane of the window.
bool mIsActive
Whether the window is currently open.
STATE_FUNC_DECLARE(dYesNoWindow_c, ClouseAnimeEndWait)
Waiting for the window to finish the closing animation.
bool mHasLoadedLayout
Whether the layout has been loaded.
bool mHitButton
Whether a button has been pressed.
bool mKeepOpen
Whether the window should stay open after a button has been pressed.
LytBase_c mLayout
The layout for the window.
sFStateMgr_c< dYesNoWindow_c, sStateMethodUsr_FI_c > mStateMgr
The state manager for the window.
ANIMS_e
The animations used for the window.
CURSOR_POS_e
The possible cursor positions.
STATE_FUNC_DECLARE(dYesNoWindow_c, InitWait)
Initial state. Switches to OpenAnimeStartWait immediately.
nw4r::lyt::Picture * getPicturePane(int n)
Gets the n-th picture pane.
virtual int execute()
do method for the execute operation.
bool mIsAnimating
Whether an animation is currently playing.
WINDOW_TYPE_e mType
The type of the window.
STATE_FUNC_DECLARE(dYesNoWindow_c, SelectWait)
Waiting for either a button change or button hit to occur.
STATE_FUNC_DECLARE(dYesNoWindow_c, OpenAnimeEndWait)
Waiting for the window to finish the opening animation.
STATE_FUNC_DECLARE(dYesNoWindow_c, HitAnimeEndWait)
Waiting for the button to finish the hit animation.
int mPrevCursorPos
The previous cursor position.
STATE_FUNC_DECLARE(dYesNoWindow_c, HitAnimeAfterWait)
Waiting in an infinite loop after the button was pressed.
virtual int doDelete()
do method for the delete operation.
virtual int draw()
do method for the draw operation.
STATE_FUNC_DECLARE(dYesNoWindow_c, ButtonOnStageAnimeEndWait)
Plays the button appearing animation and waits for it to finish.
SOUND_e
The sound effect types used by the window.
int mStarCoinsRequired
The number of star coins required to unlock a hint movie.
bool mCancel
Whether the window has been cancelled (and closed).
bool mHideBG
Whether to hide the translucent background that fills the screen.
virtual int create()
do method for the create operation.
WINDOW_TYPE_e
The prompt type.
void populateLayout()
Fills out the window content according to the settings.
int mCursorPos
The current cursor position.
STATE_FUNC_DECLARE(dYesNoWindow_c, ButtonChangeAnimeEndWait)
Playing the button change animations.
A wrapper for sStateMgr_c that uses sFStateFct_c and sStateIDChk_c.