| 1 | #pragma once |
| 2 | |
| 3 | #include <math/seadVector.h> |
| 4 | |
| 5 | #include "Library/Layout/LayoutActor.h" |
| 6 | |
| 7 | namespace al { |
| 8 | class LayoutInitInfo; |
| 9 | |
| 10 | class RollParts : public LayoutActor { |
| 11 | public: |
| 12 | enum class ActionType : u32 { RollRight, RollLeft, Deactive, Active }; |
| 13 | |
| 14 | RollParts(LayoutActor* parent, const LayoutInitInfo& info, const char* archiveName); |
| 15 | |
| 16 | void startLoopAction(const char* actionName, const char* paneName); |
| 17 | void setData(const char16** messages, s32 messageCount, bool isLoop, s32 selectedIdx, |
| 18 | const char* paneName); |
| 19 | void (); |
| 20 | void setSelectedIdx(s32 idx); |
| 21 | void activate(); |
| 22 | void activate(s32 selectedIdx); |
| 23 | void deactivate(); |
| 24 | void rollRight(); |
| 25 | void rollLeft(); |
| 26 | |
| 27 | void calcCursorTrans(sead::Vector2f* outCursorTrans) const; |
| 28 | bool isJustChangeRoll() const; |
| 29 | bool isRoll() const; |
| 30 | |
| 31 | void exeDeactive(); |
| 32 | void exeActive(); |
| 33 | void exeRollOut(); |
| 34 | void exeRollIn(); |
| 35 | |
| 36 | private: |
| 37 | const char16** mMessages = nullptr; |
| 38 | s32 mMessageCount = -1; |
| 39 | s32 mSelectedIdx = -1; |
| 40 | bool mIsLoop = false; |
| 41 | const char* mPaneName = "TxtRoll" ; |
| 42 | const char* = nullptr; |
| 43 | const char* mRollPaneName = "Change" ; |
| 44 | const char* mActiveAction = "Select" ; |
| 45 | const char* mDeactiveAction = "Wait" ; |
| 46 | const char* mRollRightInAction = "RightIn" ; |
| 47 | const char* mRollRightOutAction = "RightOut" ; |
| 48 | const char* mRollLeftInAction = "LeftIn" ; |
| 49 | const char* mRollLeftOutAction = "LeftOut" ; |
| 50 | ActionType mCurrentActionType = ActionType::Active; |
| 51 | ActionType mNextActionType = ActionType::Active; |
| 52 | bool mHasStatePane = false; |
| 53 | }; |
| 54 | |
| 55 | static_assert(sizeof(RollParts) == 0x1a0); |
| 56 | } // namespace al |
| 57 | |