Advertisement
Civilization Fanatics' Center  

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.

Go Back   Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization

Notices

Reply
 
Thread Tools
Old Nov 26, 2005, 06:46 PM   #1
zx1111
Warlord
 
zx1111's Avatar
 
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.
zx1111 is offline   Reply With Quote
Old Dec 04, 2005, 03:55 AM   #2
Mercade
the Counsellor
 
Mercade's Avatar
 
Join Date: Nov 2002
Location: The Netherlands
Posts: 2,444
Images: 3
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.
Mercade is offline   Reply With Quote
Old Dec 04, 2005, 04:21 AM   #3
Requies
Prince
 
Join Date: Nov 2005
Posts: 381
Quote:
Originally Posted by zx1111
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 ), 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
Requies is offline   Reply With Quote
Reply

Bookmarks

Go Back Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization > How to add tool tip in Advisor or screen?

Thread Tools

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


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


Advertisement

All times are GMT -6. The time now is 11:46 PM.


Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
This site is copyright © Civilization Fanatics' Center.
Support CFC: Amazon.com | Amazon UK | Amazon DE | Amazon CA | Amazon FR