* Button with an arrow on it. Can be used for * scrolling lists, spinners, etc. Contains various * arrow shapes. */
| 35 | * arrow shapes. |
| 36 | */ |
| 37 | class ArrowButton : public ImageButton |
| 38 | { |
| 39 | private: |
| 40 | ArrowShape _shape; |
| 41 | TextList *_list; |
| 42 | Timer *_timer; |
| 43 | protected: |
| 44 | bool isButtonHandled(Uint8 button = 0); |
| 45 | public: |
| 46 | /// Creates a new arrow button with the specified size and position. |
| 47 | ArrowButton(ArrowShape shape, int width, int height, int x = 0, int y = 0); |
| 48 | /// Cleans up the arrow button. |
| 49 | ~ArrowButton(); |
| 50 | /// Sets the arrow button's color. |
| 51 | void setColor(Uint8 color); |
| 52 | /// Sets the arrow button's shape. |
| 53 | void setShape(ArrowShape shape); |
| 54 | /// Sets the arrow button's list. |
| 55 | void setTextList(TextList *list); |
| 56 | /// Handles the timers. |
| 57 | void think(); |
| 58 | /// Scrolls the list. |
| 59 | void scroll(); |
| 60 | /// Draws the arrow button. |
| 61 | void draw(); |
| 62 | /// Special handling for mouse presses. |
| 63 | void mousePress(Action *action, State *state); |
| 64 | /// Special handling for mouse releases. |
| 65 | void mouseRelease(Action *action, State *state); |
| 66 | /// Special handling for mouse clicks. |
| 67 | void mouseClick(Action *action, State *state); |
| 68 | }; |
| 69 | |
| 70 | } |
| 71 |
nothing calls this directly
no outgoing calls
no test coverage detected