Announcement

Collapse
No announcement yet.

DropDownList rollOver help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    DropDownList rollOver help

    I am trying to do something when the mouse rolls over the items in a dropDownList. I have it so the rollOver works when going over the dropDown itself, but not once its expanded and going over the items in the list. It only seems to want to work when over the actual widget.

    It works fine with a regular Scrolling List, but I'm think that might have a bit more functionality built in. Is there a difference in setting up rollOver between a scrollingList and a dropDownList?


    EDIT: After some more investigation it looks like a dropDownList is made up of multiple components.... mainly a ScrollingList for the list portion. My guess is then that I need to access that ScrollingList and not the dropdown itself, but how does that work? Or am I completely off here?

    #2
    bump...

    Hate to bump but this is the last remaining issue I have with our dropdowns after the cursor issue was solved. Now that I know the list portion of the dropdown is like a popup and a seperate piece from the main dropdown widget, how might I go about accessing that to register rollOvers?

    Comment


      #3
      I'll need to investigate this issue.

      Comment


        #4
        Thanks Matt... I register clicks and presses on the list just fine, but for whatever reason roll overs don't want to.

        Comment


          #5
          Ok, here is my current solution to registering mouse overs & selection of items in a drop down list. FYI, one of our CLIK devs here says simply calling DropDown.AddEventListener('CLIK_itemRollOver', onRollOver) should work, but it isn't for some reason. Therefore my solution below:

          Code:
          var GFxClikWidget DropDown, DropDownList
          
          event bool WidgetInitialized(name WidgetName, name WidgetPath, GFxObject Widget)
          {    
              switch(WidgetName)
              {                 
          	case ('drop_down'): // the instance name of the drop down in Flash
                      DropDown = GFxClikWidget(Widget);
          
                      // Now we get the drop down list, which is a subwidget of DropDown
          	    DropDownList = GFxClikWidget(DropDown.GetObject("dropdown", class'GFxClikWidget'));
          	    
                      // Listen for list item presses & item mouse overs
                      DropDownList.AddEventListener('CLIK_itemPress', onDropDownChange);
          	    DropDownList.AddEventListener('CLIK_itemRollOver', onRollOver);
          	    break;
                  default:
                      break;
              }
              return true;
          }
          
          defaultproperties
          {    
              WidgetBindings.Add((WidgetName="dm",WidgetClass=class'GFxClikWidget'))
          }

          Comment


            #6
            Your fix works like a charm.

            Thanks again Matt!

            Comment

            Working...
            X