mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-20 21:33:40 -07:00
implement reset
This commit is contained in:
parent
f9b831d5c0
commit
b730af5e8a
1 changed files with 17 additions and 6 deletions
|
@ -55,6 +55,7 @@ bool oldCursorState = true;
|
||||||
OSContPad* pads;
|
OSContPad* pads;
|
||||||
|
|
||||||
std::map<std::string, GameAsset*> DefaultAssets;
|
std::map<std::string, GameAsset*> DefaultAssets;
|
||||||
|
std::vector<std::string> noArgs;
|
||||||
|
|
||||||
namespace SohImGui {
|
namespace SohImGui {
|
||||||
|
|
||||||
|
@ -753,6 +754,12 @@ namespace SohImGui {
|
||||||
ShowCursor(menu_bar, Dialogues::dMenubar);
|
ShowCursor(menu_bar, Dialogues::dMenubar);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((ImGui::IsKeyDown(ImGuiKey_LeftCtrl) ||
|
||||||
|
ImGui::IsKeyDown(ImGuiKey_RightCtrl)) &&
|
||||||
|
ImGui::IsKeyPressed(ImGuiKey_R, false)) {
|
||||||
|
console->Commands["reset"].handler(noArgs);
|
||||||
|
}
|
||||||
|
|
||||||
if (ImGui::BeginMenuBar()) {
|
if (ImGui::BeginMenuBar()) {
|
||||||
if (DefaultAssets.contains("Game_Icon")) {
|
if (DefaultAssets.contains("Game_Icon")) {
|
||||||
ImGui::SetCursorPos(ImVec2(5, 2.5f));
|
ImGui::SetCursorPos(ImVec2(5, 2.5f));
|
||||||
|
@ -760,12 +767,16 @@ namespace SohImGui {
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::SetCursorPos(ImVec2(25, 0));
|
ImGui::SetCursorPos(ImVec2(25, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ImGui::BeginMenu("Shipwright")) {
|
if (ImGui::BeginMenu("Shipwright")) {
|
||||||
if (ImGui::MenuItem("Reset")) {
|
if (ImGui::MenuItem("Reset",
|
||||||
// TODO: RESET FROM HERE
|
#if __APPLE__
|
||||||
}
|
"⌘ R"
|
||||||
if (ImGui::MenuItem("Exit")) {
|
#else
|
||||||
// TODO: EXIT FROM HERE
|
"Ctrl+R"
|
||||||
|
#endif
|
||||||
|
)) {
|
||||||
|
console->Commands["reset"].handler(noArgs);
|
||||||
}
|
}
|
||||||
ImGui::EndMenu();
|
ImGui::EndMenu();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue