| General | Hosted Sites | Civ5 | CivRev | Civ4Col | Civ4 | Civ3 | Civ2 | Civ1 | Misc | Marketplace |
![]() |
|
|
Welcome to Civilization Fanatics' Center. You are currently viewing our site as a guest which gives you limited access to our site features. By joining our free community, you will be able to participate in the discussions, search the forum, send private messages, vote in polls, upload your own screenshots to the gallery, and access many other special features. Registration is fast, simple and absolutely free, so sign up today! If you have any problems with the registration process or your account login, please contact support. |
|
|||||||
![]() |
|
|
Thread Tools |
|
|
#1 |
|
Warlord
Join Date: Oct 2005
Posts: 235
|
How to add tool tip in Advisor or screen?
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.. . Last edited by zx1111; Nov 26, 2005 at 07:10 PM. |
|
|
|
|
|
#2 |
|
the Counsellor
|
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.
|
|
|
|
|
|
#3 | |
|
Prince
Join Date: Nov 2005
Posts: 381
|
Quote:
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 ), 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 |
|
|
|
|
![]() |
| Bookmarks |
|
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| getting to city screen from domestic advisor screen | shay1680 | Civ4 - General Discussions | 4 | Nov 25, 2005 08:09 PM |
| Under Construction : Tool Tip at Mouse | weakciv | Civ4 - Creation & Customization | 4 | Nov 12, 2005 06:29 AM |
| Weird Advisor Screen | dojoboy | Civ3 - Macintosh | 2 | Jan 29, 2003 04:47 PM |
| A tip for when you add beyond 16 civs | dannyevilcat | Civ3 - Creation & Customization | 0 | Sep 20, 2002 01:30 AM |
| Advisor Screen | Zidane | Civ3 - General Discussions | 1 | May 29, 2002 07:09 PM |