[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]  General
. . -> [Subject]  Creating permanent prompt above input bar
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Creating permanent prompt above input bar

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


Posted by Dontarion   USA  (62 posts)  [Biography] bio
Date Fri 24 Sep 2010 06:19 PM (UTC)
Message
What I would like to do is set aside screen real estate that is where the output from the mud generally goes to create a permanent prompt.

My reasoning behind this is in Achaea much of the screen is spammed during combat with the prompt comprising a majority of this. I would like to remove all of those prompts except the one that's permanent.

Before anyone comments: I currently use my InfoBar up. It's almost full when everything is set. I also don't want to put my prompt below the input bar. It's not something I'm used to and would like to avoid this if I can. If I have to use the InfoBar then I've already thought about using a miniwindow for the information already there to free up space.

Any ideas?
[Go to top] top

Posted by LezChap   (36 posts)  [Biography] bio
Date Reply #1 on Fri 24 Sep 2010 06:30 PM (UTC)
Message
My only idea at this point is to use miniwindows.
[Go to top] top

Posted by Worstje   Netherlands  (899 posts)  [Biography] bio
Date Reply #2 on Fri 24 Sep 2010 06:32 PM (UTC)

Amended on Fri 24 Sep 2010 06:35 PM (UTC) by Worstje

Message
It is not trivial, but should be relatively easy to accomplish once you understand how to use miniwindows.

1) Use the TextRectangle function to free up some space at the bottom of your output screen.
2) Create a miniwindow that will cover the freed up space.
3) Whenever a prompt comes in, draw the miniwindow with the prompt. Also, you will want to omit the trigger from output.

There will be a side effect if you choose not to omit the prompt from output. you will see your prompts twice at the bottom: once as actual text, once in the miniwindow.
[Go to top] top

Posted by Dontarion   USA  (62 posts)  [Biography] bio
Date Reply #3 on Fri 24 Sep 2010 06:35 PM (UTC)
Message
I know how to do miniwindows but I want to avoid using one. I'd rather alter the buffer window.

I'm not Omitting from output but using DeleteLine() as well. Omit from output leaves you a blank line.
[Go to top] top

Posted by Worstje   Netherlands  (899 posts)  [Biography] bio
Date Reply #4 on Fri 24 Sep 2010 06:37 PM (UTC)

Amended on Fri 24 Sep 2010 06:41 PM (UTC) by Worstje

Message
Omitting from output does not leave blank lines.

However, the 'convert IAC EOR/GA to new line' option does create an EXTRA new line, which is the one you are likely complaining about. I created a plugin ages ago to take care of those. I could post it if you want it, I suppose, but I think it already floats around on this forum elsewhere.

Also, I would suggest to avoid DeleteLines(). It used to be buggier than simply omitting, although I'm pretty sure that part was fixed, but it is also quite likely to cause some jerking of the output area. (Although I admit I haven't tested that since the implementation of miniwindows.)

I still suggest you use a miniwindow. Those are meant to stay at one spot like you want. Text is meant to scroll around and be rather inflexible. (Also I think it is dirty to have a trigger that matches everything to DeleteLines(1) your most recent prompt when new stuff comes in.)
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #5 on Fri 24 Sep 2010 10:27 PM (UTC)
Message
Dontarion said:

I know how to do miniwindows but I want to avoid using one. I'd rather alter the buffer window.


Miniwindows effectively alter the buffer window (by drawing on top of it). You can use TextRectangle as Worstje said to leave room for the extra screen space so the text doesn't disappear under it.

You can make the miniwindow stick to the bottom-left corner so it will always be there regardless of how you resize the window.

Personally I use the Omit_Blank_Lines plugin to get rid of those extra lines (although it gets rid of *all* blank lines, this may or may not bother you).

Template:post=8768 Please see the forum thread: http://gammon.com.au/forum/?id=8768.

- Nick Gammon

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

Posted by Worstje   Netherlands  (899 posts)  [Biography] bio
Date Reply #6 on Fri 24 Sep 2010 10:31 PM (UTC)
Message
Nick Gammon said:

Personally I use the Omit_Blank_Lines plugin to get rid of those extra lines (although it gets rid of *all* blank lines, this may or may not bother you).


Just to clarify... the plugin I have lying around only takes care of those newlines introduced by the virtue of that IAC EOR/GA conversion function. (I'd find it on the forums or on my harddrive, but I am in a bit of a lazy mood, so I'll get off the lazy bit if I know someone actually wants it.)
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #7 on Fri 24 Sep 2010 10:53 PM (UTC)

Amended on Fri 24 Sep 2010 10:54 PM (UTC) by Nick Gammon

Message
Template:post=7989 Please see the forum thread: http://gammon.com.au/forum/?id=7989.


A little way down the page is the plugin he wrote.

[EDIT] It also has one I wrote which works a bit differently. One or the other should help.

- Nick Gammon

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

Posted by Dontarion   USA  (62 posts)  [Biography] bio
Date Reply #8 on Fri 24 Sep 2010 10:55 PM (UTC)
Message
I already found his and I am using it. I'll give you guys a screenshot later. I'm currently in the process of changing or creating quite a few triggers - the equivalent of using #SUB in zMud.

The prompt change alone (right now in InfoBar but I'll toy with a miniwindow) is making huge changes to how much I see.
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #9 on Fri 24 Sep 2010 11:00 PM (UTC)
Message
The miniwindow also give you a lot of flexibility. For example, you might mouse-over your HP and have it show more info (eg. max HP). Or you might mouse-over your XP and have it tell you your rate of XP per hour. Or you might make it so if you click your health you drink a potion. All this takes code, but you have the flexibility to do it.

- Nick Gammon

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

Posted by Dontarion   USA  (62 posts)  [Biography] bio
Date Reply #10 on Fri 24 Sep 2010 11:14 PM (UTC)
Message
One thing I'd love to do is prefix every line with a timestamp ala Mudlet. I don't think that's going to happen easily but I thought I would throw it out there.
[Go to top] top

Posted by WillFa   USA  (525 posts)  [Biography] bio
Date Reply #11 on Fri 24 Sep 2010 11:56 PM (UTC)
Message
The miniwindow should be trivial.


require "InfoBox"
function OnWorldOpen()
  promptw = InfoBox:New()
  promptw:WindowPosition(InfoBox.windowPositions.S)
  prompt = promptw:AddBar()
  prompt:BarStyle(InfoBox.barStyles.textOnly)
end


-- For your Prompt Trigger add

prompt.caption = "%0"
promptw:Update()
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #12 on Sat 25 Sep 2010 12:25 AM (UTC)

Amended on Sat 25 Sep 2010 07:24 AM (UTC) by Nick Gammon

Message
Dontarion said:

One thing I'd love to do is prefix every line with a timestamp ala Mudlet. I don't think that's going to happen easily but I thought I would throw it out there.


I couldn't get my copy of Mudlet to do that, but I get the general idea.

That seems a reasonable request, and not particularly easy to fudge up with the existing code.

I am experimenting with providing a "line preamble" for each output line, which gets put at the start at the last moment (and thus you can turn it on and off if you want).

It looks like this:



I am doing that by levering off the "log file line preamble" codes. This lets you specify any string you like, including the date/time codes, and a few extra things like %P for the player name (as in my example).

So in the example above I did:


SetAlphaOption ("timestamp_input", "(input) %H:%M:%S > " )
SetOption      ("timestamp_input_text_colour", ColourNameToRGB ("brown") )

SetAlphaOption ("timestamp_output", "%H:%M:%S (%P) > " )
SetOption      ("timestamp_output_text_colour", ColourNameToRGB ("white") )


This lets you specify the date/time to whatever precision you want (eg. h:m:s), have a custom colour for each of input/output/notes, and a custom background. This lets the different types of lines stand out more.

- Nick Gammon

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

Posted by Dontarion   USA  (62 posts)  [Biography] bio
Date Reply #13 on Sat 25 Sep 2010 02:14 PM (UTC)
Message
That's very nice looking. My only concern is if the preamble is done after all trigger processing? I know I would prefer after.
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #14 on Sat 25 Sep 2010 09:02 PM (UTC)
Message
The overall behaviour of the client is unchanged. The preamble is simply a display thing, done at the last moment when the screen is redrawn. If you turn it off (by setting the preambles to an empty string) they will go away, even for existing lines.

I found how it looks in Mudlet, and it is the same idea - one moment the timestamps are there, the other they are not. Triggers will not be affected.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[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.


11,533 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]