F746 GUI over lapping class.
Dependents: DISCO-F746NG_test001
ButtonGroupOL.hpp@1:36e616bde4b8, 2016-06-24 (annotated)
- Committer:
- InoueTakashi
- Date:
- Fri Jun 24 01:19:30 2016 +0000
- Revision:
- 1:36e616bde4b8
Baloon touch game. version1.0 revision0.1
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
InoueTakashi | 1:36e616bde4b8 | 1 | // |
InoueTakashi | 1:36e616bde4b8 | 2 | // 2016/04/27, Copyright (c) 2016 Takashi Inoue |
InoueTakashi | 1:36e616bde4b8 | 3 | // Button Group OverLapping Class Header |
InoueTakashi | 1:36e616bde4b8 | 4 | // ver 0.9 rev 0.1 2016/5/17 |
InoueTakashi | 1:36e616bde4b8 | 5 | //----------------------------------------------------------- |
InoueTakashi | 1:36e616bde4b8 | 6 | |
InoueTakashi | 1:36e616bde4b8 | 7 | #ifndef F746_BUTTON_GROUP_OL_HPP |
InoueTakashi | 1:36e616bde4b8 | 8 | #define F746_BUTTON_GROUP_OL_HPP |
InoueTakashi | 1:36e616bde4b8 | 9 | |
InoueTakashi | 1:36e616bde4b8 | 10 | #include "GuiBase.hpp" |
InoueTakashi | 1:36e616bde4b8 | 11 | #include "Button.hpp" |
InoueTakashi | 1:36e616bde4b8 | 12 | #include "ButtonGroup.hpp" |
InoueTakashi | 1:36e616bde4b8 | 13 | #include "GUIconst.hpp" |
InoueTakashi | 1:36e616bde4b8 | 14 | |
InoueTakashi | 1:36e616bde4b8 | 15 | using namespace Mikami; |
InoueTakashi | 1:36e616bde4b8 | 16 | |
InoueTakashi | 1:36e616bde4b8 | 17 | namespace TakaIno |
InoueTakashi | 1:36e616bde4b8 | 18 | { |
InoueTakashi | 1:36e616bde4b8 | 19 | class ButtonGroupOL : public ButtonGroup |
InoueTakashi | 1:36e616bde4b8 | 20 | { |
InoueTakashi | 1:36e616bde4b8 | 21 | public: |
InoueTakashi | 1:36e616bde4b8 | 22 | // Constructor |
InoueTakashi | 1:36e616bde4b8 | 23 | ButtonGroupOL(uint16_t x0 = GUI_BTN_X_POS, uint16_t y0 = GUI_BTN_Y_POS, |
InoueTakashi | 1:36e616bde4b8 | 24 | uint16_t width = GUI_BTN_WIDTH, uint16_t height = GUI_BTN_HIGHT, |
InoueTakashi | 1:36e616bde4b8 | 25 | uint16_t number = GUI_NUMBER_BUTTONS, const string str[] = GUI_BTN_STR1, |
InoueTakashi | 1:36e616bde4b8 | 26 | uint16_t spaceX = GUI_BTN_X_SPACE , uint16_t spaceY = GUI_BTN_Y_SPACE, |
InoueTakashi | 1:36e616bde4b8 | 27 | uint16_t column = GUI_BTN_COLUMN, |
InoueTakashi | 1:36e616bde4b8 | 28 | int touched = GUI_FIRST_BTN_NUM, // number for button initially touched-color |
InoueTakashi | 1:36e616bde4b8 | 29 | sFONT &fonts = Font16, |
InoueTakashi | 1:36e616bde4b8 | 30 | uint32_t textColor = LCD_COLOR_BLACK,// = GuiBase::ENUM_TEXT, |
InoueTakashi | 1:36e616bde4b8 | 31 | uint32_t backColor = LCD_COLOR_DARKCYAN,// = GuiBase::ENUM_BACK, |
InoueTakashi | 1:36e616bde4b8 | 32 | uint32_t createdColor = LCD_COLOR_WHITE,// = GuiBase::ENUM_CREATED, |
InoueTakashi | 1:36e616bde4b8 | 33 | uint32_t touchedColor = LCD_COLOR_CYAN,// = GuiBase::ENUM_TOUCHED, |
InoueTakashi | 1:36e616bde4b8 | 34 | uint32_t inactiveColor = LCD_COLOR_DARKGREEN,// = GuiBase::ENUM_INACTIVE, |
InoueTakashi | 1:36e616bde4b8 | 35 | uint32_t inactiveTextColor = LCD_COLOR_DARKRED// = GuiBase::ENUM_INACTIVE_TEXT |
InoueTakashi | 1:36e616bde4b8 | 36 | ); |
InoueTakashi | 1:36e616bde4b8 | 37 | |
InoueTakashi | 1:36e616bde4b8 | 38 | // Destructor |
InoueTakashi | 1:36e616bde4b8 | 39 | ~ButtonGroupOL(); |
InoueTakashi | 1:36e616bde4b8 | 40 | |
InoueTakashi | 1:36e616bde4b8 | 41 | //menber variable for member initializer |
InoueTakashi | 1:36e616bde4b8 | 42 | protected: |
InoueTakashi | 1:36e616bde4b8 | 43 | uint16_t m_x0; |
InoueTakashi | 1:36e616bde4b8 | 44 | uint16_t m_y0; |
InoueTakashi | 1:36e616bde4b8 | 45 | uint16_t m_width; |
InoueTakashi | 1:36e616bde4b8 | 46 | uint16_t m_height; |
InoueTakashi | 1:36e616bde4b8 | 47 | uint16_t m_number; |
InoueTakashi | 1:36e616bde4b8 | 48 | const string *m_str; |
InoueTakashi | 1:36e616bde4b8 | 49 | uint16_t m_spaceX; |
InoueTakashi | 1:36e616bde4b8 | 50 | uint16_t m_spaceY; |
InoueTakashi | 1:36e616bde4b8 | 51 | uint16_t m_column; |
InoueTakashi | 1:36e616bde4b8 | 52 | int m_touched; // number for button initially touched-color |
InoueTakashi | 1:36e616bde4b8 | 53 | sFONT *m_fonts; |
InoueTakashi | 1:36e616bde4b8 | 54 | uint32_t m_textColor; // = GuiBase::ENUM_TEXT, |
InoueTakashi | 1:36e616bde4b8 | 55 | uint32_t m_backColor;// = GuiBase::ENUM_BACK, |
InoueTakashi | 1:36e616bde4b8 | 56 | uint32_t m_createdColor;// = GuiBase::ENUM_CREATED, |
InoueTakashi | 1:36e616bde4b8 | 57 | uint32_t m_touchedColor;// = GuiBase::ENUM_TOUCHED, |
InoueTakashi | 1:36e616bde4b8 | 58 | uint32_t m_inactiveColor;// = GuiBase::ENUM_INACTIVE, |
InoueTakashi | 1:36e616bde4b8 | 59 | uint32_t m_inactiveTextColor;// = GuiBase::ENUM_INACTIVE_TEXT |
InoueTakashi | 1:36e616bde4b8 | 60 | |
InoueTakashi | 1:36e616bde4b8 | 61 | }; |
InoueTakashi | 1:36e616bde4b8 | 62 | } |
InoueTakashi | 1:36e616bde4b8 | 63 | |
InoueTakashi | 1:36e616bde4b8 | 64 | #endif //F746_BUTTON_GROUP_OL_HPP |
InoueTakashi | 1:36e616bde4b8 | 65 |