mirror of
https://github.com/Team-Resurgent/Nuklear-XboxOG.git
synced 2026-08-15 20:18:05 -07:00
added: has mouse
This commit is contained in:
@@ -136,6 +136,19 @@ void input_manager::process_keyboard()
|
||||
}
|
||||
}
|
||||
|
||||
bool input_manager::has_mouse(int port)
|
||||
{
|
||||
for (int i = 0; i < XGetPortCount(); i++)
|
||||
{
|
||||
if (port >= 0 && port != i || mMouseHandles[i] == NULL)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool input_manager::mouse_pressed(MOUSE_BUTTON button, int port)
|
||||
{
|
||||
for (int i = 0; i < XGetPortCount(); i++)
|
||||
|
||||
@@ -53,6 +53,7 @@ public:
|
||||
static void init();
|
||||
static void process_mouse();
|
||||
static void process_keyboard();
|
||||
static bool has_mouse(int port);
|
||||
static bool mouse_pressed(MOUSE_BUTTON button, int port);
|
||||
static bool try_get_mouse_state(int port, MouseState* mouseState);
|
||||
static bool try_get_keyboard_state(int port, KeyboardState* keyboardState);
|
||||
|
||||
@@ -59,8 +59,6 @@ void __cdecl main()
|
||||
nk_canvas canvas;
|
||||
canvas_begin(context, &canvas, 0, 0, 0, graphics::getWidth(), graphics::getHeight(), nk_rgb(250,250,250));
|
||||
{
|
||||
|
||||
|
||||
nk_fill_rect(canvas.painter, nk_rect(15,15,210,210), 5, nk_rgb(247, 230, 154));
|
||||
nk_fill_rect(canvas.painter, nk_rect(20,20,200,200), 5, nk_rgb(188, 174, 118));
|
||||
nk_draw_text(canvas.painter, nk_rect(30, 30, 150, 20), "Text to draw", 12, &font->handle, nk_rgb(188,174,118), nk_rgb(0,0,0));
|
||||
|
||||
Reference in New Issue
Block a user