
#ifndef TPNLSKY_H_INCLUDED
#define TPNLSKY_H_INCLUDED

/*
OBJET       heure / nuages / ...

DATE        11/2025

AUTEUR      philippe Thebaud

COMMENTAIRE
*/

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

#include "../ECO/OUtils.h"
#include "../ECO/OTextureList.h"
#include "../ECO/interface/OImage.h"
#include "../ECO/interface/OLabel.h"
#include "../ECO/interface/ODynPanel.h"
#include "../ECO/interface/OButtonCkd.h"
#include "../ECO/interface/ObuttonSld.h"
#include "../ECO/interface/OLevelBox.h"

#include "common.h"

// CLICK_NULL CLICK_ON ...
enum {TPNLSKY_CYCLE = 10, TPNLSKY_HOUR, TPNLSKY_GLEAM, TPNLSKY_PHASE};

class TpnlSky
{
public:

    TpnlSky();
    ~TpnlSky();

    void        create(OTextureList& textureList, int aLeft, int aTop, int aRight);

    void        draw();

    bool        getCycle();
    bool        getGleam();
    int	        getHeight();
    float       getHour();
    int         getPhase();
    float       getStep();

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

    void        setHour(float value);
	void		shift();

private:

    void        _setHour();
    void        _setPhase();

private:

    ODynPanel   panel;

    OLabel      lblHeure, lblValHeure;
    OLevelBox   sldHeure;

    OButtonCkd  ckdCycle;
    OButtonSld  sldCycle;

    OImage      imgAide;

    OButtonCkd  ckdGleam;

    OLabel      lblPhase, lblValPhase;
    OLevelBox   sldPhase;

};

#endif
