input_events: Show mouse point on mouse button pressed
This commit is contained in:
parent
fa8bf266f0
commit
cc79a85e3d
@ -66,10 +66,13 @@ char_input(struct mfb_window *window, unsigned int charCode) {
|
||||
void
|
||||
mouse_btn(struct mfb_window *window, mfb_mouse_button button, mfb_key_mod mod, bool isPressed) {
|
||||
const char *window_title = "";
|
||||
int x, y;
|
||||
if(window) {
|
||||
window_title = (const char *) mfb_get_user_data(window);
|
||||
}
|
||||
fprintf(stdout, "%s > mouse_btn: button: %d (pressed: %d) [key_mod: %x]\n", window_title, button, isPressed, mod);
|
||||
x = mfb_get_mouse_x(window);
|
||||
y = mfb_get_mouse_y(window);
|
||||
fprintf(stdout, "%s > mouse_btn: button: %d (pressed: %d) (at: %d, %d) [key_mod: %x]\n", window_title, button, isPressed, x, y, mod);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -60,11 +60,15 @@ public:
|
||||
}
|
||||
|
||||
void mouse_btn(struct mfb_window *window, mfb_mouse_button button, mfb_key_mod mod, bool isPressed) {
|
||||
const char *window_title = "";
|
||||
const char *window_title = "";
|
||||
int x, y;
|
||||
|
||||
if(window) {
|
||||
window_title = (const char *) mfb_get_user_data(window);
|
||||
}
|
||||
fprintf(stdout, "%s > mouse_btn: button: %d (pressed: %d) [key_mod: %x]\n", window_title, button, isPressed, mod);
|
||||
x = mfb_get_mouse_x(window);
|
||||
y = mfb_get_mouse_y(window);
|
||||
fprintf(stdout, "%s > mouse_btn: button: %d (pressed: %d) (at: %d, %d) [key_mod: %x]\n", window_title, button, isPressed, x, y, mod);
|
||||
}
|
||||
|
||||
void mouse_move(struct mfb_window *window, int x, int y) {
|
||||
|
Loading…
Reference in New Issue
Block a user