Не отображается Label в libGdx

не отрисовывается Label

descriptionTech - переменная Label

ObjectMap.Entries<Technology, TextButton> its=layoutMapping.iterator();
        while (its.hasNext())
        {
            ObjectMap.Entry<Technology, TextButton> currents=its.next();
            TextButton current=currents.value;
            Vector2 mouseScreenPosition = new Vector2(Gdx.input.getX(), Gdx.input.getY());
            Vector2 mouseLocalPosition = current.screenToLocalCoordinates(mouseScreenPosition);
            if(current.hit(mouseLocalPosition.x, mouseLocalPosition.y, false)!=null)
            {
               descriptionTech.setText(currents.key.getDescription());
               descriptionTech.setPosition(mouseLocalPosition.x, mouseLocalPosition.y);


            }
            break;
        }

Тут я пробегаюсь по всем кнопкам и проверяю,когда мышь наведена на ту или иную кнопку.И я хочу ,что бы в месте,где находится мышь - появлялось окно с текстом. Но это не получается.

Я ее добавляю в Stage методом addActor.В методе render stage.act() и stage.draw();


Ответы (0 шт):