Hello Guest

Author Topic: CreateProfile 2dtk UI  (Read 3250 times)

ironquark

  • Newbie
  • *
  • Posts: 14
    • View Profile
CreateProfile 2dtk UI
« on: November 22, 2015, 04:01:46 pm »
Hello,

I'm using a List of strings to store the information of the player of my game in the memory of the application.

See the image in attach or in this link:
http://postimg.org/image/z173i1fv5/

What component of 2dtk UI can be used for a ListBox? I need a component that stores a list of players and I can select one of them with the mouse, and will be an item selected as index.
      
My code:

Code: [Select]
List<string> MinhaLista = new List<string>();
//PlayerName
//level 0
// FullScreen
// 100
// 100
MinhaLista.Add(playername);
MinhaLista.Add("1");
MinhaLista.Add("FullScreen");
MinhaLista.Add("100");
MinhaLista.Add("100");

Thanks
« Last Edit: November 22, 2015, 04:04:18 pm by ironquark »

wagenheimer

  • 2D Toolkit
  • Jr. Member
  • *
  • Posts: 50
    • View Profile
Re: CreateProfile 2dtk UI
« Reply #1 on: November 23, 2015, 03:36:46 pm »
You can use 1 tk2dUIToggleButton per each ListBox item and tk2dUIToggleGroup to allow you to select only one.

ironquark

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: CreateProfile 2dtk UI
« Reply #2 on: November 23, 2015, 11:43:57 pm »
You can use 1 tk2dUIToggleButton per each ListBox item and tk2dUIToggleGroup to allow you to select only one.

Thank you for pointing a turn around!

I'm able to use ToggleGroup and I can check the current selected object/index.

Do you know how to change the ToggleButton caption?