Scene2D Select Box makes Screen Flash

Hey, I am using LibGDX’s Scene 2D and have added in a SelectBox. However when ever I click on it to select it the whole screen flashes
A Gif (Hopefully this shows you what I mean)

Edit: To see it better go to http://gyazo.com/adf1aefaa51413aadc49df96fd6daba0 and click on mp4

The code:


SelectBox engines = new SelectBox(new String[] { "Basic Engines", "Advanced Engines", "Advanced Engines" }, Game.ui.skin);
engines.setPosition(20, getHeight() - 240);
engines.setSize(250, 40);
addActor(engines);

Does anyone know how to stop this as it is annoying and looks odd.
Thanks in advance :slight_smile: !

I have been looking at the source code and I think it may be the fade in actions, yet I cannot remove them, because they are in a private subclass (SelectList).

Does anyone know how I could remove these actions or am I on the wrong track?

Thanks, Max

Source for SelectList and how it’s used?

It is a class in Select Box: https://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/scenes/scene2d/ui/SelectBox.java

Strange. Comment out the fade and see if that fixes it. Are you calling stage.act()? Maybe you draw other scene2d widgets without setting the color first? You can’t expect the SpriteBatch color to be white, other widgets may change it.

Thank you! I didn’t change the SpriteBatch’s colour before in my own widgets, but now I am it all works :slight_smile: