Old 01-17-2019, 10:32 AM   #1
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default Tooltip to show item name?

When having a lot of tracks at a very small size, a project can get very confusing and item names are hidden. Is there a way to show the name of a hovered item as tooltip?
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Old 01-17-2019, 04:34 PM   #2
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
Default

Be surprised if someone hasn't done it already, but here's a quick try at it,..

EDIT GetActiveTake is probably wrong, I was only testing with single take items.

Code:
local counter = 0

function Main()
  if counter >= 10 then
    counter = 0
    local window, segment, details = reaper.BR_GetMouseCursorContext()
    if details == "item" then
      local item = reaper.BR_GetMouseCursorContext_Item() 
      if item then
        local take = reaper.GetActiveTake(item) 
        local _, name = reaper.GetSetMediaItemTakeInfo_String(take, "P_NAME", "", false) 
        local x,y = reaper.GetMousePosition()
        reaper.TrackCtl_SetToolTip(name, x+8, y-8, true)
      end
    else
      reaper.TrackCtl_SetToolTip("",0,0,false)   
    end 
  end
  counter = counter + 1
  reaper.defer(Main)
end

Main()

Last edited by Edgemeal; 01-17-2019 at 04:42 PM.
Edgemeal is offline   Reply With Quote
Old 01-17-2019, 06:17 PM   #3
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default

Completely forgot about the tooltip function, thanks Edgemeal!

Now, if we only could have this natively (a delayed tooltip, showing the position and goes away when clicking).

Not a huge fan of defer functions. I mean, I'm glad we have them. But I experienced strange and unpredictable things with them on heavy projects and / or if you stack too many of them.
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Old 01-18-2019, 12:58 AM   #4
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
Default

+1 for native everything!

I don't run any defer loop scripts, except one I recently made but only used when in stop mode anyway, but ya its nice to have.

Coding scripts has become addictive, lately if I'm not coding in VS I'm coding in ReaScript.
Edgemeal is offline   Reply With Quote
Old 01-18-2019, 06:45 PM   #5
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default

I hear ya! I wish I could continue to finish some of my scripts. But work calls, so I need to make a temporary break.
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Old 01-18-2019, 07:23 PM   #6
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

Quote:
Originally Posted by _Stevie_ View Post
When having a lot of tracks at a very small size, a project can get very confusing and item names are hidden. Is there a way to show the name of a hovered item as tooltip?
Hm, yeah, I agree with that, but never really looked into it until now. It looks like you can set the little area below the TCP to show "selected track/item/envelope details" (Right click menu there). Apparently, it shows the name of the last one that was left clicked (including Modifier+Click) ...
FnA is offline   Reply With Quote
Old 01-18-2019, 07:31 PM   #7
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default

Yeah, that's pretty cool, never noticed.
But the font is so small, it's barely readable on my monitor, plus you have to
look down all the time. A tooltip would make things definitely easier.
The funny thing, it's already there... When you hover that lower area, after some time a tooltip appears. Exactly the one, that should appear next to the mouse cursor
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Old 01-18-2019, 07:48 PM   #8
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

I'm not 100% sure that an item hover tooltip would not get in my way. Maybe it would be ok, or nice. (It looks like, judging by Preferences/Apppearances page, that they *may* have put some consideration of that into their decisions already)

But I HAVE, for as long as I can remember, had the editing tooltip enabled, and it has never bothered me. It seems that, if item name is not showing because item is too small, the editing tooltip could show the name as well, at least.
FnA is offline   Reply With Quote
Old 01-18-2019, 08:07 PM   #9
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default

Yeah, I cannot say if it will annoy me either. But I don't see any other way to get a grip of which item I'm just hovering :P

__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Old 12-21-2020, 10:07 AM   #10
DarrenH
Human being with feelings
 
Join Date: Mar 2014
Posts: 347
Default

Thanks Edgemeal...so where does this script go exactly so that it runs all the time?

Last edited by DarrenH; 12-21-2020 at 10:18 AM.
DarrenH is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 06:07 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.