I've one question left regarding the combobox
I want to fill it with a couple of strings, well there's the way you proposed:
Code:
static CChar8 *t[]=
{
"test",
"test aj",
"test ajshdkjas asjdhkqugwjeg jasda vb",
};
...
Gui+=combo.create(Rect_C(0.5f,-0.6,0.3,0.06),t,ELMS(t));
But I want it to fill it by using a std::vector of Str16 like:
Code:
void UICombobox::SetText(const std::vector<EE::Str16> & _value)
{
EE::Node<EE::CMenuElm> elements;
for (Int i=0; i < _value.size(); ++i)
{
EE::Node<EE::CMenuElm> &node = elements.add();
node.data.name = _value[i];
node.data.display_name = _value[i];
}
m_pEEControl->setData(elements);
}
This somehow works, but produces a much shorter context menu as with your method. Shorter means, it is scaled down to some unknown degree.
So the Button is within the normal size I designed it but if I click it the context menu pops up but is about 1/3 in size of the button.. don't know how this actually happens. Any idea?
Does setData(...) make a deep copy of the data or do I have to keep the strings i add within my own structure?
Thanks in advance!
Mfg Imp