Add Console Button

This commit is contained in:
2025-04-25 11:52:22 -05:00
parent b864d83171
commit d59c8a56c2

View File

@@ -202,13 +202,17 @@ public:
console->Log(std::format("{}", args.size())); console->Log(std::format("{}", args.size()));
} }
void CreateMenu() { void CreateMenu() {
using namespace JUI::UDimLiterals; using namespace JUI::UDimLiterals;
toolbar = new JUI::UtilityBar(scene); toolbar = new JUI::UtilityBar(scene);
toolbar->AddSubmenu("File"); toolbar->AddSubmenu("Edit"); 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"); auto* btn_toggle_info_dialog = toolbar->AddButton("Info");
// TODO: Implement JUI structure that makes blocks of text easy to impelement. // TODO: Implement JUI structure that makes blocks of text easy to impelement.
@@ -219,9 +223,6 @@ public:
info_dialog->Toggle(); info_dialog->Toggle();
}; };
auto* layout = new JUI::VerticalListLayout(info_dialog->ViewportInstance()); auto* layout = new JUI::VerticalListLayout(info_dialog->ViewportInstance());
layout->Padding(0_px); layout->Padding(0_px);