
#ifndef TPNLLSTANIM_H_INCLUDED
#define TPNLLSTANIM_H_INCLUDED

/*
OBJET       panel avec liste des animations du perso

DATE        06/2024

AUTEUR      philippe Thebaud

COMMENTAIRE
*/

#include <GL/glew.h>
#include <string>
#include <deque>

#include "../ECO/OUtils.h"
#include "../ECO/OTextureList.h"
#include "../ECO/interface/OButton.h"
#include "../ECO/interface/OImage.h"
#include "../ECO/interface/OLabel.h"
#include "../ECO/interface/ODynPanel.h"
#include "../ECO/interface/OListBox.h"
#include "../ECO/interface/OButtonCkd.h"

#include "common.h"

enum {
    //CLICK_NULL, CLICK_ON,
    PNLLIST_ANIM = 10, PNLLIST_LOOP
};


class TpnlLstAnim
{
public:

    TpnlLstAnim();
    ~TpnlLstAnim();

    void        addAnim(std::string str);

    void        clear();
    void        create(OTextureList& textureList);

    void        draw();

    int         getAnim();
    int         getLoop();

    int         mouseDown(int x, int y);
    void        mouseMove(int x, int y);
    //void        mouseUp();
    bool        mouseWheel(int delta);

    void        refresh_liste();

    void        show();

private:

    void        _shift();

    //

    bool        m_visible;

    ODynPanel   dynpanel;
    OListBox    listbox;
    OButton     btAnim;
    OButtonCkd  ckdLoop;

};

#endif
