From d59c8a56c2edfbea520631b433c6279603f303ec Mon Sep 17 00:00:00 2001 From: josh Date: Fri, 25 Apr 2025 11:52:22 -0500 Subject: [PATCH] Add Console Button --- main.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/main.cpp b/main.cpp index b13fd92..20359c4 100644 --- a/main.cpp +++ b/main.cpp @@ -202,13 +202,17 @@ public: console->Log(std::format("{}", args.size())); } - - void CreateMenu() { using namespace JUI::UDimLiterals; toolbar = new JUI::UtilityBar(scene); toolbar->AddSubmenu("File"); toolbar->AddSubmenu("Edit"); + auto* btn_toggle_console = toolbar->AddButton("Console"); + + btn_toggle_console->OnClickEvent += [this] (auto a, auto b) mutable { + console->Toggle(); + }; + auto* btn_toggle_info_dialog = toolbar->AddButton("Info"); // TODO: Implement JUI structure that makes blocks of text easy to impelement. @@ -219,9 +223,6 @@ public: info_dialog->Toggle(); }; - - - auto* layout = new JUI::VerticalListLayout(info_dialog->ViewportInstance()); layout->Padding(0_px);