Icon

back to FEHIcon

Description

Library: FEHLCD.h

The Icon class is used to create software icons which can be used like software buttons. The class is within the FEHIcon namespace.

It has several functions for updating and using the software button as shown below. An important note is that to use just a single icon, the DrawIconArray is not needed (although it can be used), and so, an array of icons is not needed.

Member Functions

void SetProperties(char name[20], int start_x, int start_y, int w, int h, unsigned int c, unsigned int tc);
void Draw();
void Select();
void Deselect();
int Pressed(float x, float y, int mode);
void WhilePressed(float xi, float yi);

void ChangeLabelString(const char new_label[20]);
void ChangeLabelFloat(float val);

void ChangeLabelInt(int val);

Declaration

FEHIcon::Icon <icon_name>;

Parameters

None

Example

#include <FEHLCD.h>

int main(void)
{
    // declare a single icon called software_button
    FEHIcon::Icon software_button;
}