tools.cpp 1.1 KB

1234567891011121314151617181920212223
  1. ToolsMenu::ToolsMenu(MenuBar* parent) : Menu(parent) {
  2. setText("Tools");
  3. saveStateMenu.setText("Save State");
  4. saveState1.setText("Slot 1").onActivate([&] { emulator.saveState(1); });
  5. saveState2.setText("Slot 2").onActivate([&] { emulator.saveState(2); });
  6. saveState3.setText("Slot 3").onActivate([&] { emulator.saveState(3); });
  7. saveState4.setText("Slot 4").onActivate([&] { emulator.saveState(4); });
  8. saveState5.setText("Slot 5").onActivate([&] { emulator.saveState(5); });
  9. loadStateMenu.setText("Load State");
  10. loadState1.setText("Slot 1").onActivate([&] { emulator.loadState(1); });
  11. loadState2.setText("Slot 2").onActivate([&] { emulator.loadState(2); });
  12. loadState3.setText("Slot 3").onActivate([&] { emulator.loadState(3); });
  13. loadState4.setText("Slot 4").onActivate([&] { emulator.loadState(4); });
  14. loadState5.setText("Slot 5").onActivate([&] { emulator.loadState(5); });
  15. captureScreenshot.setIcon(Icon::Emblem::Image).setText("Capture Screenshot").onActivate([&] {
  16. emulator.requests.captureScreenshot = true;
  17. });
  18. pauseEmulation.setText("Pause Emulation");
  19. }