-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuttonlist.h
More file actions
30 lines (27 loc) · 901 Bytes
/
Copy pathbuttonlist.h
File metadata and controls
30 lines (27 loc) · 901 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/**
* Linked list class which stores a list of buttons to be displayed.
*/
#ifndef BUTTONLIST_H
#define BUTTONLIST_H
#include "button.h"
#define BUTTON_HEIGHT 40
class ButtonList {
Button* head; // The top button
Button* tail; // The bottom button
int top_y; // The Y coordinate of the top of the list
int width; // The desired width of the buttons
int pad; // The padding between the buttons
// The Y coordinate of the next button that will be added to the list
int next_y;
unsigned int count; // The number of buttons in the list
public:
ButtonList();
ButtonList(int n_y, int screen_w, int ratio);
void Refresh();
void AddButton(const char* name, Destination d);
void Delete();
void DrawButtons();
int** GetButtonBounds();
unsigned int GetCount();
};
#endif