WindowsLook ComboBox Color Problem

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

User avatar
daesdemon
Quite a regular
Quite a regular
Posts: 60
Joined: Fri Mar 11, 2005 21:19
Contact:

WindowsLook ComboBox Color Problem

Postby daesdemon » Wed Mar 30, 2005 15:14

Hello again,

Sorry to be so disturbing.

I used the WindowsLook because i find it make smaller interfaces.

I get a problem when i create a Combobox because the color of the text in the drop list seems to be the same than the background(white), so my droplist works good but i cannot see the ListItemText.

When i use TaharezLook, it's ok, white text on black background.

Is there a way to change the droplist text.
I try all the setXXXcolour but noone do anything in the droplist.
Perhaps could get a pointer on the droplist window in any way?

Guest

Re: WindowsLook ComboBox Color Problem

Postby Guest » Wed Mar 30, 2005 16:08

Looks like the same as this one :
http://www.cegui.org.uk/modules/newbb/v ... 97&forum=2

Maybe lindquist could help?
I think you have to modify the ColourRect used when you call function "drawText" on your Font object.
Maybe just change the "DefaultColour" value in CEGUIFont.h?

--
Chris

User avatar
daesdemon
Quite a regular
Quite a regular
Posts: 60
Joined: Fri Mar 11, 2005 21:19
Contact:

Re: WindowsLook ComboBox Color Problem

Postby daesdemon » Wed Mar 30, 2005 17:01

Thanks Chris.

I haven't have even a look in the CEGUI source because my main project is about Ogre.
So i just use the compiled version of CEGUI (CVS one), but I think i will have a look soon, because there is too much things that i have to understand.

I had a look on the lindquist's post, he said
Setting the color to black fixed it !
, but i don't see what he meant.

I try

Code: Select all

Combobox->setNormalTextColour(CEGUI::colour(0,0,0));

but it only change the color of the editBox not the droplist one.

User avatar
daesdemon
Quite a regular
Quite a regular
Posts: 60
Joined: Fri Mar 11, 2005 21:19
Contact:

Re: WindowsLook ComboBox Color Problem

Postby daesdemon » Wed Mar 30, 2005 17:50

I am just stupid :hammer:

I had just to change the color of each item of the combobox that's all

That's the code

Code: Select all

while (Chaque item)
{
   item = new ListboxTextItem(ItemText, ItemID);
   item->setTextColours(CEGUI::colour(0,0,0));
        mCombobox->addItem(item);
}


Guest

Re: WindowsLook ComboBox Color Problem

Postby Guest » Wed Mar 30, 2005 18:07

I've tested that and it worked for me with Ogre Demo_Gui.
When you create your item, before adding it to the droplist, do this :

item = new CEGUI::ListboxTextItem((CEGUI::utf8*)"Horizontal Scrollbar", 1);
item->setTextColours(CEGUI::colour(1,0,0));
objectComboBox->addItem(item);

Hope this helps

--
Chris

Guest

Re: WindowsLook ComboBox Color Problem

Postby Guest » Wed Mar 30, 2005 18:10

Arg
I'm too slow with my tests :(
17 minutes too late :hammer:

--
Chris

User avatar
daesdemon
Quite a regular
Quite a regular
Posts: 60
Joined: Fri Mar 11, 2005 21:19
Contact:

Re: WindowsLook ComboBox Color Problem

Postby daesdemon » Wed Mar 30, 2005 20:25

hehe, thx m8, it seems to be a confirmed solution to this little problem ;) .

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Re: WindowsLook ComboBox Color Problem

Postby lindquist » Wed Mar 30, 2005 21:31

Hi.
It's exactly what I did, but it's not really a solid solution...

At least not in my case. I want to be able to use which ever look I feel like and I really don't want to be writing look specific code. ex.

Code: Select all

col = ( look == "TaharezLook" ) ? colour(0,0,0) : colour(1,1,1);


But as I will soon post on dev forums, I'm working on a new system for listboxes and its like.
(see the roadmap for details)

I really need a working menu system, so I've decided to make these changes.

User avatar
daesdemon
Quite a regular
Quite a regular
Posts: 60
Joined: Fri Mar 11, 2005 21:19
Contact:

Re: WindowsLook ComboBox Color Problem

Postby daesdemon » Wed Mar 30, 2005 23:09

Great, lindquist.
I understand that's not a robust solution.

In my case for the moment, as i am a complete beginner in CEGUI, i am only trying to make the things behave like i want.
I am not able to examine the CEGUI code, and submit patches, at least for now. ;)

Happy that you're working on that.
A great menu system will rock :)


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 3 guests