52 void tick(uint64_t dt);
53 void draw(Tempest::Encoder<Tempest::CommandBuffer>& cmd);
58 void keyUpEvent (Tempest::KeyEvent& e)
override;
61 void paintEvent (Tempest::PaintEvent& e)
override;
73 struct PageLocal final {
80 const Tempest::Texture2d* tex =
nullptr;
81 const Tempest::Texture2d* slot=
nullptr;
82 const Tempest::Texture2d* selT=
nullptr;
83 const Tempest::Texture2d* selU=
nullptr;
90 std::unique_ptr<Page> pageOth, pagePl;
91 PageLocal pageLocal[2];
94 Tempest::Timer takeTimer;
99 size_t columsCount = 5;
100 int32_t scrollDelta = 0;
102 size_t rowsCount()
const;
104 Tempest::Size slotSize()
const;
105 int infoHeight()
const;
106 size_t pagesCount()
const;
108 const Page& activePage();
109 PageLocal& activePageSel();
110 const World* world()
const;
112 void processMove(Tempest::KeyEvent& e);
113 void moveLeft(
bool usePage);
114 void moveRight(
bool usePage);
118 void onItemAction(uint8_t slotHint);
121 void drawAll (Tempest::Painter& p,
Npc& player,
DrawPass pass);
122 void drawItems (Tempest::Painter& p,
DrawPass pass,
const Page &inv,
const PageLocal &sel,
int x,
int y,
int wcount,
int hcount);
124 const Page& page,
const PageLocal &sel,
int x,
int y,
size_t id);
125 void drawGold (Tempest::Painter& p,
Npc &player,
int x,
int y);
126 void drawHeader(Tempest::Painter& p, std::string_view title,
int x,
int y);
127 void drawInfo (Tempest::Painter& p);