Add Console Button
This commit is contained in:
11
main.cpp
11
main.cpp
@@ -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);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user