demo: hook up menu mouse support #309

This commit is contained in:
nick black 2020-03-03 00:02:18 -05:00
parent 6690bc6bb9
commit 6966632821
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -97,6 +97,10 @@ ultramegaok_demo(void* vnc){
if(id == 0){
continue;
}
// if this was about the menu or HUD, pass to them, and continue
if(menu_or_hud_key(nc, &ni)){
continue;
}
if(nckey_mouse_p(ni.id)){
if(handle_mouse(&ni)){
continue;
@ -108,10 +112,6 @@ ultramegaok_demo(void* vnc){
unlock_demo_render();
continue;
}
// if this was about the menu or HUD, pass to them, and continue
if(menu_or_hud_key(nc, &ni)){
continue;
}
// go ahead and pass keyboard through to demo, even if it was a 'q'
// (this might cause the demo to exit immediately, as is desired)
pass_along(&ni);