mirror of
https://github.com/nishiowo/nishbox
synced 2025-04-21 20:24:39 +00:00
mouse works on windows
This commit is contained in:
parent
432874d09b
commit
a9cfcbef2b
@ -1,5 +1,6 @@
|
|||||||
#define GF_EXPOSE_DRAW_PLATFORM
|
#define GF_EXPOSE_DRAW_PLATFORM
|
||||||
#define GF_EXPOSE_DRAW
|
#define GF_EXPOSE_DRAW
|
||||||
|
#define GF_EXPOSE_INPUT
|
||||||
|
|
||||||
#include <gf_pre.h>
|
#include <gf_pre.h>
|
||||||
|
|
||||||
@ -13,6 +14,7 @@
|
|||||||
#include <gf_draw_driver.h>
|
#include <gf_draw_driver.h>
|
||||||
#include <gf_log.h>
|
#include <gf_log.h>
|
||||||
#include <gf_draw.h>
|
#include <gf_draw.h>
|
||||||
|
#include <gf_input.h>
|
||||||
|
|
||||||
/* Standard */
|
/* Standard */
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -40,6 +42,12 @@ LRESULT CALLBACK gf_draw_platform_proc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp
|
|||||||
gf_draw_reshape(draw);
|
gf_draw_reshape(draw);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case WM_MOUSEMOVE:
|
||||||
|
if(draw->input != NULL) {
|
||||||
|
draw->input->mouse_x = LOWORD(lp);
|
||||||
|
draw->input->mouse_y = HIWORD(lp);
|
||||||
|
}
|
||||||
|
break;
|
||||||
case WM_CLOSE:
|
case WM_CLOSE:
|
||||||
draw->close = 1;
|
draw->close = 1;
|
||||||
break;
|
break;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#define GF_EXPOSE_DRAW_PLATFORM
|
#define GF_EXPOSE_DRAW_PLATFORM
|
||||||
#define GF_EXPOSE_DRAW
|
#define GF_EXPOSE_DRAW
|
||||||
|
#define GF_EXPOSE_INPUT
|
||||||
|
|
||||||
#include <gf_pre.h>
|
#include <gf_pre.h>
|
||||||
|
|
||||||
@ -13,6 +14,7 @@
|
|||||||
#include <gf_draw_driver.h>
|
#include <gf_draw_driver.h>
|
||||||
#include <gf_log.h>
|
#include <gf_log.h>
|
||||||
#include <gf_draw.h>
|
#include <gf_draw.h>
|
||||||
|
#include <gf_input.h>
|
||||||
|
|
||||||
/* Standard */
|
/* Standard */
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -46,6 +48,12 @@ LRESULT CALLBACK gf_draw_platform_proc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp
|
|||||||
gf_draw_reshape(draw);
|
gf_draw_reshape(draw);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case WM_MOUSEMOVE:
|
||||||
|
if(draw->input != NULL) {
|
||||||
|
draw->input->mouse_x = LOWORD(lp);
|
||||||
|
draw->input->mouse_y = HIWORD(lp);
|
||||||
|
}
|
||||||
|
break;
|
||||||
case WM_CLOSE:
|
case WM_CLOSE:
|
||||||
draw->close = 1;
|
draw->close = 1;
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user