garrysmod icon indicating copy to clipboard operation
garrysmod copied to clipboard

Add draw.MultiColorText()

Open EmperorSuper opened this issue 5 years ago • 9 comments
trafficstars

EmperorSuper avatar Jun 16 '20 14:06 EmperorSuper

pairs? {...} appears twice???

GitSparTV avatar Jun 16 '20 14:06 GitSparTV

What? What do you mean?

EmperorSuper avatar Jun 16 '20 14:06 EmperorSuper

You pack the table ({...}) twice instead of caching it, and you use pairs instead of ipairs.

Kefta avatar Jun 16 '20 14:06 Kefta

There is also a markup library that does the same, maybe not with best perfomance, but still

GitSparTV avatar Jun 16 '20 15:06 GitSparTV

@GitSparTV @Kefta Thanks for helping me with optimizing it, I'm not nearly as experienced at that as I should be.

EmperorSuper avatar Jun 16 '20 17:06 EmperorSuper

Why does it still say changes requested? I already resolved them....

EmperorSuper avatar Aug 12 '20 08:08 EmperorSuper

Why does it still say changes requested?

It's probably GitHub just acting up :P It can still be merged by anyone with write access so no need to worry.

viral32111 avatar Aug 12 '20 09:08 viral32111

Oh I got write perms to the repo and I didn't "approve" the changes, so it was still flagged as needing changes.

Kefta avatar Aug 12 '20 13:08 Kefta

Seems ok now. Last thing, edit your draw.lua file and test your function if it works. Because this is a module and some functions may not be localized before module call

GitSparTV avatar Aug 21 '20 15:08 GitSparTV

We already have a more flexible solution to this problem: https://wiki.facepunch.com/gmod/markup.Parse

robotboy655 avatar Jan 16 '23 14:01 robotboy655