mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-12-23 00:28:51 -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() {
|
void DrawShipMenu() {
|
||||||
if (ImGui::BeginMenu("Ship")) {
|
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",
|
if (ImGui::MenuItem("Reset",
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
"Command-R"
|
"Command-R"
|
||||||
#else
|
#elif !defined(__SWITCH__) && !defined(__WIIU__)
|
||||||
"Ctrl+R"
|
"Ctrl+R"
|
||||||
|
#else
|
||||||
|
""
|
||||||
#endif
|
#endif
|
||||||
)) {
|
)) {
|
||||||
std::reinterpret_pointer_cast<LUS::ConsoleWindow>(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetGuiWindow("Console"))->Dispatch("reset");
|
std::reinterpret_pointer_cast<LUS::ConsoleWindow>(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetGuiWindow("Console"))->Dispatch("reset");
|
||||||
}
|
}
|
||||||
#if !defined(__SWITCH__) && !defined(__WIIU__)
|
#if !defined(__SWITCH__) && !defined(__WIIU__)
|
||||||
auto backend = LUS::Context::GetInstance()->GetWindow()->GetWindowBackend();
|
UIWidgets::Spacer(0);
|
||||||
if (ImGui::MenuItem("Toggle Fullscreen", "F11")) {
|
|
||||||
LUS::Context::GetInstance()->GetWindow()->ToggleFullscreen();
|
|
||||||
}
|
|
||||||
if (ImGui::MenuItem("Quit")) {
|
if (ImGui::MenuItem("Quit")) {
|
||||||
LUS::Context::GetInstance()->GetWindow()->Close();
|
LUS::Context::GetInstance()->GetWindow()->Close();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user