#pragma once

#include <Image.h>
#include <Window.h>

class ItemList : public Framework::DrawableBackground
{
private:
    Framework::Point mausPos;
    int currentTooltipSlot;
    int* slotList;
    int slotCount;

    int getSlotByLocalPos(Framework::Point pos);
    void doMouseEvent(Framework::MouseEvent& me, bool userRet) override;

public:
    ItemList();
    ~ItemList();
    bool tick(double time) override;
    void adjustSize(int parentWidth, int parentHeight);
    void render(Framework::Image& rObj) override;
};

class ItemListContainer : public Framework::Window
{
private:
    ItemList* list;

public:
    ItemListContainer();
    bool tick(double time) override;
};