Questions tagged [scene2d]

Scene2d is a 2D scene graph for building applications and UIs using a hierarchy of "actors". Integrated in libGDX.

Scene2d is a 2D scene graph for building applications and UIs using a hierarchy of actors. Integrated in . It provides the following features:

  • Rotation and scale of a group is applied to all child actors. Child actors always work in their own coordinate system, parent transformations are applied transparently.

  • Simplified 2D drawing via SpriteBatch. Each actor draws in its own un-rotated and unscaled coordinate system where 0,0 is the bottom left corner of the actor.

  • Hit detection of rotated and scaled actors. Each actor determines if it is hit using its own un-rotated and unscaled coordinate system.

  • Routing of input and other events to the appropriate actor. The event system is flexible, enabling parent actors to handle events before or after children.

  • Action system for easy manipulation of actors over time. Actions can be chained and combined for complex effects.

519 questions
-1
votes
2 answers

Actor not moving in screen2d

I want to use moveToAction and move the actor. But its not moving if i use moveToAction. If change x,y in draw method it works, but not with movetoaction public class Aks extends Actor { private State state; private MainGame game; …
user93796
  • 18,749
  • 31
  • 94
  • 150
-1
votes
1 answer

What's the best way to build Game center/Play games type leaderboard in terms of UI in libGDX Scene2D?

I am trying to build user interface for leaderboard in my libGDX project using Scene2D. My benchmark is something like Google Play Games/ Game center leaderboard. Kind of like an overlay on an existing screen with refresh ability using slide down.…
Rohit Goyal
  • 1,521
  • 3
  • 24
  • 49
-1
votes
1 answer

Moving to next level with removal of the previous one

I have the following classes 1- Level Class which has Stage stage; MyActor[] myActors; boolean isCompleted = false; public void checkSolution() { if(myActor[0].getRotation() > 180) { isCompleted = true; } …
MAGS94
  • 500
  • 4
  • 15
-1
votes
1 answer

Image scale by width in both directions, without stretching the content in the center

I'm trying to set bigger width to my image but I need that the center part of the image remains without stretching. NinePatch assumes keeping corners from stretching, but I want something similar for the center part. I tried to set two different…
-1
votes
1 answer

Cannot change fontColor and alpha of SelectBox

How can I change the color of the SelectBox selected text font? The below code renders it white even though I set it orange. SelectBox.SelectBoxStyle sbs = new SelectBox.SelectBoxStyle(); sbs.background = new…
gogonapel
  • 788
  • 6
  • 17
-1
votes
2 answers

Unable to start activity error with Scene2D

We are trying to draw something with the scene2D from libGDX. We have our main activity then use the extends Androidapplication to initialize our testgame class. Here we define our screen and then make our stage and actors in the screen…
Jordi Sipkens
  • 595
  • 1
  • 9
  • 25
-2
votes
1 answer

TextTooltip not showing on android

I have not found a similar question anywhere, so I decided to post. The problem is that texttooltip is not showing on element on android, though works perfectly on desktop launch. I added some sysouts and app seems to detect enter and exit events…
redy5
  • 11
  • 1
-2
votes
1 answer

How can i remove a blank space at the top of a table in libgdx

I have been trying to remove a blank space at the beginning of a libgdx table (it is a table inside a table inside a scrollPane). The only thing I have found on the matter is to remove the line setFillParent(true); And I dont have that anywhere…
Arcxz
  • 65
  • 1
  • 11
-3
votes
1 answer

Stage2d changing background texture changes the camera zoom! BUG?

we are creating a small race game with a lot of fancy features, which deliever a small flavour of rpg depth. I have an infinity scrolling background (the road), that consist of 3 textures, which are moving down and go back, so this infitity…
EVO
  • 1
  • 3
1 2 3
34
35