Issue about MyGui::List alpha

icaromotta

01-09-2010 14:20:19

Hi,
I wanna do a alpha list, but how can I avoid text inside being alpha too?

thanks.

icaromotta

02-09-2010 14:16:28

Is this impossible?

Altren

02-09-2010 15:47:57

You should do special skin for that.

icaromotta

02-09-2010 16:34:00

But, I could to get this text:

template<typename ValueType>
ValueType* MyGUI::List::getItemDataAt ( size_t _index,
bool _throw = true
) [inline]

Get item data from specified position.

Definition at line 94 of file MyGUI_List.h.


But, I do not know how to use this function.

Altren

02-09-2010 18:09:45

Item data is whatever data you stored in Item when created it or later. For example you can put some useful float value there and retrieve it with next code:
float value= *list->getItemDataAt<float>(index);

icaromotta

02-09-2010 18:26:48

So, would be thus:

lista->addItem("Icaro");
MyGUI::UString *s = lista->getItemDataAt<MyGUI::UString>(0); // error



But it crash

Altren

02-09-2010 18:34:03

original_list->addItem("Icaro", MyGUI::UString("my_string_here"));
MyGUI::UString *s = original_list->getItemDataAt<MyGUI::UString>(0);
// or
MyGUI::UString s = *original_list->getItemDataAt<MyGUI::UString>(0);

Altren

02-09-2010 18:34:51

For item name you can use getItemNameAt method.

icaromotta

02-09-2010 18:47:45

Thank you!!!!!!

But is appearing "Ícaro" and don't "my_string_here".


Is "Icaro" the item name and "my_string_here" the text should to appear?

how can I avoid text inside being alpha too in the skin xml file? Is there some property for this?