Skip to content
Snippets Groups Projects
button.h 778 B
Newer Older
/*
// Created by Lucile on 28/03/2021.
*/

/*!
 * \file button.h
 * \brief Button Header File
 * \authors Lucile
llebasca's avatar
llebasca committed
 * \version 2
 * \date 28/03/2021
 *
 * Button structure definiton.
 *
 */

#ifndef INSAGAME_BUTTON_H
#define INSAGAME_BUTTON_H


/*!
 * \struct Button
 * \brief Button structure
 */

typedef struct {
    int x_button; /**< Position : abscissa */
    int y_button; /**< Position : ordinate */
    int long_button; /**< Size : length */
    int larg_button; /**< Size : width */
    char * image_button; /**< Source image of the button. */
llebasca's avatar
llebasca committed
    int state; /**< Button's state : 1 if on, 0 if off */
llebasca's avatar
llebasca committed
void init_button(Button * button, int x, int y, int length, int width, char * path);
int click(int x, int y, Button * button);

#endif /*INSAGAME_BUTTON_H*/