Add tui header and source to cli namespace

This commit is contained in:
scawful
2024-12-25 18:16:15 -06:00
parent b8f2858f42
commit 56fef4776d
2 changed files with 47 additions and 0 deletions

29
src/cli/tui.cc Normal file
View File

@@ -0,0 +1,29 @@
#include "tui.h"
#include <ftxui/component/component.hpp>
#include <ftxui/dom/elements.hpp>
#include <ftxui/screen/screen.hpp>
namespace yaze {
namespace cli {
namespace tui {
void ShowMain() {
using namespace ftxui;
Element main_document = gridbox({
{text("z3ed: The Legend of Zelda: A Link to the Past") | bold | flex},
{text("left") | border, text("middle") | border | flex},
{text("left") | border, text("middle") | border | flex},
});
auto screen = Screen::Create(Dimension::Full(), // Width
Dimension::Fit(main_document) // Height
);
Render(screen, main_document);
screen.Print();
}
} // namespace tui
} // namespace cli
} // namespace yaze