Author Topic: Grid multiselect  (Read 6635 times)

lastkingssaint

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Grid multiselect
« on: November 29, 2016, 11:17:49 PM »
Hello, quick question,

Is there a way to have a grid with multiselect for the items within it? Is there preexisting functionality or do i have to build a script for it from scratch.?

My idea is to have like a 20 item grid, and then allow the user to select up to 5 at a time and then i will do something with that list.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Grid multiselect
« Reply #1 on: November 30, 2016, 03:29:03 PM »
How would that be different from just having a bunch of toggles?

lastkingssaint

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Re: Grid multiselect
« Reply #2 on: November 30, 2016, 07:49:21 PM »
You are correct, it is not different. Just started using toggles today.
I see that you can iterate through the toggle list to get all toggles. Is there a way to limit them for example if I want you to only be able to select 5 toggles max out of a list of 10. Do i need a toggle group to stop me from toggling the 6th item

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Grid multiselect
« Reply #3 on: December 02, 2016, 12:54:41 AM »
It's pretty much up to you. Create a script that references your list of toggles. Assign an OnChange delegate to each, inside this delegate check to see how many are toggled. If more than 5, change the value back.