Combobox Text alignment

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
cippyboy
Quite a regular
Quite a regular
Posts: 51
Joined: Wed Jul 30, 2008 13:23

Combobox Text alignment

Postby cippyboy » Fri Sep 19, 2008 12:05

I'm trying to set this up, but it doesn't seem to work. I'll first begin by saying we're still using version 0.5.0b. If this was fixed in more recent versions then I'm sorry for this post and maybe we'll upgrade some time soon :D.

Ok, so for starters I have a custom edit box which is supposedly center aligned vertically and right aligned horizontally (don't ask me why, I just copied the default definitions and wrote custom image inputs) and when I have this edit box in a combobox definition the text is LeftAligned horizontally and BottomAligned Vertically and everything I tried gets ignored (like setting <VertFormat type="CentreAligned" /> inside the editbox definition, inside the child definition or inside a widget's declaration).

The other weird thing that I have observed is that alignment properties don't actually work even in StaticText definitions. Like if I set
<VertFormatProperty name="VertFormatting" />
inside the TextComponent of a StaticText and then set up different alignments for every widget declaration, there's only going to be one default alignment that may not look like the default value of VertFormatting and therefore I have to write multiple widget declarations for every type of alignment... pretty weird.

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

Postby CrazyEddie » Tue Sep 23, 2008 08:44

Hi,

I'll as the 'obvious' question first... Is the Combobox definition using the modified Editbox as it's component, or is it still using an unmodified "ComboEditbox" or some such?

With regards to the properties not working, are you defining that "VertFormatting" property via a PropertyDefinition prior to using it in the VertFormatProperty element? If so, I'll have to do a couple of tests since IIRC it should work (though I may have overlooked something).

CE.

User avatar
cippyboy
Quite a regular
Quite a regular
Posts: 51
Joined: Wed Jul 30, 2008 13:23

Postby cippyboy » Fri Sep 26, 2008 13:11

It's a modified editbox but trying to set the VertFormatting there doesn't affect anything. And yes, I did a PropertyDefition (or else I think it would crash :D). The weird thing is that now I have a rightaligned editbox but it's displayed as left aligned. Could the code that takes care of the input apply it's own formatting ?

EDIT: By the way, I have a StaticImage that has the passthrough flag on and everything works ok except checkboxes. I can hover over them but they don't receive Click Events.

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

Postby CrazyEddie » Sun Sep 28, 2008 13:52

I'll have to test the Combobox Editbox, I can't remember if there is a limitation there (I can't see why there should be).

With regards to the Checkbox not working - are you injecting mouse button up events as well as mouse button down events?

CE.

User avatar
cippyboy
Quite a regular
Quite a regular
Posts: 51
Joined: Wed Jul 30, 2008 13:23

Postby cippyboy » Wed Oct 01, 2008 10:20

Yap, ButtonDown & ButtonUp for left/right/middle clicks.

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

Postby CrazyEddie » Mon Oct 06, 2008 09:03

It kind of sounds like the Checkbox is covered by some 'DefaultWindow' or some other window's 'spare' over-sized space (which is transparent) and is blocking the events getting to it. Having said that, if this was the case, the hover effect would not show :?

CE


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 8 guests