Page 1 of 1

Small Mudlet Mod Questions

Posted: Mon Apr 25, 2016 6:58 am
by dicene
Just gonna consolidate any questions I have while messing with Mudlet's code here, so I'm not starting a new thread every time I try something new.

I see the QPoint mP_aussen being defined in the code in TTextEdit.h and TTextEdit.cpp. I don't see it ever being referenced though. Is it just a useless variable, or does it have some use that I'm not seeing?

Re: Small Mudlet Mod Questions

Posted: Mon Apr 25, 2016 7:06 pm
by SlySven
Strange, Heiko put that into the code in commit-899491ef at 2010-01-25 00:32:15 and that variable has sat there unused ever since...! :?

Re: Small Mudlet Mod Questions

Posted: Mon Apr 25, 2016 8:27 pm
by dicene
Gotcha. Another thing I'm unsure about. I see there's an array of booleans associated with each Y line in the buffer, called "dirty". It is being defined by TBuffer at TBuffer.h#L135, and is written to in both TBuffer and TTextEdit, but I don't see any place that it is being read, rather than written in the entirety of the code. I'm guessing it's no longer in use as well?

Re: Small Mudlet Mod Questions

Posted: Wed May 18, 2016 2:23 am
by dicene
I feel like I remember seeing somewhere the reasoning behind the scrollTo function not being exposed to scripts. Am I mistaken? If nobody knows, I can just add it in a custom compiled Mudlet and play around to see if anything breaks.

Re: Small Mudlet Mod Questions

Posted: Wed May 18, 2016 6:51 pm
by SlySven
I guess because it would interfere with the user's ability to scroll through the previous code manually - imaging try to see what had happened several minutes ago - only for an annoying script scrolling it to somewhere else as soon as you try...! OTOH - I feel that there ought to be a simple key stroke to scroll to the start (or as far back as the buffer goes). The <Ctrl>-middle mouse click to return to the current "bottom" line is useful but there is not an opposite - which is a nuisance if one is trying to select "everything" to copy it to a file...