Something about setText

Forum for general chit-chat or off-topic discussion.

Moderators: CEGUI MVP, CEGUI Team

lcy03406
Not too shy to talk
Not too shy to talk
Posts: 26
Joined: Fri Apr 24, 2009 01:18

Something about setText

Postby lcy03406 » Fri Oct 16, 2009 08:45

I know many setter functions test the new setting and the old one first, and invalidate the window only if the setting is actually changed. But setText does not test, but invalidate the window and also it's renderedString on every time setText called. Is this intended? Maybe any decision about the RenderStringParser?

:?: LCY

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Something about setText

Postby CrazyEddie » Fri Oct 16, 2009 12:17

Hi, yes this is intentional. Mainly because testing a float, int or bool value is a trivial operation, whereas comparing two strings may not be. If it's an issue you just do the comparison yourself prior to setting the text.

CE.


Return to “Offtopic Discussion”

Who is online

Users browsing this forum: No registered users and 4 guests