more keys
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@267 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
parent
6979c9dcbd
commit
927f9577ca
7 changed files with 38 additions and 1 deletions
|
|
@ -9,6 +9,7 @@ static void draw(void);
|
|||
static void idle(void);
|
||||
static void reshape(int width, int height);
|
||||
static void init(void);
|
||||
static void key(int k);
|
||||
|
||||
static void tick(MwWidget handle, void* user, void* client) {
|
||||
(void)handle;
|
||||
|
|
@ -39,6 +40,10 @@ static void resize(MwWidget handle, void* user, void* client) {
|
|||
reshape(ww, wh);
|
||||
}
|
||||
|
||||
static void key_pressed(MwWidget handle, void* user, void* client) {
|
||||
key(*(int*)client);
|
||||
}
|
||||
|
||||
int main() {
|
||||
MwWidget window;
|
||||
|
||||
|
|
@ -55,5 +60,7 @@ int main() {
|
|||
MwAddUserHandler(window, MwNresizeHandler, resize, NULL);
|
||||
MwAddUserHandler(window, MwNtickHandler, tick, NULL);
|
||||
|
||||
MwAddUserHandler(opengl, MwNkeyHandler, key_pressed, NULL);
|
||||
|
||||
MwLoop(window);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue