MultiColumnList row selection not highlighting

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
TheBren
Just popping in
Just popping in
Posts: 3
Joined: Thu Apr 07, 2005 05:21
Location: 0, 0, 0

MultiColumnList row selection not highlighting

Postby TheBren » Wed Apr 20, 2005 21:18

I have a MultiColumnList.

Part of its initialization includes this:

Code: Select all

list->setSelectionMode(CEGUI::MultiColumnList::RowSingle);


When I add rows, my ListBoxTextItem includes this:

Code: Select all

item->setSelectionBrushImage("TaharezLook", "ListboxSelectionBrush");


The row is highlighted if I select it in code like this:

Code: Select all

list->setItemSelectState(item, true);


However, if I select it with the mouse, the row is not highlighted. I get an EventSelectionChanged, and I can get the item with getFirstSelectedItem(), so everything seems to be working. The row just doesn't get visually highlighted.

Any suggestions?

User avatar
JNighthawk
Just popping in
Just popping in
Posts: 7
Joined: Sun Apr 17, 2005 04:55

Re: MultiColumnList row selection not highlighting

Postby JNighthawk » Wed Apr 20, 2005 22:37

Mind posting your code dealing with Listboxes and items? I can't figure out how to do them.

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

Re: MultiColumnList row selection not highlighting

Postby gcarlton » Thu Apr 21, 2005 05:33

Thats wierd, it works for me fine. If you want to debug it yourself, the place to put a breakpoint is:

Code: Select all

void ListboxTextItem::draw(const Vector3& position, float alpha, const Rect& clipper) const
{
  if (d_selected && (d_selectBrush != NULL))
  {
    d_selectBrush->draw(clipper, position.d_z, clipper, getModulateAlphaColourRect(d_selectCols, alpha));
  }
  ...


You should make sure d_selected is true, d_selectBrush is valid, and the alpha is reasonable. That might give you a heads-up whats going on, whether its a multi-listbox bug, or a rendering issue. Good luck!

Geoff


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 2 guests