| 1 | #pragma once |
| 2 | |
| 3 | #include <container/seadPtrArray.h> |
| 4 | |
| 5 | #include "Library/Layout/LayoutActor.h" |
| 6 | |
| 7 | namespace al { |
| 8 | class LayoutInitInfo; |
| 9 | |
| 10 | class WindowConfirm : public LayoutActor { |
| 11 | public: |
| 12 | enum class SelectionType { |
| 13 | None = -1, |
| 14 | HardKey = 0, |
| 15 | List00 = 1, |
| 16 | List01 = 2, |
| 17 | List02 = 3, |
| 18 | }; |
| 19 | |
| 20 | enum class Direction { |
| 21 | None = 0, |
| 22 | Up = 1, |
| 23 | Down = 2, |
| 24 | }; |
| 25 | |
| 26 | struct Selection { |
| 27 | SelectionType selectionType; |
| 28 | SelectionType prevSelectionType; |
| 29 | }; |
| 30 | |
| 31 | WindowConfirm(const LayoutInitInfo&, const char*, const char*); |
| 32 | |
| 33 | void setTxtMessage(const char16*); |
| 34 | void setTxtList(s32, const char16*); |
| 35 | void setListNum(s32); |
| 36 | void setCancelIdx(s32); |
| 37 | void appear() override; |
| 38 | void appearWithChoicingCancel(); |
| 39 | bool isNerveEnd(); |
| 40 | bool tryEnd(); |
| 41 | bool isEnableInput(); |
| 42 | bool tryUp(); |
| 43 | bool tryDown(); |
| 44 | bool tryDecide(); |
| 45 | bool tryDecideWithoutEnd(); |
| 46 | bool tryCancel(); |
| 47 | void setCursorToPane(); |
| 48 | bool tryCancelWithoutEnd(); |
| 49 | void exeHide(); |
| 50 | void exeAppear(); |
| 51 | void exeWait(); |
| 52 | void exeDecide(); |
| 53 | void exeDecideAfter(); |
| 54 | void exeEnd(); |
| 55 | |
| 56 | SelectionType getPrevSelectionType() { return mSelection.prevSelectionType; } |
| 57 | |
| 58 | private: |
| 59 | Direction mDirection; |
| 60 | Selection mSelection; |
| 61 | s32 mCancelIdx; |
| 62 | bool mIsDecided; |
| 63 | s32 mCooldown; |
| 64 | sead::PtrArray<LayoutActor> mParListArray; |
| 65 | LayoutActor* mCursorActor; |
| 66 | LayoutActor* mButtonActor; |
| 67 | }; |
| 68 | } // namespace al |
| 69 | |