Mudlet-1.1.0 released

Jeremy
Posts: 12
Joined: Wed Dec 30, 2009 7:09 pm
Location: Bellingham, WA, USA
Contact:

Re: Mudlet-1.1.0 released

Post by Jeremy »

I am just enjoying the scrolling output window to it's fullest. Thanks for the fix on that!

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

Re: Mudlet-1.1.0 released

Post by Vadi »

Source code in git has been updated.

User avatar
Rakon
Posts: 350
Joined: Tue Feb 16, 2010 7:41 pm
Contact:

Re: Mudlet-1.1.0 released

Post by Rakon »

Not sure where to put this post, but I believe there is a coloring bug with the current release.

Ubuntu 9.10 X64 - 2.6.31-20-generic
Mudlet 1.1.0 built: March 8, 2010 (Linux generic installer)

I have an alias that creates two temp triggers for highlighting a target:

Code: Select all

if tar_trig_u then killTrigger(tar_trig_u) end
if tar_trig_l then killTrigger(tar_trig_l) end

if target ~= 'nothing' then
 tar_trig_u = tempRegexTrigger('\\b'.. capitalize(target) .. '\\b', [[selectString("]] .. capitalize(target) .. [[", 1) fg("light_goldenrod")]])
 tar_trig_l = tempRegexTrigger('\\b'.. target .. '\\b', [[selectString("]] .. target .. [[", 1) fg("light_goldenrod")]])

end -- if
The reason for having two triggers is because I would like for the trigger to match , regardless of case.

As you can see, the color for the trigger is set to 'light_goldenrod'. However, when the trigger matches on a few lines, it actually colors the word a dark/dim gray instead.
Image

I would think that it only does so when I'm also trying to color/highlight another line, but if you look at a direct line from the mud you can see that it was also not highlighted correctly.

So, is this correctable by my actions/trigger creation, or is it an internal issue?

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: Mudlet-1.1.0 released

Post by Heiko »

You have forgotten to call deselect() after your goldenrod color trigger. Consequently, the selection still stands and the next call to change foreground color will not only change the current foreground color, but also the last - and now invalid - former selection and change the color from goldenrod to grey.

User avatar
Rakon
Posts: 350
Joined: Tue Feb 16, 2010 7:41 pm
Contact:

Re: Mudlet-1.1.0 released

Post by Rakon »

Where would I put the 'deselect()' at? In the temp trigger execute?:
tar_trig_u = tempRegexTrigger('\\b'.. capitalize(target) .. '\\b', [[selectString("]] .. capitalize(target) .."\n" .. deselect() .. [[", 1) ?

Thanks

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: Mudlet-1.1.0 released

Post by Heiko »

You need to reset the selection after every call to one of the selection functions if some other triggers do color prints on the same line. Mudlet doesn't do this automatically because it would be less efficient.

In your case, your prompt trigger seems to be the source of the color grey -> deselect() at the end of the prompt script *and* at the end of the tempTrigger will do the trick.

Your tempTrigger on "You have slain a *rat*" selects "rat" and colors it gold, then your prompt trigger does a setFgColor() to grey which will not only change the current color to grey, but also colorize your current selection ("rat" from your tempTrigger) grey.

User avatar
Rakon
Posts: 350
Joined: Tue Feb 16, 2010 7:41 pm
Contact:

Re: Mudlet-1.1.0 released

Post by Rakon »

Alright, thank you for this clarification.

Another, unrelated note / question:

I noticed in the API request thread you said you where working on adding in a 'windowfocus' event, to test if the mudlet window is in focus?? Has this been implemented in the current 1.1.0 version?

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: Mudlet-1.1.0 released

Post by Heiko »

That function is in Mudlet-1.1.1 which has been released yesterday.

bool = hasFocus()

returns true if the main window has focus.

Post Reply