Is it possible to update both Mixing Homie and Track Homie so that they open at the mouse cursor position even when the cursor is inside ReaImGui window?
https://forum.cockos.com/showpost.ph...6&postcount=64
For example, something like this for Item Homie
Code:
function GUI()
if not Key_held() then reaper.ImGui_DestroyContext(ctx) return end
if next(items) == nil then reaper.ImGui_DestroyContext(ctx) terminateScript = true return end
local vertical, horizontal = reaper.ImGui_GetMouseWheel(ctx)
--local tr_name = #items == 1 and buf or "MULTI-TR"
--reaper.ImGui_PushStyleColor(ctx, reaper.ImGui_Col_WindowBg(), rgba)
reaper.ImGui_PushFont(ctx, font)
local img_x, img_y = reaper.ImGui_PointConvertNative(ctx, reaper.GetMousePosition())
reaper.ImGui_SetNextWindowPos(ctx, img_x - 25, img_y - 65, reaper.ImGui_Cond_Once())
if reaper.ImGui_Begin(ctx, 'FADER', false, reaper.ImGui_WindowFlags_NoDecoration() | reaper.ImGui_WindowFlags_AlwaysAutoResize()) then
instead of this
Code:
local img_x, img_y = reaper.ImGui_PointConvertNative(ctx, reaper.GetMousePosition())
reaper.ImGui_SetNextWindowPos(ctx, img_x - 25, img_y - 65)
function GUI()
if not Key_held() then return end
if next(items) == nil then
terminateScript = true
return
end
local vertical, horizontal = reaper.ImGui_GetMouseWheel(ctx)
--local tr_name = #items == 1 and buf or "MULTI-TR"
--reaper.ImGui_PushStyleColor(ctx, reaper.ImGui_Col_WindowBg(), rgba)
reaper.ImGui_PushFont(ctx, font)
if reaper.ImGui_Begin(ctx, 'FADER', false, reaper.ImGui_WindowFlags_NoDecoration() | reaper.ImGui_WindowFlags_AlwaysAutoResize()) then
The same goes for Track Homie
Code:
function GUI()
if not Key_held() then
return
end
if next(tracks) == nil then
terminateScript = true
return
end
local vol = reaper.GetMediaTrackInfo_Value(tracks[1], 'D_VOL')
local rv, buf = reaper.GetTrackName(tracks[1])
local pan_mode = reaper.GetMediaTrackInfo_Value(tracks[1], "I_PANMODE")
local vertical, horizontal = reaper.ImGui_GetMouseWheel(ctx)
local tr_name = #tracks == 1 and buf or "MULTI-TR"
--reaper.ImGui_PushStyleColor(ctx, reaper.ImGui_Col_WindowBg(), rgba)
reaper.ImGui_PushFont(ctx, font)
local img_x, img_y = reaper.ImGui_PointConvertNative(ctx, reaper.GetMousePosition())
reaper.ImGui_SetNextWindowPos(ctx, img_x - 25, img_y - 65, reaper.ImGui_Cond_Once())