Heffalumpen

Members
  • Content Count

    3
  • Joined

  • Last visited

About Heffalumpen

  • Rank
    Newbie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Heffalumpen

    Problem with zOrder

    I dug deep and found the problem. I actually mixed the order up as I first add the backgrounds, and then the text! Thanks for pointing this out!
  2. Heffalumpen

    Problem with zOrder

    I've added the code... very simple I thought.
  3. Heffalumpen

    Problem with zOrder

    I don't really know if this is a zOrder problem, as I've tried to adjust it. I'm creating a action menu for when the user clicks an object, user clicks the object this menu is shown down in the right corner. But there is something wrong with the ordering. As you can see there are three options; A, B and C. However A text is placed under the Sprite. The blue bubble is a sprite, created and added to the container. 'A' text is text, created and added to the container, after the blue bubble. I've tried to set both zIndex. blue bubble to 0, and text to 999. No effect. I've tried to add text as a child of the sprite as children should be placed above the parent. No effect. Source for the menu where I add the components to the parent container: var sprite = new PIXI.Sprite.from('assets/background.png'); sprite.anchor.x = 0.5; sprite.anchor.y = 0.5; sprite.position.x = -100; sprite.position.y = 50; var text = new PIXI.Text('A',{fontFamily : 'Arial', fontSize: 24, fill : 0xff1010, align : 'center'}); text.anchor.x = 0.5; text.anchor.y = 0.5; text.position.x = -100; text.position.y = 60; var container = new PIXI.Container(); container.addChild(sprite); container.addChild(text); this.stage.addChild(container);