About Store Forum Documentation Contact



Post Reply 
List problem
Author Message
Blitzbat Offline
Member

Post: #1
List problem
Hi ;-)

I have a strange problem with the gui list.

There are two columns. The first for the name (Str) and the second for the level(int).

The level is shown but the name is missing in the first column.

Any idea why?

Here is the code:

Code:
struct CharacterInfo
{
   Str name;
   int level;
   int id;  
}

ListColumn groups[] =
{      
  ListColumn(MEMBER(CharacterInfo, name), 0.6f, L"Character"),
  ListColumn(MEMBER(CharacterInfo, level), 0.1f, L"Level"),
};

void CharacterSelection.SetChars(Meml<CharacterInfo> &charlist)
{
   characterList.setData(charlist);
   region.setSize();
   Time.skipUpdate();
}

If I loop the charlist the name property is set correctly

Thanks!
09-06-2011 10:28 PM
Find all posts by this user Quote this message in a reply
Harry Offline
Member

Post: #2
RE: List problem
I've checked it and when I use Str for name I don't have name on the list too and have another funny things with names. Use Char array instead of Str (Char name[32] for example).
09-07-2011 08:35 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Blitzbat Offline
Member

Post: #3
RE: List problem
So Str cannot be used? But why? In the mmo exmaple he used Str too?
Okay!

I've found a solution.
If I set a class member as the data of the list then it works!

Give it a try! ;-)
(This post was last modified: 09-07-2011 10:23 PM by Blitzbat.)
09-07-2011 09:41 PM
Find all posts by this user Quote this message in a reply
Post Reply