How to add tool tip in Advisor or screen?

zx1111

Warlord
Joined
Oct 31, 2005
Messages
235
I am improving some in-game Advisor screens and I don't know how to add tooltip text on screen.
Tooltip mean the short (multi-line) text that pops up over screen (overlay transparently) when I hover mouse pointer over some Icon or Picture box.

I read Advisor python code line by line. But I can not find any portion that looks like code to add tooltip text to screen/label/icon/picturebox. ( ex: like Assets/python/screens/CvForeignAdvisor.py)

Please teach me how to add Tooltip by short python code sample or, at least, tell me which python file and where I should look into and study?

PS. And I'd like to know how to specify an action when the icon, picturebox, label is clicked..



.
 
There seems to be almost no reference to tooltips in the Python code. I have searched quite a bit, and found that all tooltip related texts are included in the central game code (EXE or DLL). The displayed text is in the XML file, but the composition of the tooltip is nowhere to be found in the Python code. This seems to be true for all tooltip code. So a lot of the good stuff for modification is hidden in parts that we cannot touch. Perhaps this will become available with the SDK, but I have no idea whether it will or not.
 
zx1111 said:
I am improving some in-game Advisor screens and I don't know how to add tooltip text on screen.
Tooltip mean the short (multi-line) text that pops up over screen (overlay transparently) when I hover mouse pointer over some Icon or Picture box.

I read Advisor python code line by line. But I can not find any portion that looks like code to add tooltip text to screen/label/icon/picturebox. ( ex: like Assets/python/screens/CvForeignAdvisor.py)

Please teach me how to add Tooltip by short python code sample or, at least, tell me which python file and where I should look into and study?

PS. And I'd like to know how to specify an action when the icon, picturebox, label is clicked..



.


I've looked over the code pretty extensively, and I'm 99.9% sure that the tooltips is being done in the C code AND there's no Python access to modifying it (that is no C function to call to access it in Python).

You CAN modify XML to change tooltips text and may even be able to add new XML code for new things in old categories, but as far as the cIV community knows (at least that I've been alerted to, somebody might be keeping secrets :crazyeye:), there's no way to alter it using Python.

Also, what do you mean about to specify an action when an icon, picturebox, or label is clicked? If you have a screen up already (e.g., Domestic Advisor), the update function of it is called when SPECIFIC things are changed. However, it varies depending on what is changed.

Could you give an example of what you want to do?

ED: for clarity

Req
 
Back
Top Bottom