#include <Arduino.h>


/** ***********************************************************************************
	CLASS  TOUCH_BOUTON		
***************************************************************************************/

class TOUCH_BOUTON
{
    protected:
        uint8_t dx;
        uint8_t dy;
        uint8_t dr; // rayon de courbure des angles

    public:
        uint16_t x0;
        uint16_t y0;

        String s;
        boolean cliked;
        boolean selected;

        uint8_t read_dx();
        uint8_t read_dy();

        TOUCH_BOUTON(); // constructeur

        void init(uint16_t xi, uint16_t yi, uint8_t dxi, uint8_t dyi, uint8_t dri);
        void affiche(uint16_t coul_fill_unselect, uint16_t coul_fill_select, uint8_t n_font);

    private:

};


void setup();
void loop();
void affi_image_from_SD(String filename, uint16_t x0, uint16_t y0);
void init_affichages();
void init_1_bouton(uint16_t xi, uint16_t yi, uint8_t dx, uint8_t dy, String si, TOUCH_BOUTON *bouton_i);
void test_clic_bt_stop();

