nsnake
Classic snake game for the terminal
Loading...
Searching...
No Matches
MenuItemTextbox.hpp
1#ifndef MENUITEMTEXTBOX_H_DEFINED
2#define MENUITEMTEXTBOX_H_DEFINED
3
4#include <Interface/Menu/MenuItem.hpp>
5
10{
11 MenuItemTextbox(std::string label, int id, int width, std::string initial);
12
13 virtual ~MenuItemTextbox() {};
14
15 void draw(Window* window, int x, int y, int width, bool hilite=false);
16
17 void handleInput();
18
19 std::string currentText;
20 int width;
21};
22
23#endif //MENUITEMTEXTBOX_H_DEFINED
24
A segment of the terminal screen (2D char matrix).
Definition Window.hpp:17
Place where you can input characters.
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