View Single Post
Old 01-10-2020, 06:09 AM   #893
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 2,819
Default

I cannot draw anything, even with manually entering coordinates...

Code:
track_window = reaper.JS_Window_FindChildByID(reaper.GetMainHwnd(), 0x3E8) -- all platforms
function Element:draw()
  reaper.JS_Composite(track_window, 400, 400, 400, 400, self.bm, 0, 0, 1, 1)
  refresh_reaper()
end
This modification works on windows so I assume it will also work with other platforms but I still cannot draw anything on OSX

Code:
track_window = reaper.JS_Window_FindChildByID(reaper.GetMainHwnd(), 0x3E8) -- all platforms
function Element:draw()
  local cx,cy = reaper.JS_Window_ScreenToClient(track_window,self.x,self.y)
  reaper.JS_Composite(track_window, cx, cy, self.w, self.h, self.bm, 0, 0, 1, 1)
  refresh_reaper()
end
Its drawing INVISIBLE areas and it collects all the data from it correctly. So everything works except drawing (ATM at least) regarding data.
Still not sure why I do not get any response from Keyboard. Does OSX need any addition in order for JS_VKeys_GetState to work?

Last edited by Sexan; 01-10-2020 at 06:15 AM.
Sexan is offline   Reply With Quote