SRL Archive - Suggestions

writeln with colour


fr1g1d

2011-06-16 01:15:48

Increase readability with debug logs with color!
Instead of only having Wrintln('stuff') overload the function so there can be writeln('stuff','red') etc.

This would make it much easier to distinguish the types of things that are outputted.

For example
Failed To Teleport Out: LogOut
Solving Random: Forester
Choosing Reward: XP item
Finished 100 loads: LogOut

JPHamlett

2011-06-16 01:47:27

There is a way to do it, look for Sabzi's Air Crafter its in there

i luffs yeww

2011-06-16 02:03:39

There is definitely a way to do this. Don't think you can do it per line or character or anything (yet), but they (wizz and dgby) have been doing a lot of work on debugging. This should be possible sometime in the future. :)

Bonfield

2011-06-16 03:51:30

this has been brought up before, im assuming you mean the debug box on simba itself not smart? iirc im not sure it can be done, or if it can it wasnt worth the drama, it was either brought up in debugging MSI or it could have actually been about debugging simba to differentiate between simba errors and script errors

Wizzup?

2011-06-16 05:17:32

It sounds like a good idea. But I'm not sure the current form component we use
can actually display colours. We may need a RichEdit for that or so. Dgby
probably knows more…

Dgby714

2011-06-16 09:12:41

From: Wizzup?
It sounds like a good idea. But I'm not sure the current form component we use
can actually display colours. We may need a RichEdit for that or so. Dgby
probably knows more…


I found a cross platform version of TRichEdit which will allow this, tho there is quite a bit todo before we implement it.


Also, fr1g1d, No overloading in PascalScript =(

nielsie95

2011-06-16 11:29:39

You could also use SynEdit. For an example you can take a look in the Lazarus examples folder: LazSVN\examples\SynEdit\SynPositionHighlighter. You can also use the OnSpecialLineColor callback.