Collection of custom reaper scripts
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

35 lines
1.1 KiB

-- Basic gui stuff by forum user "spk77": https://forum.cockos.com/showthread.php?t=161557
-----------------
-- Mouse table --
-----------------
local mouse = {
-- Constants
LB = 1,
RB = 2,
CTRL = 4,
SHIFT = 8,
ALT = 16,
-- "cap" function
cap = function (mask)
if mask == nil then
return gfx.mouse_cap end
return gfx.mouse_cap&mask == mask
end,
uptime = 0,
last_x = -1, last_y = -1,
dx = 0,
dy = 0,
ox_l = 0, oy_l = 0, -- left click positions
ox_r = 0, oy_r = 0, -- right click positions
capcnt = 0,
last_LMB_state = false,
last_RMB_state = false
}
return mouse