KSM edits

Dependencies:   mbed RA8875

Button.h

Committer:
kerrysmartin
Date:
2019-07-11
Revision:
20:d25fb9c55781
Parent:
19:fee3f71fab2d

File content as of revision 20:d25fb9c55781:


/// 
///
/// libraries used:
#include "RA8875.h"   
#include "DisplayDefs.h"
#include <string>

// set up global variables
// 

class Button 
{
    public:
    //Button();
    Button(loc_t arg_corner1_x, loc_t arg_corner1_y, loc_t arg_corner2_x, loc_t arg_corner2_y, color_t arg_color, RA8875 *arg_display, const char * arg_name);
    Button(rect_t arg_rect, color_t arg_color, RA8875 *arg_display, const char * arg_name);
    bool isPressed(loc_t cur_x, loc_t cur_y);
    void draw();
    string toString();
    color_t button_color;
    private:
    rect_t button_rect;
    char * button_name;
    
    RA8875 *lcd;
    //string button_name;
};