Hello Guest

Author Topic: DropDownMenu class explanations  (Read 4085 times)

Cherubyx

  • Newbie
  • *
  • Posts: 5
    • View Profile
DropDownMenu class explanations
« on: November 28, 2014, 02:53:21 pm »
Hello all,

I've looked through the documentation as well as previous forum posts but I haven't come across anyone or anything listing what the extra public variables were used for.
Could someone explain this for me?

I'm trying to implement an age check drop down bar that you often see on game sites when it contains mature content.

These are the variables that the class now gives me, the doc seems outdated:

Script: tk2dUIDropDownMenu
Drop Down Button: The button that causes the dropdown menu to appear
Selected Text Mesh: ??
Drop Down Item Template: ?? (Not sure what the difference is between the next set of variables)
Starting Item List: I assume I populate this with all my dates for example for the first drop down menu.
Starting Index: 0 (self explanatory)
Send Message on Selection: self explanatory
Menu LayoutItem: ??
Template LayoutItem Template:??

What is a selected text mesh (like what do i put in it?) and what are the differences between template layoutitem and menu layoutitem and drop down item template?
I've tried to mess around and it doesn't make a drop down menu no matter what on gameplay.

Thanks alot in advance. ;D
« Last Edit: November 28, 2014, 03:24:36 pm by Cherubyx »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: DropDownMenu class explanations
« Reply #1 on: November 29, 2014, 03:24:13 pm »
Selected text mesh = the text mesh that is drawn inside the button.
Dropdown item template = The item that is spawned to create the expanded dropdown menu. It looks the same in this demo, but they could look different (eg. dropdown = white on black for instance)

These two are layout items are only required if you're using auto-layout.
Menu layout item
Template layout item

personally, I really don't like how the dropdown menu works, I always prefer to simply make a second panel visible...

Cherubyx

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: DropDownMenu class explanations
« Reply #2 on: January 12, 2015, 06:07:58 pm »
Thanks for the reply, I've been trying to implement the scrolling instead of a drop down but with clipped edges on the top and bottom.
I haven't found a simple way using 2dToolkit to do this yet. Can someone give me some tips or hints?

As illustrated here for each column, attached below. (If approved by moderators)

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: DropDownMenu class explanations
« Reply #3 on: January 13, 2015, 02:15:26 pm »
You can use the tk2d UI mask to mask the top and bottom. Take a look at the mask UI sample.