nsnake
Classic snake game for the terminal
Loading...
Searching...
No Matches
MenuItemLabel.hpp
1#ifndef MENUITEMLABEL_H_DEFINED
2#define MENUITEMLABEL_H_DEFINED
3
4#include <Interface/Menu/MenuItem.hpp>
5
7struct MenuItemLabel: public MenuItem
8{
9 MenuItemLabel(std::string label, int id, std::string rightLabel);
10 virtual ~MenuItemLabel() {};
11
12 void draw(Window* window, int x, int y, int width, bool hilite=false);
13
14 void handleInput();
15
16 void set(std::string str);
17
18 std::string rightLabel;
19};
20
21#endif //MENUITEMLABEL_H_DEFINED
22
A segment of the terminal screen (2D char matrix).
Definition Window.hpp:17
Shows a Menu Item with left and right labels.
void handleInput()
Makes the menu item react to input, as seen on the global InputManager.
void draw(Window *window, int x, int y, int width, bool hilite=false)
Shows this item at #x, #y with #width.
Simplest type of item possible, with a label and user-defined id.
Definition MenuItem.hpp:12
std::string label
Text that will be shown on the screen.
Definition MenuItem.hpp:54