Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Miniwindows ➜ "hyperlink" variable strings in mw?

"hyperlink" variable strings in mw?

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Sgbarter   (6 posts)  Bio
Date Sun 31 Aug 2008 02:22 AM (UTC)
Message
Thanks to some help from people here I have made a miniwindow that grabs quest information. It's very similar to the one Nick made (for Aardwolf) but it cuts up the display and does it like this:

Quest Mob: smelly mutt
Room name: The dawg house
Area name: Pet Store

My next idea was to do hotspots for certain words, for example if I click on the name of the area it could try to run to that area, or use a portal. Or click on the mob's name to hunt to the mob. My understanding of hotspots is that it can only be given to a fixed position, and since the area name (or other variables) will change I can't figure out how to do this?
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #1 on Sun 31 Aug 2008 03:16 AM (UTC)
Message
It certainly can be done, I am working on something that makes hyperlinks on text in arbitrary positions.

Basically, when you do WindowText you must know the x and y position of the text.

The WindowText function returns the length, so you now know the finishing x position (by adding to the start x position).

Then WindowFontInfo (fontid, 1) returns the height, so you know the depth - add that to the y position to get the ending y position. Put that all together and you have the rectangle for the hotspot.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


11,317 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.