1#pragma once
2
3#include "Library/Nerve/NerveExecutor.h"
4
5namespace al {
6class LayoutActor;
7class LayoutInitInfo;
8class LiveActor;
9class KeyRepeatCtrl;
10} // namespace al
11
12class MenuSelectParts : public al::NerveExecutor {
13public:
14 enum Selection : s32 {
15 Continue = 0,
16 SeparatePlay = 1,
17 NewGame = 2,
18 Help = 3,
19 Save = 4,
20 Setting = 5
21 };
22
23 MenuSelectParts(const char* name, al::LayoutActor* layoutActor, al::LiveActor* marioActor,
24 const al::LayoutInitInfo& info, s32 menuItemCount);
25
26 void update();
27 void appear(s32 menuItemAmount);
28 void startActionPartsIllustSelectIndex();
29 void appearWait();
30 void setSelectMessage(s32 index, const char16* message);
31
32 bool isDecideContinue() const;
33 bool isDecideEnd() const;
34 bool isSelectContinue() const;
35 bool isDecideSetting() const;
36 bool isSelectSetting() const;
37 bool isDecideSave() const;
38 bool isSelectSave() const;
39 bool isDecideSeparatePlay() const;
40 bool isSelectSeparatePlay() const;
41 bool isDecideHelp() const;
42 bool isSelectHelp() const;
43 bool isDecideNewGame() const;
44 bool isSelectNewGame() const;
45 s32 calcPartsIndex(s32 selection) const;
46
47 void exeHide();
48 void exeAppear();
49 void startActionMarioSelectIndex();
50 void exeSelect();
51 void startActionMario(al::LiveActor* marioActor, const char* actionName);
52 void exeDecideParts();
53 bool isInvalidSelect() const;
54 void exeDecideInterval();
55 void exeDecideEnd();
56
57 void setMainMenu(bool isMainMenu) { mIsMainMenu = isMainMenu; }
58
59private:
60 al::LayoutActor* mLayoutActor;
61 s32 mMenuItemAmount = 0;
62 s32 mCursorItemIndex = 0;
63 s32 mMax;
64 al::LayoutActor** mLayoutArray = nullptr;
65 al::LayoutActor* mCursorActor = nullptr;
66 s32 mDefaultIndex = 0;
67 al::LiveActor* mMarioActor = nullptr;
68 al::LiveActor* mCapActor = nullptr;
69 al::KeyRepeatCtrl* mKeyRepeatCtrl = nullptr;
70 bool mIsMainMenu = false;
71};
72