x to farlook, now playable with 0 mouse input
This commit is contained in:
parent
81a48d5a6e
commit
7da00ed2b1
5 changed files with 82 additions and 4 deletions
15
src/main.rs
15
src/main.rs
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue