Thread: Radial Menu
View Single Post
Old 01-21-2017, 11:24 AM   #38
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 4,591
Default

the volume thing... cant figure it out :
Code:
  if hold == true then
    local tr = reaper.GetSelectedTrack(0,0)
    cur_vol = reaper.GetMediaTrackInfo_Value(tr,"D_VOL")
    mx, my = reaper.GetMousePosition()
    cur_pos = my - ly     -- ly is last reaper.GetMousePosition() so it starts counting from 0
  end
this code is triggerd when left click is hold, now what I cant figure out how to move fader relative to this possition, or how to translate pixel to fader movement. Every time this code is called the mouse position is 0 and from there it should move fader from what ever position it is

Last edited by Sexan; 01-21-2017 at 12:49 PM.
Sexan is online now   Reply With Quote