keyboard
This commit is contained in:
parent
650ccf6ab4
commit
407c4f595d
1 changed files with 15 additions and 1 deletions
16
src/main.rs
16
src/main.rs
|
@ -81,7 +81,7 @@ fn main() {
|
|||
glTranslatef(0., 1.0, -1.0);
|
||||
if slices[i] != -1. {
|
||||
slices[i] += 0.01;
|
||||
slices[i] *= 1.4;
|
||||
slices[i] *= 1.2;
|
||||
glTranslatef(slices[i], 0.-slices[i]/2.0, 0.);
|
||||
}
|
||||
glScalef(1., 0.4, 1.);
|
||||
|
@ -95,6 +95,7 @@ fn main() {
|
|||
yrot += 24.0;
|
||||
};
|
||||
|
||||
maple::keyboard::kbd_init();
|
||||
|
||||
// Done setting up, now let's loop!
|
||||
loop {
|
||||
|
@ -110,6 +111,19 @@ fn main() {
|
|||
}
|
||||
});
|
||||
|
||||
match maple::keyboard::kbd_get_key() as u8 as char {
|
||||
'a' => {
|
||||
slices[0] = 0.0;
|
||||
}
|
||||
'b' => {
|
||||
slices[1] = 0.0;
|
||||
}
|
||||
'c' => {
|
||||
slices[2] = 0.0;
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
||||
|
||||
if done == true {
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue