nsnake
Classic snake game for the terminal
Loading...
Searching...
No Matches
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:17
MenuItemLabel::handleInput
void handleInput()
Makes the menu item react to input, as seen on the global InputManager.
Definition
MenuItemLabel.cpp:25
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::MenuItem
MenuItem(std::string label, int id)
Create a MenuItem, with user-defined id.
Definition
MenuItem.cpp:6
MenuItem::label
std::string label
Text that will be shown on the screen.
Definition
MenuItem.hpp:54
Generated on Fri Jan 17 2025 00:00:00 for nsnake by
1.13.2