RenderCache double offset?

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

Moderators: CEGUI MVP, CEGUI Team

User avatar
gcarlton
Just can't stay away
Just can't stay away
Posts: 149
Joined: Wed Jan 12, 2005 12:06

RenderCache double offset?

Postby gcarlton » Mon Jul 18, 2005 07:42

I've just got latest after a huge delay, and there were two little snags I came across. The static element seems to be double-offsetting its position. This is since it tells the cache its position as an abs rect, that then gets offset again when rendered.

To fix it, I had to change the following lines:
Static::populateRenderCache:
Rect backgroundRect(Point(0,0), getAbsoluteSize());

StaticText::populateRenderCache:
Rect absarea(Point(0,0), getAbsoluteSize());

This could be due a merge conflict on my part (perhaps due to my changes to support rotated static images), I'm not sure. Anyway, that fixed it for me.

Geoff

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

Re: RenderCache double offset?

Postby CrazyEddie » Mon Jul 18, 2005 08:27

Hey Geoff,

I'll have a look, though I thought I'd got this right - I did re-test the old classes, honest ;)

User avatar
gcarlton
Just can't stay away
Just can't stay away
Posts: 149
Joined: Wed Jan 12, 2005 12:06

Re: RenderCache double offset?

Postby gcarlton » Mon Jul 18, 2005 10:14

Its wierd, the menu text item seems to have the same problem. Surely all these different classes can't be wrong, so I wonder if I have some simple merge bug somewhere that is screwing it all up...

guyver6
Just popping in
Just popping in
Posts: 11
Joined: Wed Jan 12, 2005 12:06
Contact:

Re: RenderCache double offset?

Postby guyver6 » Mon Jul 18, 2005 21:59

@CrazyEddie: That's probably one of the bugs I talked you about on IRC, that static text control with lots of text in it stopped rendering it's content. I can give you a patch from gcarlton's code.

UPDATE: Hmm, looks like current CVS HEAD doesn't have that code in it ;)

ANOTHER UPDATE: Just found them, here's a patch. Btw, I can't test it since HEAD build is broken ;)

User avatar
gcarlton
Just can't stay away
Just can't stay away
Posts: 149
Joined: Wed Jan 12, 2005 12:06

Re: RenderCache double offset?

Postby gcarlton » Tue Jul 19, 2005 07:16

Ok, thanks for making up that patch. Talking of bugs, I've noticed a couple of things with the tooltip - and again I'm just going to mention them rather than making up a patch, due to time.

The comments on the setDisplayTime, setHoverTime are swapped! Also, if the app is injecting positions, the tooltip is constantly resetting itself since the windows get mousemove(0,0) events.

Apart from that, its all good. And the menu system kicks ass too! :)

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

Re: RenderCache double offset?

Postby CrazyEddie » Tue Jul 19, 2005 09:08

I'll be looking into this offst issue today.

I'll fix the comments for tooltip :lol:

With regard to the position injection thing, you should only inject an event if the mouse has moved. ;)


Return to “Offtopic Discussion”

Who is online

Users browsing this forum: No registered users and 5 guests