Android Question Libgdx : Untouchable blackground

Discussion in 'Android Questions' started by ivavilagu, Mar 3, 2015.

  1. ivavilagu

    ivavilagu Member Licensed User

    Hi,

    Code:
    Dim background As lgScn2DImage
    Dim background_texture As lgTexture
    Dim ls As lgScn2DClickListener
    Dim Actions As lgScn2DActions

    background_texture.Initialize(
    "heaven.jpg")      
    background.Initialize4(background_texture, 
    "background")
    background.Touchable = background.TOUCHABLE_Disabled
    Stage.AddActor(background)
    ls.Initialize(
    "ls")
    Stage.AddCaptureListener(ls)

    Sub ls_Click(Event As lgScn2DInputEvent, X As Float, Y As Float)

        
    Event.target.addAction(Actions.Sequence2(Actions.FadeOut(3),Actions.Hide))

    End Sub

    I have a background image as a lgScn2DImage actor. I specified that the background doesn´t affect touch events changing the 'TOUCHABLE' value. Why at listener event the background is affected by the actions?
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice