-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMenu.h
More file actions
52 lines (40 loc) · 1.08 KB
/
Menu.h
File metadata and controls
52 lines (40 loc) · 1.08 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef _MENU_H
#define _MENU_H
#include <SDL3/SDL.h>
#include <vector>
#include "Encounter.h"
#include "Download.h"
#include "CreatureList.h"
#include "CreatureEdit.h"
#include "EncounterEdit.h"
struct CreaturePage {
std::vector<dnd::Creature> creatures;
int page_number;
};
struct ToolState {
SDL_Window* window;
SDL_Renderer* renderer;
bool should_download_creatures = false;
bool is_downloading_creatures = false;
std::vector<dnd::Creature> creatures;
bool reload_creatures = false;
// Creature list
std::vector<dnd::Creature> filtered_creatures;
char creature_filter[256] = "";
int creature_page = 0;
int creature_selected_index = -1;
CreaturePage page;
// Creature edit
dnd::Creature current_creature;
bool clear_image = false;
bool is_downloading_image = false;
bool image_error = false;
SDL_Texture* current_creature_texture = nullptr;
bool show_error_popup = false;
std::string error_message;
dnd::Encounter current_encounter;
bool encounter_planner = false;
bool encounter_battler = false;
};
void menuDraw(ToolState* state);
#endif