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 ➜ Suggestions ➜ Suggestion: Pin Prompt to Output Window

Suggestion: Pin Prompt to Output Window

You need to log onto the forum to reply or create new threads.

  Refresh page


Posted by Intse   (4 posts)  Bio
Date Sun 06 Apr 2025 07:20 PM (UTC)

Amended on Sun 06 Apr 2025 07:21 PM (UTC) by Intse

Message
Currently, it appears that the prompt is fixed to the bottom of the MUSHclient window. It would be great from a UX perspective to have an option to pin the prompt to the bottom of the output window - or at least echo the keystrokes in the prompt there before pressing send. This option would reduce eye strain and generate a more efficient heatmap for interaction within the client for anyone who wishes to have their output centered instead of glued to the bottom-left corner. This would also more closely mimic the layout/behavior of traditional command-line MUDs.
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #1 on Sun 06 Apr 2025 08:31 PM (UTC)
Message
There is a health bar plugin that shows your health graphically which can be moved to anywhere you want.

https://www.gammon.com.au/forum/?id=9270

Using miniwindows you can show information like your prompt anywhere you want inside the output window.

- Nick Gammon

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

Posted by Intse   (4 posts)  Bio
Date Reply #2 on Sun 06 Apr 2025 11:29 PM (UTC)

Amended on Mon 07 Apr 2025 12:04 AM (UTC) by Intse

Message
Sorry if I phrased that poorly - in this case I'm talking about the... command bar? The text entry field stuck to the bottom of the client which you use to type and send commands. When you actually send a command it's echoed in the output, but you still have to look to the corner beforehand to adjust spelling or syntax while you type.

Diagram of suggested feature:
https://imgdrop.io/image/W5U0Q
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #3 on Mon 07 Apr 2025 03:42 AM (UTC)
Message
Ah, I see. The prompt usually refers to the prompt from the MUD. I see you are playing Aardwolf. You could ask on their tech channel - Fiendish might be able to echo what you type in a box like you showed.

- Nick Gammon

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

Posted by Intse   (4 posts)  Bio
Date Reply #4 on Mon 07 Apr 2025 03:56 PM (UTC)
Message
Unfortunately I'm here because I posted in the Aardwolf discord and Fiendish said the input box is where it is >w<

I'm working on several plugins of my own at the moment - if the contents of the command bar *are* exposed to a lua script I'd be more than happy to take a crack at it myself! Do you have any tips for how to access it if so?

Of course I could also see it as being private or not actually stored until sent >w<
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #5 on Thu 10 Apr 2025 09:26 PM (UTC)
Message
The plugin below, designed for use on Aardwolf, provides a "mirror" typing box, which you can drag to wherever you want (eg. under the output box).

It just echoes what you type, so you can keep your eyes closer to the output text. You can't actually type into it (the focus is still down the bottom on the command line), so if you need to click to select stuff you still need to do it in the "real" command window.

Template:saveplugin=Echo_Command_Line To save and install the Echo_Command_Line plugin do this:
  1. Copy the code below (in the code box) to the Clipboard
  2. Open a text editor (such as Notepad) and paste the plugin code into it
  3. Save to disk on your PC, preferably in your plugins directory, as Echo_Command_Line.xml
    • The "plugins" directory is usually under the "worlds" directory inside where you installed MUSHclient.
  4. Go to the MUSHclient File menu -> Plugins
  5. Click "Add"
  6. Choose the file Echo_Command_Line.xml (which you just saved in step 3) as a plugin
  7. Click "Close"
  8. Save your world file, so that the plugin loads next time you open it.



<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>

<muclient>
<plugin
   name="Echo_Command_Line"
   author="Nick Gammon"
   id="1d489536018f38f9bf969b86"
   language="Lua"
   purpose="Echoes what is typed in the command window"
   save_state="y"
   date_written="2025-04-08 11:50:44"
   requires="5.06"
   version="1.0"
   >

</plugin>



<script>
<![CDATA[

function OnPluginInstall ()
  
  win = GetPluginID ()
  font_id = "fn"
  
  font_name = "Courier New"   -- input font name
  
  require "movewindow"  -- load the movewindow.lua module

  -- install the window movement handler, get back the window position
  windowinfo = movewindow.install (win, miniwin.pos_bottom_left, miniwin.create_absolute_location)
   
  -- make window so I can grab the font info
  WindowCreate (win, 
                 windowinfo.window_left, 
                 windowinfo.window_top, 
                 1, 1,              -- width, height
                 windowinfo.window_mode,   
                 windowinfo.window_flags,
                 ColourNameToRGB "#373737") 

  WindowFont (win, font_id, font_name, 12, false, false, false, false, 0, 0)  -- normal  
  font_height = WindowFontInfo (win, font_id, 1)  -- height
  
  local window_width = GetInfo(274) - GetInfo(272)   -- size specified by TextRectangle
  local window_height = font_height + 10

  -- make window correct size

  WindowCreate (win, windowinfo.window_left, windowinfo.window_top,
                window_width, window_height, 
                0, miniwin.create_absolute_location, ColourNameToRGB "white")
  WindowRectOp (win, 5, 0, 0, 0, 0, 5, 15 + 0x1000)

  
  movewindow.add_drag_handler (win, 0, 0, 0, 0, miniwin.cursor_both_arrow) 
  
  WindowShow (win)
  
end -- OnPluginInstall

  
function OnPluginSaveState ()
  -- save window current location for next time  
  movewindow.save_state (win)
end -- function OnPluginSaveState

function OnPluginCommandChanged ()
  WindowRectOp (win, miniwin.rect_fill, 0, 0, 0, 0, ColourNameToRGB ("white"))    -- clear existing content
  WindowText (win, font_id, GetCommand(), 5, 5, 0, 0, ColourNameToRGB ("black"))
  Repaint ()
end -- function 

]]>
</script>
</muclient>


If you are not using Aardwolf replace:


  local window_width = GetInfo(274) - GetInfo(272)   -- size specified by TextRectangle


by:


  local window_width = GetInfo(281)  -- use whole output window width



You can change the font name by editing this line:


  font_name = "Courier New"   -- input font name


You can change the font size by editing this line and changing "12" to something else:


  WindowFont (win, font_id, font_name, 12, false, false, false, false, 0, 0)  -- normal  

- Nick Gammon

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

Posted by Intse   (4 posts)  Bio
Date Reply #6 on Wed 16 Apr 2025 01:49 AM (UTC)
Message
Oh wow, this is awesome thanks so much!
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.


957 views.

You need to log onto the forum to reply or create new threads.

  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.