Foundation classes for a basic GUI implementing simple widgets and events. (Fork for custom changes.)
Fork of SimpleGUI by
Diff: Widgets/SpinnerWidget.cpp
- Revision:
- 17:5184762fda6c
- Parent:
- 13:6714534e7974
--- a/Widgets/SpinnerWidget.cpp Sun May 22 14:40:29 2016 +0000 +++ b/Widgets/SpinnerWidget.cpp Sun May 22 16:35:23 2016 +0000 @@ -45,6 +45,7 @@ _text.setLocation(_downArrow.width() + _borderWidth + _padding, _borderWidth + _padding); _text.setForeground(White); _text.setBackground(Black); + _text.setVAlign(TextWidget::MIDDLE); EventHandler* up = new EventHandler(TOUCH_TAP, this, &SpinnerWidget::_onUpClick); EventHandler* down = new EventHandler(TOUCH_TAP, this, &SpinnerWidget::_onDownClick); @@ -57,6 +58,10 @@ _downArrow.setEventHandler(down); } +TextWidget *SpinnerWidget::getTextWidget() { + return &_text; +} + void SpinnerWidget::setMin(float min) { if(_min != min) {