x to farlook, now playable with 0 mouse input

This commit is contained in:
Llywelwyn 2023-08-30 03:13:46 +01:00
parent 81a48d5a6e
commit 7da00ed2b1
5 changed files with 82 additions and 4 deletions

View file

@ -78,6 +78,10 @@ pub enum RunState {
cursed: bool,
}, // Animates magic mapping effect
MapGeneration,
Farlook {
x: i32,
y: i32,
},
}
pub struct State {
@ -286,6 +290,17 @@ impl GameState for State {
}
}
}
RunState::Farlook { .. } => {
let result = gui::show_farlook(self, ctx);
match result {
gui::FarlookResult::NoResponse { x, y } => {
new_runstate = RunState::Farlook { x, y };
}
gui::FarlookResult::Cancel => {
new_runstate = RunState::AwaitingInput;
}
}
}
RunState::ShowCheatMenu => {
let result = gui::show_cheat_menu(self, ctx);
match result {