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
➜ Miniwindow Textbox control
Miniwindow Textbox control
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| WillFa
USA (525 posts) 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. :)
| Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) 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 | Top |
|
Posted by
| WillFa
USA (525 posts) 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. :) | Top |
|
Posted by
| Worstje
Netherlands (899 posts) 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. :) | 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.
17,396 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top