Newer
Older
ButtonHeld::ButtonHeld : Behaviour(name), _node(node){ }
//This is where you do your stuff for a simple behaviour
String str = "{\"id\":\"" + String(_node->getId()) + "\",\"Input\":{\"type\":\"" + String(name()) + "\",\"button\":\"" + args + "\"}}";
_node->announce(str);
return "ButtonHeld behaviour " + _name + " with (" + args + ")";
};
char * ButtonHeld::args() {
return "<String buttonId>";
};
ButtonReleased::ButtonReleased(VizBlocks* node, String name = "ButtonReleased") :
Behaviour(name), _node(node){
}
//This is where you do your stuff for a simple behaviour
String str = "{\"id\":\"" + String(_node->getId()) + "\",\"Input\":{\"type\":\"" + String(name()) + "\",\"button\":\"" + args + "\"}}";
_node->announce(str);
return "ButtonReleased behaviour " + _name + " with (" + args + ")";
};
char * ButtonReleased::args() {
return "<String buttonId>";
};
ButtonClicked::ButtonClicked(VizBlocks* node, String name = "ButtonClicked") :
Behaviour(name), _node(node){ }
//This is where you do your stuff for a simple behaviour
String str = "{\"id\":\"" + String(_node->getId()) + "\",\"Input\":{\"type\":\"" + String(name()) + "\",\"button\":\"" + args + "\"}}";
_node->announce(str);
return "ButtonClicked behaviour " + _name + " with (" + args + ")";
};
char * ButtonClicked::args() {
return "<String buttonId>";
};
ButtonPressed::ButtonPressed(VizBlocks* node, String name = "ButtonPressed") :
Behaviour(name), _node(node){
}
//This is where you do your stuff for a simple behaviour
String str = "{\"id\":\"" + String(_node->getId()) + "\",\"Input\":{\"type\":\"" + String(name()) + "\",\"button\":\"" + args + "\"}}";
_node->announce(str);
return "ButtonPressed behaviour " + _name + " with (" + args + ")";
};
char * ButtonPressed::args() {
return "<String buttonId>";
};
//This is where you do your stuff for a simple behaviour
String str = "{\"id\":\"" + String(_node->getId()) + "\",\"Input\":{\"type\":\"" + String(name()) + "\",\"button\":\"" + args + "\"}}";
_node->announce(str);
return "ButtonTick behaviour " + _name + " with (" + args + ")";
};
char * ButtonTick::args() {
return "<String buttonId>";
};