LibGdx Menu getting the same error over again

30 Views Asked by At

Hey new to coding and trying to make a very simple menu im getting stuck with a

Cannot resolve constructor 'TextButton(java.lang.String, com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle)'

error. here is my code

public void newGame (){

    Viewport viewport = new FitViewport(screenX, screenY);
    stage = new Stage(viewport, stage.getBatch());
    com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle newGameFont = new com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle(new BitmapFont(), Color.WHITE);
    Table table = new Table();
    table.center();
    table.setFillParent(true);

    TextButton startButton = new TextButton("Start", newGameFont);
    TextButton quitButton = new TextButton("Quit", newGameFont);



    stage.addActor(startButton);
    stage.addActor(quitButton);
    Gdx.gl.glClearColor(0, 0, 0, 1);
    Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
    stage.draw();


}

really appreciate any help

0

There are 0 best solutions below