Lab4
Dependencies: SeeedStudioTFTv2 TFT_fonts mbed
Fork of Seeed_TFT_Touch_Shield by
Diff: Button.cpp
- Revision:
- 6:ebffa73d4f95
- Parent:
- 4:ebcf8d366b91
--- a/Button.cpp Fri Sep 26 12:42:10 2014 +0000 +++ b/Button.cpp Fri Sep 26 15:33:34 2014 +0000 @@ -19,7 +19,17 @@ TFT.printf(lbl); } -void Button::trigger_action(ActionType type, ActionEvent evnt){ - //do something - +void Button::trigger_action(ActionType type, ActionEvent evnt, void* target){ + //do something + if(type == CORD){ + ActionEvent new_event; + new_event.x = evnt.x; + new_event.y = evnt.y; + new_event.str = lbl; + ActionType type; + type = CORD_STR; + + Panel* target_pnl = (Panel*) target; + target_pnl->trigger_action(type, new_event, NULL); + } } \ No newline at end of file