Files
yaze/src/cli/tui.h
scawful 6bdcfe95ec Update CMake configuration and CI/CD workflows
- Upgraded CMake minimum version requirement to 3.16 and updated project version to 0.3.0.
- Introduced new CMake presets for build configurations, including default, debug, and release options.
- Added CI/CD workflows for continuous integration and release management, enhancing automated testing and deployment processes.
- Integrated Asar assembler support with new wrapper classes and CLI commands for patching ROMs.
- Implemented comprehensive tests for Asar integration, ensuring robust functionality and error handling.
- Enhanced packaging configuration for cross-platform support, including Windows, macOS, and Linux.
- Updated documentation and added test assets for improved clarity and usability.
2025-09-25 08:59:59 -04:00

70 lines
1.1 KiB
C++

#ifndef YAZE_CLI_TUI_H
#define YAZE_CLI_TUI_H
#include <ftxui/component/component.hpp>
#include <ftxui/dom/elements.hpp>
#include <ftxui/screen/screen.hpp>
#include <string>
#include <vector>
#include "app/rom.h"
namespace yaze {
/**
* @namespace yaze::cli
* @brief Namespace for the command line interface.
*/
namespace cli {
const std::vector<std::string> kMainMenuEntries = {
"Load ROM",
"Apply Asar Patch",
"Apply BPS Patch",
"Extract Symbols",
"Validate Assembly",
"Generate Save File",
"Palette Editor",
"Help",
"Exit",
};
enum class MainMenuEntry {
kLoadRom,
kApplyAsarPatch,
kApplyBpsPatch,
kExtractSymbols,
kValidateAssembly,
kGenerateSaveFile,
kPaletteEditor,
kHelp,
kExit,
};
enum LayoutID {
kLoadRom,
kApplyAsarPatch,
kApplyBpsPatch,
kExtractSymbols,
kValidateAssembly,
kGenerateSaveFile,
kPaletteEditor,
kHelp,
kExit,
kMainMenu,
kError,
};
struct Context {
Rom rom;
LayoutID current_layout = LayoutID::kMainMenu;
std::string error_message;
};
static Context app_context;
void ShowMain();
} // namespace cli
} // namespace yaze
#endif // YAZE_CLI_TUI_H