- Home /
How to add intermediate tooltip to GUI button?
I want my tooltips like they are here. Just like the instant tooltip with that border. Additionally, how could I customise my tooltip windows to have different colours and kinds of borders? I'm also interested in how to do text modification like in the 3rd button tooltip with bold and colours.
I'm trying to figure out the correct code (C#) since I've seen on the web that tooltips are created with 2 lines. One for the button and one for the GUI label. The problem is I use one of these lines in my set of if-statements when checking if the button is pressed/clicked.
I'm looking for an elegant approach/code that lets me create and display the GUI button tooltip but ideally not having to repeat the GUI.button call in my if-statements.
Anyone is welcome to ask me questions so I can clarify things and we can reach the better solution.
Thanks.
there's nothing overly complicated in there. look at http://docs.unity3d.com/ScriptReference/GUIStyle-richText.html to be able to specify colors, bold, etc.
it's using an image (for the surrounding box) as another piece of GUIContent
maybe trying reaching out to the author of that example to see if he's interested in sharing his code...
Your answer
Follow this Question
Related Questions
Generating tooltips for multiple buttons. 1 Answer
How to assign a different tooltip to each GUI button? 0 Answers
GUI Button Question 3 Answers
Why is a tooltip ignoring a Rect and not another? 1 Answer
Tooltip does not show 1 Answer