[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Miniwindows
. . -> [Subject]  Miniwindow autopositioning w/ multiple windows
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Miniwindow autopositioning w/ multiple windows

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


Posted by Madcatz   (10 posts)  [Biography] bio
Date Thu 06 May 2010 02:44 PM (UTC)
Message
When I have multiple miniwindows at (for example) autoposition 7 (center top-bottom on right), is there a way to know what physical order they'll be displayed in? Is it order of first creation? Or _is_ there a reliable way to know?

By "order", I mean position from top to bottom, not the temporal order that they're displayed.
[Go to top] top

Posted by Twisol   USA  (2,257 posts)  [Biography] bio
Date Reply #1 on Thu 06 May 2010 07:23 PM (UTC)
Message
They use alphabetical (or more precisely, ASCII-based) order determined by the window names. Window "AAA" is drawn before (below) "ZZZ", which is itself drawn before (below) "lol" (because lowercase letters come after uppercase letters in ASCII).

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

Posted by Nick Gammon   Australia  (21,674 posts)  [Biography] bio   Forum Administrator
Date Reply #2 on Thu 06 May 2010 08:39 PM (UTC)
Message
Quite right. And the physical and temporal order are related, in that the earlier it is drawn the "lower" it is. So the window named B will overlap (be on top of) the window named A.

You can still use the Plugin ID to make your window names unique, just put something in front of it, eg.


window1 = "A_" .. GetPluginID ()
window2 = "B_" .. GetPluginID ()


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (21,674 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Thu 06 May 2010 08:46 PM (UTC)

Amended on Thu 06 May 2010 08:48 PM (UTC) by Nick Gammon

Message
I notice you are specifically asking about mode 7, but I think my answer is still correct. When working which ones to show where, it still respects that name order. This alias will test it:


<aliases>
  <alias
   match="overlap"
   enabled="y"
   send_to="12"
   sequence="100"
  >
  <send>

WindowCreate ("1", 0, 0, 100, 100, 6, 0, ColourNameToRGB ("cyan")) 
WindowCreate ("2", 0, 0, 100, 100, 7, 0, ColourNameToRGB ("red")) 
WindowCreate ("3", 0, 0, 100, 100, 7, 0, ColourNameToRGB ("blue")) 
WindowCreate ("4", 0, 0, 100, 100, 7, 0, ColourNameToRGB ("yellow")) 
WindowCreate ("5", 0, 0, 100, 100, 7, 0, ColourNameToRGB ("green")) 
WindowCreate ("6", 0, 0, 100, 100, 8, 0, ColourNameToRGB ("magenta")) 

WindowShow "1"
WindowShow "2"
WindowShow "3"
WindowShow "4"
WindowShow "5"
WindowShow "6"

</send>
  </alias>
</aliases>


Template:pasting For advice on how to copy the above, and paste it into MUSHclient, please see Pasting XML.


As you shrink the window down, you will notice that the top and bottom squares (cyan and magenta) remain in place, and that the middle ones disappear in reverse sequence (ie. green disappears first since it is drawn last).

Note that in this mode the windows don't actually overlap at all, they only get drawn if they can be drawn in full. If you want them to overlap, use the "absolute position" flag instead, then they will always be drawn, and then use the name to control the drawing sequence.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Madcatz   (10 posts)  [Biography] bio
Date Reply #4 on Fri 07 May 2010 12:53 PM (UTC)
Message
Perfect, that'll work for what I need, I think. Have a bunch of windows all drawn with position 7, and was wanting the user to be able to control what order they were listed. Thanks for the help.
[Go to top] 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.


2,861 views.

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

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]