summaryrefslogtreecommitdiff
path: root/include/d/lyt/d_lyt_deposit_box_cursor.h
blob: 82f1175ef72ed21e0beb482b6f82356544b46228 (plain)
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
#ifndef D_LYT_DEPOSIT_BOX_CURSOR_H
#define D_LYT_DEPOSIT_BOX_CURSOR_H

#include "d/lyt/d2d.h"
#include "d/lyt/d_lyt_common_icon_item.h"
#include "nw4r/lyt/lyt_pane.h"

// made up name
class dLytDepositBoxCursor_c : public d2d::dSubPane {
public:
    enum ItemLocation_e {
        LOC_POUCH,
        LOC_STOCK,
    };

public:
    dLytDepositBoxCursor_c() : mSlot(-1), mItem(0), mItemLocation(0) {}
    /* vt 0x0C */ virtual bool build(d2d::ResAccIf_c *resAcc) override;
    /* vt 0x10 */ virtual bool remove() override;
    /* vt 0x14 */ virtual bool execute() override;
    /* vt 0x18 */ virtual nw4r::lyt::Pane *getPane() override {
        return mLyt.getLayout()->GetRootPane();
    }
    /* vt 0x1C */ virtual d2d::LytBase_c *getLyt() override {
        return &mLyt;
    }
    /* vt 0x20 */ virtual const char *getName() const override {
        return mLyt.getName();
    }

    /* vt 0x08 */ virtual ~dLytDepositBoxCursor_c() {}

    bool draw();

    void init(s32 location, s32 slot, s32 item, bool isSell);
    void updateSlot(s32 location, s32 slot, s32 item, bool isSell);
    void activateSell();

    bool isVisible() const {
        return mIsVisible;
    }

    void setVisible(bool b) {
        mIsVisible = b;
    }

private:
    static const s32 NUM_ICONS_PER_PAGE = 12;

    void initIcon();
    void realizeNav();

    /* 0x008 */ d2d::dLytSub mLyt;
    /* 0x09C */ d2d::AnmGroup_c mAnm[2];
    /* 0x11C */ nw4r::lyt::Pane *mpStickCursorPane;
    /* 0x120 */ nw4r::lyt::Pane *mpGetIconPane;
    /* 0x124 */ dLytCommonIconItem_c mIcon;
    /* 0x930 */ d2d::SubPaneList mSubpaneList;
    /* 0x938 */ d2d::SubPaneListNode mNode;
    /* 0x948 */ bool mIsVisible;
    /* 0x949 */ bool mIsSellMode;
    /* 0x94C */ s32 mSlot;
    /* 0x950 */ s32 mItem;
    /* 0x954 */ s32 mItemLocation;
};

#endif