1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    3
    Vote Rating
    1
    JungDongJu is on a distinguished road

      0  

    Default Unanswered: How i use SpriteHandler?

    Unanswered: How i use SpriteHandler?


    Hi, i'm Dong ju.

    I wanna add MouseEvent to Sprite.

    I find SpriteHandler. But, I can't use this.

    i'm fool.. T_T please help me!

    //

    Before, I succesed in adding MouseEvent to AbsolutePanel.

    That is very Simple.. just do this.

    public class MyAbsolute extends AbsolutePanel implements HasMouseUpHandler{
    @Override
    public HandlerRegistration addMouseUpHandler(MouseUpHandler handler) {
    return addDomHandler(handler, MouseUpEvent.getType());
    }
    }

    Thanks in advance..

  2. #2
    Sencha - GXT Dev Team BrendanC's Avatar
    Join Date
    Aug 2010
    Posts
    534
    Answers
    3
    Vote Rating
    3
    BrendanC is on a distinguished road

      0  

    Default


    Good question. Because events are delegated by the DrawComponent to the sprites that is where you add your handlers. Using the BasicDrawExample you could add a selection handler like this:
    Code:
    DrawComponent component = new DrawComponent();    
    component.addSpriteSelectionHandler(new SpriteSelectionHandler() {
          @Override
          public void onSpriteSelect(SpriteSelectionEvent event) {
            Info.display("Sprite", event.getSprite().toString());
          }
        });

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar