Skip to content

Commit

Permalink
moves bounds checking toggle so it's in glass's main menu bar
Browse files Browse the repository at this point in the history
  • Loading branch information
WispySparks committed Jul 9, 2024
1 parent 269393e commit bcedfb3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 0 additions & 3 deletions glass/src/app/native/cpp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,6 @@ int main(int argc, char** argv) {

gMainMenu.AddMainMenu([] {
if (ImGui::BeginMenu("View")) {
ImGui::MenuItem(
"Bounds Checking", nullptr,
&glass::GetStorageRoot().GetBool("bounds_checking", true));
if (ImGui::MenuItem("Set Enter Key")) {
gSetEnterKey = true;
}
Expand Down
6 changes: 6 additions & 0 deletions glass/src/lib/native/cpp/MainMenuBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ void MainMenuBar::Display() {

wpi::gui::EmitViewMenu();

if (ImGui::BeginMenu("View")) {
ImGui::MenuItem("Bounds Checking", nullptr,
&glass::GetStorageRoot().GetBool("bounds_checking", true));
ImGui::EndMenu();
}

for (auto&& menu : m_menus) {
if (menu) {
menu();
Expand Down

0 comments on commit bcedfb3

Please sign in to comment.