Skip to content

Commit

Permalink
working read-only text input..
Browse files Browse the repository at this point in the history
  • Loading branch information
Zusier committed Jan 30, 2022
1 parent 98fca2b commit f45c6ac
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions gameutil-rs/src/gui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,10 @@ mod app_gui {
sys::taskkill("explorer.exe");
}
if ui.timerresval.text().parse::<u32>().unwrap() != 0 {
//timerresval_copy = ui.timerresval.text().parse::<u32>().unwrap();
sys::timerres(
//timerresval_copy,
ui.timerresval.text().parse::<u32>().unwrap(),
);
ui.timerresval.set_readonly(true);
}
} else {
// rename button to Start
Expand All @@ -134,6 +133,7 @@ mod app_gui {
} else {
sys::startproc("explorer.exe");
}
ui.timerresval.set_readonly(false);
// change for button implementation
}
}
Expand Down Expand Up @@ -162,10 +162,6 @@ mod app_gui {
}
E::OnTextInput => {
if handle == ui.timerresval {
/*if ui.start_button.text() == "Restore" {
ui.timerresval.set_text(&timerresval_copy.to_string());
}
*/
// make sure numbers only
#[allow(unused_variables)]
// don't check for incorrect types if input is empty
Expand Down

0 comments on commit f45c6ac

Please sign in to comment.