Implement frame advance
This commit is contained in:
@@ -86,6 +86,7 @@ impl GameWindow {
|
||||
let is_ready = self.client.sim_state(self.sim_id) == SimState::Ready;
|
||||
let can_pause = is_ready && state == EmulatorState::Running;
|
||||
let can_resume = is_ready && state == EmulatorState::Paused;
|
||||
let can_frame_advance = is_ready && state != EmulatorState::Debugging;
|
||||
if state == EmulatorState::Running {
|
||||
if ui.add_enabled(can_pause, Button::new("Pause")).clicked() {
|
||||
self.client.send_command(EmulatorCommand::Pause);
|
||||
@@ -100,6 +101,14 @@ impl GameWindow {
|
||||
.send_command(EmulatorCommand::Reset(self.sim_id));
|
||||
ui.close_menu();
|
||||
}
|
||||
ui.separator();
|
||||
if ui
|
||||
.add_enabled(can_frame_advance, Button::new("Frame Advance"))
|
||||
.clicked()
|
||||
{
|
||||
self.client.send_command(EmulatorCommand::FrameAdvance);
|
||||
ui.close_menu();
|
||||
}
|
||||
});
|
||||
ui.menu_button("Options", |ui| self.show_options_menu(ctx, ui));
|
||||
ui.menu_button("Multiplayer", |ui| {
|
||||
|
||||
Reference in New Issue
Block a user