Description
clear imageButton widjet
Syntax
clearImageButton(id)
Parameters
id : id of imageButton widjet
Usages
clearImageButton(1)
Examples in arduino
#include "AppGosu.h"
AppGosu app;
void setup() {
app.start();
app.setDelayCmd(20); // max speed 20ms
myStart();
}
void loop() {
} // end of loop
//---------------------------------------------------------
void serialEvent() {
app.serialMessage();
EventLoop();
}
void EventLoop() {
if( app.btConnected()) { // for auto starting
myStart();
}
// user event code here
if( app.eventImageButton(1)) { // event handler
app.clearImageButton(1);
app.background(0,0,0);
app.text("imageButton 1 cleared", 100,400);
}
}
//---------------------------------------------------------
void myStart(void) {
// user starting code here
app.clearAll();
app.background(0,0,0);
app.textSize(50);
app.fill(255,255,255);
app.text("-- clear ImageButton --", 50, 50);
// make imageButton
app.imgaeButton("ledOn.png","ledOff.png",90,300,150, 280, 1);
}
by AppGosu
-----------------------------------------
No comments:
Post a Comment