// Resources Used
BMAP* bHudCursor = "resources/tga/cursor.tga";
BMAP* bHudCursorDown = "resources/tga/cursor_down.tga";
function createMouse()
{
// Mouse Mode
// 0 None Visible
// 1 Visible, Controllable
// 2 Visible, Not Controllable
mouse_mode = 2;
mouse_map = bHudCursor; // Image for the cursor to use
mouse_spot.x = 1; // make the tip of the arrow pointer the hot spot area
mouse_spot.y = 1; // (1, 1 on the mouse pointer bitmap)
}
function updateMouse()
{
// Check If Mouse Button Has Been Clicked
// If So Then Change The Mouse Map
if (mouse_left == 1 || mouse_right == 1 || mouse_middle == 1)
{
mouse_map = bHudCursorDown; // Active Cursor (clicked)
if (mouse_ent != player && mouse_middle)
{
ptr_remove(mouse_ent);
}
}
else
{
mouse_map = bHudCursor; // Normal Cursor
}
// Update the position of the cursor
vec_set(mouse_pos, mouse_cursor);
}