While you are mucking about that input-window anyhow...

Posted by Worstje on Sat 21 Jun 2008 08:43 AM — 8 posts, 20,243 views.

Netherlands #0
Hey Nick,

I have two suggestions for the input window, both of which I remembered reading the changelog of the latest version just now.

1) In Configuration->Input, give us an checkbox to 'auto-size input window'. Basically, it would make it so there's always enough lines to display the input you are currently typing. Maybe add a maximum too, so it would be usable for people who have small screens, too. (It probably would end up disabling manual resizing). Maybe add a keyboard shortcut or something in the toolbars for this - I can imagine people wanting to have different behaviours depending on the mud or kind of activity (grinding stuff a fixed size so it won't keep resizing and distracting, whereas big paragraphs and such get the ease of a single glance to read it all).

I could probably simulate-ish this behaviour with a plugin and some magic numbers for border/fontsize/etc, but it would make a neater and better solution to have it within the client. That and I don't think I have a 'user is typing stuff in command window' plugin callback, altho I'd need to check for that. :D

2) Make tab-autocomplete able to work when your cursor is followed by a non-spacey character. It might sound a bit confusing, so let me give an example:

say John and Marie are silly people.

I'm done typing, and I figure Quetzalcoatl is pretty silly, too. So I end up typing HOME, CTRL-RIGHT, CTRL-RIGHT. Now my cursor is right before the a of 'and', following the space. So I want to adjust it, and go BACKSPACE, type a COMMA followed by SPACE. Now I want that name, but it's a pain to type out. So I go 'Que' and want to let tab completion do the work for me. (It looks like 'Queand' now, my cursor being between the 'e' and 'a'). Crap, foiled because the letter 'a' is right behind me. To work around it, I type SPACE, LEFT and TAB. Maybe even have that followed by DELETE if I let tab-completion add an extra space (irony, a typing saver making me type more ^_^). End-result:

say John, Quetzalcoatl and Marie are silly people.

Another way to 'solve' this usability issue would be to make CTRL-RIGHT jump to the ending of a word rather than the beginning of the next. But I think that's a bigger and weirder change that might actually go against some standards defined in some spots.

I hope this last request isn't considered nitpicking or some such - I end up typing quite a few elaborate names that I like to auto-complete, but I always change my sentences half-way. So this kind of thing happens every few emotes or so, if I'm in a particularly perfectionist mood. ^_^

Thanks for an awesome client, as usual!


P.S.: Now that I am proofreading.... The first thingy makes me want to add a 3rd request: make toolbars configurable. Personally, I don't care much about having an ABOUT button in my workspace, nor do I use stuff like notes, variables and most of the other configuration buttons. (Hell, the 'world details' button is just a carbon copy of the others that just opens the last opened page...) But seeing toggles like auto-say and pause, or having the reset timers/reload script and find-related stuff, is really useful. Being able to be a bit more precise in what buttons I can see, or maybe even add my own toolbars with own scripted stuff (only for global plugins), could be really useful. I am just talking buttons btw, none of that 'fancy' (I prefer the word buggy) zmud inspired stuff.
Australia Forum Administrator #1
Quote:

In Configuration->Input, give us an checkbox to 'auto-size input window'.


Well having got this far, as an experiment I have added your suggestion to version 4.29. It does not have a GUI checkbox yet, but you can play with it and see how you go. Just make an alias or something to turn it on or off.


SetOption ("auto_resize_command_window", 1)  --> activate it
SetOption ("auto_resize_command_window", 0)  --> deactivate it


It might not be perfect, you can try and see what you think. Basically on every keystroke it recalculates the window size and resizes it. Looks cool enough to me. Some keystrokes aren't caught, like Ctrl-V because that seems to go straight to the edit control before I see it.

I have put an upper limit of 20 lines on the command window, after that you resize it yourself.

Quote:

Make tab-autocomplete able to work when your cursor is followed by a non-spacey character.


Yeah I see what you mean. I have put that in too, see how it looks. It might be over-zealous if you just happen to hit tab and unexpectedly find a new word in the middle of your window, but I suppose that might have happened anyway if the cursor had a space after it.
Netherlands #2
You're pretty much made of awesome. And hrm, can't you handle WM_CUT/WM_PASTE to also resize the window?
Australia Forum Administrator #3
Actually I found a better way (EN_CHANGE), now it reacts to pastes and deletes as well. This catches all changes to the edit control, presumably scripted ones as well.
Netherlands #4
Oh right, edit-control specific messages. I totally forgot about those. It's been years since I last dabbled in those realms. Sounds awesome, Nick!

(So, how's the future looking on a bit more flexibility in adjusting the toolbars, or actually have more toolbars with custom functions? *can always ask* ^_^)
Australia Forum Administrator #5
Not too good, sorry.

The trouble with libraries like MFC is that they work well if they already support what you want, and not so well if they don't.

Unless I am mistaken, reconfiguring them for customizing toolbars won't be easy. Perhaps if someone can point me to a place that shows where it is easily done.

In any case, what I would regard as more urgent is pulling out all that configuration from the Registry, and making MUSHclient more stand-alone.
Netherlands #6
Fair point, fair point. It was just a question. ^_^
Netherlands #7
Thanks for implementing the features, Nick. ^_^ They're plain awesome. I've found one little glitch so far (while using maximized world windows; I don't think it happens in other cases). When I switch from the world with the auto-resize ON (ARON) to one with auto-resize OFF (AROFF), and then back from AROFF to ARON, the new size given to the command window is probably the same one as the one the user resized it to. It makes the text jump a bit when you type the first character (unless taking the effort to manually resize to suit a 1-line height), and seems more like a graphical glitch/oversight than a bug. Still, I figured I should mention it.

Also, since it seems that the auto-resize feature is still somewhat in beta (it not being in GUI and all), how about two extra variables to affect it's behaviour?

auto_resize_command_window_min_lines (default: 1)
auto_resize_command_window_max_lines (default: 20)

The defaults as specified are how they would match up with the current state of affairs. I'll be fair and say the only reasons I'd like to have them is out of dislike against magic constants ;) and the fact that a one-lined command window is visually a bit small unless you use a biggish font. It somehow tends to get a bit lost and squashed up against the bottom border of my screen (commandwindow, infobar, statusbar, taskbar). But that's just personal preference. I could just as well change the color of the background to something that stands out more for the worlds I use this option in. ^_^