【发布时间】:2017-08-11 17:50:38
【问题描述】:
无论我做什么,标签都是半透明的。
表格内的标签 (labelA,labelB,labelC) 最初是 0% 透明的,但一旦您将其文本设置为 labelA.setText("sometext");,它们就会像他们的兄弟 labelWarning 一样变得半透明。 labelWarning 一直是半透明的。我曾尝试将其单独添加到没有组的阶段(stage.addActor(labelWarning);),将其更改为a 为labelWarning.getColor().a=1;,但没有区别!期待您的帮助
Label.LabelStyle ls=new
Label.LabelStyle(screenGame.getFont(),Color.BROWN);
Label labelA=new Label("700 metre",ls);
Label labelB=new Label("700 metre",ls);
Label labelC=new Label("1500 metre",ls);
labelWarning=new Label("sd",ls);
labelWarning.setWrap(true);
labelWarning.setPosition(50,30);
labelWarning.setWidth(500);
labelWarning.setAlignment(Align.top);
tableEPS=new Table();
//tableEPS.debug();
tableEPS.row();
tableEPS.add(epgrass).pad(10f);
tableEPS.add(epdesert).pad(10f);
tableEPS.add(epsnow).pad(10f);
tableEPS.row();
tableEPS.add(labelA);
tableEPS.add(labelB);
tableEPS.add(labelC);
tableEPS.row();
tableEPS.setFillParent(true);
tableEPS.pack();
episodesGroup=new Group();
episodesGroup.setSize(worldwidth,worldheight);
episodesGroup.addActor(imagebgclouds);
episodesGroup.addActor(backbutton);
episodesGroup.addActor(tableEPS);
episodesGroup.addActor(labelWarning);
stage=new Stage(screenGame.getViewport());
stage.addActor(episodesGroup);
【问题讨论】:
标签: java android libgdx label scene2d