1
public void show()
{
buttonsAtlas = new TextureAtlas("spellButton.pack"); //button atlas image
buttonSkin = new Skin();
buttonSkin.addRegions(buttonsAtlas);
font = new BitmapFont(Gdx.files.internal("WhiteAlpha.fnt"), false); //the font
font.setColor(Color.WHITE);
stage = new Stage(); // window is stage
stage.clear();
TextButton.TextButtonStyle ribbonStyle = new TextButton.TextButtonStyle(); //Shop title ribbon properties
ribbonStyle.up = buttonSkin.getDrawable("ribbon");
ribbonStyle.down = buttonSkin.getDrawable("ribbon");
ribbonStyle.font = font;
ribbon = new TextButton("SHOP", ribbonStyle); //shop title outlook adn textstyle
ribbon.setPosition(200, 1720);
ribbon.setSize(880, 200);
}LibGdx font.setColor(Color.WHITE)ありえない
私は、画像内の文字 "SHOP" を印刷したいです。しかし、イメージは暗い灰色の色ですので、私はfont.setColor(Color.WHITE)として白で文字 "SHOP"を印刷しようとしていますが、これは動作していません。
これは私の問題を解決しません。「SHOP」という単語はまだ黒で表示されています。 ( – user21478621
@Yukiiはあなたのフォントテクスチャ黒ですか?フォントテクスチャは白でなければなりません。白をカラーにすることができますが、白をカラーにすることができます。 – desertkun
フォントテクスチャは黒です元々白くしようとしています。 – user21478621