nsnake
Classic snake game for the terminal
src
Interface
Menu
MenuItemLabel.hpp
1
#ifndef MENUITEMLABEL_H_DEFINED
2
#define MENUITEMLABEL_H_DEFINED
3
4
#include <Interface/Menu/MenuItem.hpp>
5
7
struct
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
Window
A segment of the terminal screen (2D char matrix).
Definition:
Window.hpp:16
MenuItemLabel::draw
void draw(Window *window, int x, int y, int width, bool hilite=false)
Shows this item at #x, #y with #width.
Definition:
MenuItemLabel.cpp:11
MenuItem::label
std::string label
Text that will be shown on the screen.
Definition:
MenuItem.hpp:54
MenuItem
Simplest type of item possible, with a label and user-defined id.
Definition:
MenuItem.hpp:11
MenuItemLabel::handleInput
void handleInput()
Makes the menu item react to input, as seen on the global InputManager.
Definition:
MenuItemLabel.cpp:25
MenuItemLabel
Shows a Menu Item with left and right labels.
Definition:
MenuItemLabel.hpp:7
Generated on Wed Jan 29 2020 00:00:00 for nsnake by
1.8.17