Frontend: Popup menu for load state in powered-off state

This commit is contained in:
Connor McLaughlin 2019-10-21 00:38:20 +10:00
parent 6c73dc6efb
commit e0173cbb4d

View file

@ -733,7 +733,17 @@ void SDLInterface::DrawPoweredOffWindow()
ImGui::NewLine(); ImGui::NewLine();
ImGui::SetCursorPosX(button_left); ImGui::SetCursorPosX(button_left);
ImGui::Button("Load State", button_size); if (ImGui::Button("Load State", button_size))
ImGui::OpenPopup("PowerOffWindow_LoadStateMenu");
if (ImGui::BeginPopup("PowerOffWindow_LoadStateMenu"))
{
for (u32 i = 1; i <= NUM_QUICK_SAVE_STATES; i++)
{
if (ImGui::MenuItem(TinyString::FromFormat("State %u", i).GetCharArray()))
DoLoadState(i);
}
ImGui::EndPopup();
}
ImGui::NewLine(); ImGui::NewLine();
ImGui::SetCursorPosX(button_left); ImGui::SetCursorPosX(button_left);