yaze
0.2.2
Link to the Past ROM Editor
Loading...
Searching...
No Matches
tui.h
Go to the documentation of this file.
1
#ifndef YAZE_CLI_TUI_H
2
#define YAZE_CLI_TUI_H
3
4
#include <ftxui/component/component.hpp>
5
#include <ftxui/dom/elements.hpp>
6
#include <ftxui/screen/screen.hpp>
7
#include <string>
8
#include <vector>
9
10
#include "
app/rom.h
"
11
12
namespace
yaze
{
13
namespace
cli
{
14
15
const
std::vector<std::string>
kMainMenuEntries
= {
16
"Load ROM"
,
17
"Apply BPS Patch"
,
18
"Generate Save File"
,
19
"Palette Editor"
,
20
"Help"
,
21
"Exit"
,
22
};
23
24
enum class
MainMenuEntry
{
25
kLoadRom
,
26
kApplyBpsPatch
,
27
kGenerateSaveFile
,
28
kPaletteEditor
,
29
kHelp
,
30
kExit
,
31
};
32
33
enum
LayoutID
{
34
kLoadRom
,
35
kApplyBpsPatch
,
36
kGenerateSaveFile
,
37
kPaletteEditor
,
38
kHelp
,
39
kExit
,
40
kMainMenu
,
41
kError
,
42
};
43
44
struct
Context
{
45
Rom
rom
;
46
LayoutID
current_layout
=
LayoutID::kMainMenu
;
47
std::string
error_message
;
48
};
49
50
static
Context
app_context;
51
52
void
ShowMain
();
53
54
}
// namespace cli
55
}
// namespace yaze
56
57
#endif
// YAZE_CLI_TUI_H
yaze::Rom
The Rom class is used to load, save, and modify Rom data.
Definition
rom.h:59
yaze::cli
Namespace for the command line interface.
Definition
compress.cc:4
yaze::cli::kMainMenuEntries
const std::vector< std::string > kMainMenuEntries
Definition
tui.h:15
yaze::cli::MainMenuEntry
MainMenuEntry
Definition
tui.h:24
yaze::cli::ShowMain
void ShowMain()
Definition
tui.cc:568
yaze::cli::LayoutID
LayoutID
Definition
tui.h:33
yaze::cli::kGenerateSaveFile
@ kGenerateSaveFile
Definition
tui.h:36
yaze::cli::kMainMenu
@ kMainMenu
Definition
tui.h:40
yaze::cli::kError
@ kError
Definition
tui.h:41
yaze::cli::kPaletteEditor
@ kPaletteEditor
Definition
tui.h:37
yaze::cli::kHelp
@ kHelp
Definition
tui.h:38
yaze::cli::kExit
@ kExit
Definition
tui.h:39
yaze::cli::kLoadRom
@ kLoadRom
Definition
tui.h:34
yaze::cli::kApplyBpsPatch
@ kApplyBpsPatch
Definition
tui.h:35
yaze
Main namespace for the application.
Definition
controller.cc:18
rom.h
yaze::cli::Context
Definition
tui.h:44
yaze::cli::Context::error_message
std::string error_message
Definition
tui.h:47
yaze::cli::Context::current_layout
LayoutID current_layout
Definition
tui.h:46
yaze::cli::Context::rom
Rom rom
Definition
tui.h:45
src
cli
tui.h
Generated by
1.13.2