mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-12-22 16:18:50 -05:00
hide menu bar from menu bar (#2988)
* hide menu bar from menu bar * show `-` on switch/wii u * actually show `-` * actually put the thing in a place where it works * spacers * reorder and use `[-]` instead of `-` --------- Co-authored-by: briaguya <briaguya@alice>
This commit is contained in:
parent
af33897e4c
commit
ccfc2a84bc
@ -120,20 +120,35 @@ void DrawMenuBarIcon() {
|
||||
|
||||
void DrawShipMenu() {
|
||||
if (ImGui::BeginMenu("Ship")) {
|
||||
if (ImGui::MenuItem("Hide Menu Bar",
|
||||
#if !defined(__SWITCH__) && !defined(__WIIU__)
|
||||
"F1"
|
||||
#else
|
||||
"[-]"
|
||||
#endif
|
||||
)) {
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->GetMenuBar()->ToggleVisibility();
|
||||
}
|
||||
UIWidgets::Spacer(0);
|
||||
#if !defined(__SWITCH__) && !defined(__WIIU__)
|
||||
if (ImGui::MenuItem("Toggle Fullscreen", "F11")) {
|
||||
LUS::Context::GetInstance()->GetWindow()->ToggleFullscreen();
|
||||
}
|
||||
UIWidgets::Spacer(0);
|
||||
#endif
|
||||
if (ImGui::MenuItem("Reset",
|
||||
#ifdef __APPLE__
|
||||
"Command-R"
|
||||
#else
|
||||
#elif !defined(__SWITCH__) && !defined(__WIIU__)
|
||||
"Ctrl+R"
|
||||
#else
|
||||
""
|
||||
#endif
|
||||
)) {
|
||||
std::reinterpret_pointer_cast<LUS::ConsoleWindow>(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetGuiWindow("Console"))->Dispatch("reset");
|
||||
}
|
||||
#if !defined(__SWITCH__) && !defined(__WIIU__)
|
||||
auto backend = LUS::Context::GetInstance()->GetWindow()->GetWindowBackend();
|
||||
if (ImGui::MenuItem("Toggle Fullscreen", "F11")) {
|
||||
LUS::Context::GetInstance()->GetWindow()->ToggleFullscreen();
|
||||
}
|
||||
UIWidgets::Spacer(0);
|
||||
if (ImGui::MenuItem("Quit")) {
|
||||
LUS::Context::GetInstance()->GetWindow()->Close();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user