Announcement

Collapse
No announcement yet.

Tool Tip at Mouse

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Tool Tip at Mouse

    Well, I have been working on this but have finally hit a snag. I have it working where the help text area follows my mouse pointer. I even have it where it stops moving near the edge of the screen.

    The issue I am having is that only the game area text is showing up now and not button tool tips.

    Example:
    I hover over a grassland square - I get the grassland information in the text area.

    I hover ofer the End-Turn button - Blank Text area.

    I hover over the Resourse Indicator button (button above the mini map) - Blank Text area

    Any Ideas?
    you see that civ you beat up,
    yup, that's me!

  • #2
    what did you use, the mouse event handler in CvEventManager or that ScreenUtils interface?

    Comment


    • #3
      I used a copy of CvMainInterface.py.

      If you look through it you will see "screen.setHelpTextArea( ... )" in a few places. I copied that logic into the "update" function (look at bottom of file). I then added the CyInterface().getMousePos().x and CyInterface().getMousePos().y variables (and logic to keep it on the screen) to the same function.
      you see that civ you beat up,
      yup, that's me!

      Comment


      • #4
        Is it at all possible that in the case of those button tool tips you're overwriting what should be in the tool tip with empty text?

        Comment


        • #5
          I thought that may be the case but was unable to findout where/when that would be happening. In the "updateHelpTextStrings" function there is a condition where it updates the string with "" but I have tried commenting out that condition leaving only the function that puts a string in and there is no change.
          you see that civ you beat up,
          yup, that's me!

          Comment


          • #6
            Originally posted by weakciv
            I thought that may be the case but was unable to findout where/when that would be happening. In the "updateHelpTextStrings" function there is a condition where it updates the string with "" but I have tried commenting out that condition leaving only the function that puts a string in and there is no change.
            Where is this updateHelpTextStrings function? I can't find that one

            Comment


            • #7
              the function is in CyGInterfaceScreen (or was it CyGScreenInterface). Anyway, it is not a module we have direct access to. I believe it is unpacked into memory from one of the core .dll files.

              It is used throughout the CvMainInterface module.
              you see that civ you beat up,
              yup, that's me!

              Comment


              • #8
                Ah, no wonder why I couldn't find it- I was searching for it in all the .py files on disk.

                So you can actually get the source of those files? Wow please do tell! That right there would be the greatest reference for modding civ4 !

                Comment


                • #9
                  nope. I do not have the ability to view the source. I found the information about it using the API that is posted both here and on CivFanatics.

                  I think Locutus is the one who posted it.
                  you see that civ you beat up,
                  yup, that's me!

                  Comment


                  • #10
                    here is the link to his post
                    you see that civ you beat up,
                    yup, that's me!

                    Comment


                    • #11
                      Yeah I've used that API reference before but it only shows the method signatures as far as I knew... I thought there was a way to see the source of those files which was getting me excited

                      Comment


                      • #12
                        OH i forgot. I also used the code change that prints out a bunch of functions. let me find the link.
                        you see that civ you beat up,
                        yup, that's me!

                        Comment


                        • #13
                          over at civfanatics
                          ummm... the link isn't working. :( Thats funny, its working for me... Maybe the server was temporarily down.
                          Last edited by weakciv; November 7, 2005, 15:22.
                          you see that civ you beat up,
                          yup, that's me!

                          Comment


                          • #14
                            Originally posted by weakciv
                            over at civfanatics
                            http://apolyton.net/forums/showthrea...hreadid=140611
                            that's the same thread you posted above!

                            Comment


                            • #15
                              sorry edited now.
                              you see that civ you beat up,
                              yup, that's me!

                              Comment

                              Working...
                              X