How to change what the built in tool tip looks like

So I have a top bar in my game that I want when you hover over any of the currencies you have a tooltip shows up with the expanded number as for space it gets abbreviated at a certain size. I’m using this tool tip text variable and setting it in code. But the tooltip that appears looks very standard and generic. Is there a way for me to customize it? I’ve looked and anything close is in UE4 and the tool tip widget select in the first screenshot is grayed out and deprecated it seems in UE5. I’ve tried using the SetToolTip function call to change it but that doesn’t seem to be working or I am missing a step. Thank you for any help provided!


image

Hey @dig_sydney! Welcome to the forums!

I found another thread where others were having issues with this as well, and they came up with a few different ways to do it these days. Make sure to read the whole thread first as there are some refinements to the process over time!

Hope this helps!

I did find that thread but wasn’t quite getting was happening. So was looking at it again and trying to see if I could get it, and I was able to figure it out so thank you for pointing me back to that.

But what I did to fix it was I had

UToolTipBase* NewToolTip = CreateWidget<UToolTipBase>(this, ToolTipWidgetClass);

In a separate location than where I was setting the text with

ResourceValue_TB->GetParent()->SetToolTipText(FText::AsNumber(Resource.Quantity));

And that setting of the text was resetting the tooltip back to generic one. So I instead combined that to all be in one location and set the text through a class I made for the tool tip itself rather than setting it with SetToolTipText()

UToolTipBase* NewToolTip = CreateWidget<UToolTipBase>(this, ToolTipWidgetClass);
NewToolTip->SetTipText(FText::AsNumber(Resource.Quantity));
ResourceValue_TB->GetParent()->SetToolTip(NewToolTip);