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


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Suggestions
. . -> [Subject]  Miniwindow Textbox control

Miniwindow Textbox control

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


Posted by WillFa   USA  (525 posts)  [Biography] bio
Date Sat 30 May 2009 06:02 PM (UTC)
Message
Hey Nick,

Would it be possible to add text boxes to miniwindows? I had an idea to make a wizard for wizards kind of thing for areabuilding, and being able to make actual dialog boxes would be super useful. :)

[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Sat 30 May 2009 10:07 PM (UTC)
Message
Hmmm. Miniwindows are currently output-only, as you know. There are also hooks for mouse activity, like clicks and mouse-overs.

Handling keyboard input is going to be a big change. Remember the issue that keeps cropping up with whether Ctrl+C copies from the command window or the output window? This would be the same, but worse.

To implement some sort of keyboard input the very least that would be needed is to have the "focus" be moveable from the command window to the miniwindow (and which miniwindow, if you have more than one with input boxes?). Then keystrokes would need to be passed to the miniwindow rather than the command window, and attention would be needed to handle accelerator keys as well (eg. if you redirect "K" to do something different, would that apply if the miniwindow had the focus?).

You would also need to have some sort of special key that moves the focus around (or the mouse maybe), like Ctrl+Tab does in Windows. You would need to handle copy and paste, highlighting selections, scrolling, etc.

Sounds like a big job to me.

The closest I can suggest, if you want to have a way of easily editing something like a mob description, is to use the Lua editbox (or similar) function (http://www.gammon.com.au/scripts/doc.php?lua=utils.editbox). Now admittedly this would be modal, and you couldn't do anything else until you amended the description and clicked OK or Cancel, but that would be a workaround.

- Nick Gammon

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

Posted by WillFa   USA  (525 posts)  [Biography] bio
Date Reply #2 on Sun 31 May 2009 04:46 AM (UTC)
Message
I never said it was a [b]good[/b] suggestion... :)

I had thought of the utils.editbox, but the modality thing made me wonder if this would be something you're interested in doing.

Thanks Nick. :)
[Go to top] top

Posted by Worstje   Netherlands  (899 posts)  [Biography] bio
Date Reply #3 on Sun 31 May 2009 05:17 AM (UTC)
Message
An alternative option could be as follows...

Suppose you have a line in your miniwindow you want to edit to show something else. Have a hotspot on it. Once clicked, adjust the command line window color to something specific (maybe even change the font to make the difference even clearer), perhaps put the current value in there and select it, and add an alias with the highest possible sequence that catches everything. Once it fires, restore everything to the users settings again.

Maybe improve it a bit and combine it with an OnPluginCommandEntered that turns input 'blah' into 'PLUGINID:blah' so there is no chance another alias will steal the input.

I might make you an example if you want, so just let me know. :)
[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.


15,099 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 HostDash]