Under Construction : Tool Tip at Mouse

weakciv

Prince
Joined
Jul 15, 2005
Messages
469
Location
-1, -4
Ok I have been working on this through a few different posts and topics. This is my Official "I'm working on this" thread. I will post about the progress of it here from now on.

I have got to the point where I have the Help Text Area following my mouse pointer. However I have an issue I cant get resolved. All tile related information (ie. food/production/commerse, Units in the tile, City information) all show up fine in the the Help Text Area. The text that is not showing up is Button related. For example, End Turn button, Civ Score hover, Advisor buttons, etc.

Any Ideas?
 
I will post what I have so far when I get home. I am not specificly adding anything to the tool tip. Just where it is being displayed. The mouse over information that is currently in the lower left is what I am moving.
 
Sorry, I had some RL issues last night.

Briefly what I have done is copy the "screen.setHelpTextArea( ... )" line and moved it into the "update(self):" function of CvMainInterface. This is not my final solution because I will change it to be an extended function of CvMainInterface. This is used just to get it working.

The code I have looks similar to this (I dont remember all the args in the help text function):
Code:
def update(self):
   screen = CyGInterfaceScreen( "MainInterface" , CvScreenEnums.MAIN_INTERFACE )

   Mx = CyInterface().getMousePos().x
   My = CyInterface().getMousePos().y

   screen.setHelpTextArea( fwidth, small_font, Mx, My, -0.1, ... )
   self.updateHelpTextStrings()

There is also logic that I did not type above to keep the text area on the screen when you get near the edges. The self.updateHelpTextStrings() updates the mouse-over information for the unit/city/land spaces but not for interface items (buttons, score detail, etc).
 
ok i am still rather stumped on this one. I get the border/background of the HelpTextArea when I mouse over a worker action/promotion/mini map button/advisor button but I get no text. However I can mouse over a peak/plain/hill/cow and get the correct help text.
 
Back
Top Bottom