readme on install for debian

master
bel 2023-03-22 18:40:30 -06:00
parent 41962fd914
commit cc7329f6e4
2 changed files with 7 additions and 5 deletions

BIN
src/.gui.rs.swp Normal file

Binary file not shown.

View File

@ -11,7 +11,7 @@ pub fn main() -> iced::Result {
struct Main {
ntfy: String,
configuring: bool,
configuring: Option<&char>,
inputs: Inputs,
}
@ -60,7 +60,7 @@ impl Application for Main {
fn new(_flags: ()) -> (Self, Command<Message>) {
return (Self {
ntfy: String::from(":wave:"),
configuring: false,
configuring: None,
inputs: Inputs{
stick: Stick {
up: 'w',
@ -84,7 +84,7 @@ impl Application for Main {
fn update(&mut self, msg: Message) -> Command<Message> {
match msg {
Message::EventOccurred(event) if self.configuring => {
Message::EventOccurred(event) if self.configuring.is_some() => {
match event {
iced::event::Event::Keyboard(keyboard::Event::KeyPressed{
key_code,
@ -92,14 +92,16 @@ impl Application for Main {
..
}) => {
self.ntfy = format!("would set {:?}", key_code);
self.configuring = false;
self.configuring = None;
},
_ => {},
}
},
Message::EventOccurred(event) if ! self.configuring => {},
_ => {
self.configuring = true;
self.configuring = Some(match event {
_ => None,
});
self.ntfy = format!("push a key to bind to {:?}", msg);
},
}