1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
#ifndef D_LYT_COMMON_A_BTN_H
#define D_LYT_COMMON_A_BTN_H
#include "d/lyt/d2d.h"
/**
* Made up name.
*
* An A button used in various message windows, as well as
* the title menu. Can be hidden, visible, animating in, animating out.
*/
class dLytCommonABtn_c : public d2d::dSubPane {
public:
virtual bool build(d2d::ResAccIf_c *resAcc) override;
virtual bool remove() override;
virtual bool execute() override;
virtual nw4r::lyt::Pane *getPane() override {
return mLyt.getLayout()->GetRootPane();
}
virtual d2d::LytBase_c *getLyt() override {
return &mLyt;
}
virtual const char *getName() const override {
return mLyt.getName();
}
bool isDoneOut() const {
return mIsDoneOut;
}
bool requestIn();
bool requestOut(bool b);
enum SoundVariant {
VARIANT_NORMAL,
VARIANT_TITLE,
};
void setSoundVariant(SoundVariant);
void resetToInvisble();
enum ABtnState {
STATE_INVISIBLE,
STATE_IN,
STATE_VISIBLE,
STATE_OUT,
};
private:
enum OutState {
OUT_STATE_DECIDING,
OUT_STATE_GOTO_OUT,
OUT_STATE_OUT,
OUT_STATE_GOTO_INVISIBLE,
};
void setState(ABtnState state);
void runExecuteFunc();
void executeStateInvisible();
void executeStateIn();
void executeStateVisible();
void executeStateDecideOut();
void gotoStateInvisible();
void gotoStateIn();
void goToStateVisible();
void goToStateDecideOut();
typedef void (dLytCommonABtn_c::*executeFunc)(void);
static const executeFunc sExecuteFuncs[4];
/* 0x008 */ d2d::dLytSub mLyt;
/* 0x09C */ d2d::AnmGroup_c mAnm[4];
/* 0x19C */ ABtnState mState;
/* 0x1A0 */ OutState mOutState;
/* 0x1A4 */ SoundVariant mSoundVariant;
/* 0x1A8 */ u8 field_0x1A8;
/* 0x1A9 */ bool mInRequested;
/* 0x1AA */ bool mOutRequested;
/* 0x1AB */ bool mIsDoneOut;
/* 0x1AC */ u8 field_0x1AC;
/* 0x1AD */ bool mNoDecide;
/* 0x1AE */ u8 field_0x1AE;
/* 0x1AF */ u8 field_0x1AF;
};
#endif
|