Menu issue

Posted by ForgottenMUD on Mon 08 Oct 2012 09:50 PM — 12 posts, 54,156 views.

Belgium #0
Am I doing something wrong?

If there's a menu, I can only right click at the beginning of the word, or it will display the generic menu with "Copy", "Copy as HTML", etc. It gets annoying because half of the time, I don't click at the right spot.

Screenshot: http://img689.imageshack.us/img689/585/menuissue.jpg
Australia Forum Administrator #1
Template:version
Please help us by advising the version of MUSHclient you are using. Use the Help menu -> About MUSHclient.


What MUD is this?
Belgium #2
I'm using the latest version, 4.73, and the MUD is a custom codebase.

After further investigation, I have found that this issue was caused by the TextRectangle method in a script which moves the displayed text to the right.

It appears that the length of the part of the word that I can't click (at the end of the word) is the same as the Left value set in TextRectangle. If Left = 0 then I can click the whole word, and if it's a high value (like 500) I can't click the word anywhere.
Australia Forum Administrator #3
So, problem solved? The text and its underlying hotspot (hyperlink) are two different things. If you move the text to the right the hyperlink (hotspot) has to move too.
USA Global Moderator #4
I just want to point out that 4.73 is not the latest version.
USA #5
Fiendish said:
I just want to point out that 4.73 is not the latest version.

New versions are announced on the forums. The latest version (4.84) can be found here: http://www.gammon.com.au/forum/?id=11804 . The main product page usually lags behind by several versions.
Australia Forum Administrator #6
Fixed downloads page to have 4.84 on it.
Belgium #7
Problem not solved.

1) I really hate to ask dumb questions, but I can't find the name of the main window (also referred to as output window, main output window, main scrolling output window) which I need to use WindowHotspotList and WindowMoveHotspot to move the hotspots. The function WindowList lists all mini-windows but not the main window.

2) I can right click single links from a <send> command (which are basically menus with one item) anywhere that I want, hence their hotspots appear to be moved automatically with TextRectangle.

3) Same behaviour with version 4.84.
Amended on Wed 10 Oct 2012 07:11 PM by ForgottenMUD
Australia Forum Administrator #8
Er, these menus belong to a miniwindow don't they? Not the main window? The main window isn't addressable like that, it doesn't have hotspots.

I thought Fiendish uses TextRectangle, and hyperlinks and doesn't have these problems.

TextRectangle moves where the text is displayed, it shouldn't affect hotspots in miniwindows, at least I don't think so.
Australia Forum Administrator #9
LordOwl said:

After further investigation, I have found that this issue was caused by the TextRectangle method in a script which moves the displayed text to the right.


You are asking us to debug a script which you haven't shown us.
Belgium #10
These menus are actually in the main window. The following script creates the issue as shown in the screenshot above:


function create_rectangle ()

TextRectangle(50,   -- left
              100,  -- top
              50 + GetInfo (213) * 80, -- 50 + width for 80 characters
              -100,  -- 100 pixels from the bottom
              5,  -- BorderOffset, 
              ColourNameToRGB ("gray"),    -- BorderColour, 
              2,  -- BorderWidth, 
              ColourNameToRGB ("silver"),  -- OutsideFillColour, 
              8) -- OutsideFillStyle (fine hatch)

end

function OnPluginWorldOutputResized ()
 create_rectangle ()
end


when I connected to my MUD or The Two Towers (t2tmud.org, port 9999) which use MXP.
Australia Forum Administrator #11
You have found a bug in the way the MXP menus and TextRectangle interacted. Fixed in version 4.85 now available from here:

http://www.gammon.com.au/forum/?id=11813