Page 1 of 1

Font and mouse goofiness

Posted: Mon Oct 04, 2004 20:08
by RuprechtTheMonkeyBoy
I'm having two problems with CEGUI: :oops:

1. All the text in my CEGUI windows is showing up as white on cyan. (I tried to take a screenshot, but the screen grabber only gets a blank window with decorations, no contents.) How do I change the font foreground color, and make the background transparent?

2. I have set a mouse cursor, but it doesn't show up or move when the mouse is moved. (I can set the mouse cursor in Ogre, and it shows up and moves just fine.)

I'm using CEGUI + Ogre on Mac OS X (if that makes any difference).

Font and mouse goofiness

Posted: Mon Oct 04, 2004 20:34
by CrazyEddie
1. All the text in my CEGUI windows is showing up as white on cyan. (I tried to take a screenshot, but the screen grabber only gets a blank window with decorations, no contents.) How do I change the font foreground color, and make the background transparent?

Sounds like a bug to me :( The texture built for the font should actually be filled with white text on a black background with appropriate alpha channel. Obviously something is not working correctly. I have to wonder how I'm going to fix this one though :)

2. I have set a mouse cursor, but it doesn't show up or move when the mouse is moved. (I can set the mouse cursor in Ogre, and it shows up and moves just fine.)

Are you properly injecting inputs into the Gui system? For a demo of this, based upon the ExampleApplication and ExampleFrameListener from Ogre, get the Demo7 download and look at the source files to see what you need to do :)

HTH

CE.

Font and mouse goofiness

Posted: Tue Oct 05, 2004 02:31
by RuprechtTheMonkeyBoy
Sounds like a bug to me :( The texture built for the font should actually be filled with white text on a black background with appropriate alpha channel. Obviously something is not working correctly. I have to wonder how I'm going to fix this one though :)


I was wondering if it was a bug, or just something I did (or forgot to do :oops:), since the screenshots I've seen seem okay.

Are you properly injecting inputs into the Gui system? For a demo of this, based upon the ExampleApplication and ExampleFrameListener from Ogre, get the Demo7 download and look at the source files to see what you need to do :)


Doh! 8O I missed that part when stealing the code from Demo7. Now I'm all set with that.

Thanks! :D

Font and mouse goofiness

Posted: Tue Oct 05, 2004 09:01
by CrazyEddie
Sounds like a bug to me :( The texture built for the font should actually be filled with white text on a black background with appropriate alpha channel. Obviously something is not working correctly. I have to wonder how I'm going to fix this one though :)


I was wondering if it was a bug, or just something I did (or forgot to do :oops:), since the screenshots I've seen seem okay

This may be an endian related issue concerning the way the font texture data is constructed, I'll look into it and see what I can discover :)

CE.

Font and mouse goofiness

Posted: Tue Oct 05, 2004 14:26
by RuprechtTheMonkeyBoy
This may be an endian related issue concerning the way the font texture data is constructed, I'll look into it and see what I can discover :)


I was thinking the same thing. 8) I was looking through the TLTitlebar.cpp file, and saw this:

Code: Select all

   //
   // Draw the title text
   //
   // calculate colours to use for caption text
   colval = ((colval & 0xFF000000) | (d_captionColour & 0x00FFFFFF));


...and the first thing that popped into my head was endian-ness. :)

Font and mouse goofiness

Posted: Tue Oct 05, 2004 17:59
by CrazyEddie
Well, that particular bit of code will not be in the system after Thursay, so if it is that we'll know soon enough :D

So, is it all text that has this problem, or is it just the text in the title bars?

I was thinking more along the lines of a problem in the Font class where the data from Freetype is transferred to a memory buffer before being copied to a texture. It's also possible it's a pixel format issue, though I wouldn't really have thought so (does the Mac handle A8R8G8B8 format ok?).

CE.

Font and mouse goofiness

Posted: Tue Oct 05, 2004 18:18
by RuprechtTheMonkeyBoy
So, is it all text that has this problem, or is it just the text in the title bars?


All text.

(does the Mac handle A8R8G8B8 format ok?)


No idea. 8O