本文整理了Java中com.badlogic.gdx.scenes.scene2d.ui.Table.getColor()
方法的一些代码示例,展示了Table.getColor()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.getColor()
方法的具体详情如下:
包路径:com.badlogic.gdx.scenes.scene2d.ui.Table
类名称:Table
方法名:getColor
暂无
代码示例来源:origin: libgdx/libgdx
/** Called to draw the background, before clipping is applied (if enabled). Default implementation draws the background
* drawable. */
protected void drawBackground (Batch batch, float parentAlpha, float x, float y) {
if (background == null) return;
Color color = getColor();
batch.setColor(color.r, color.g, color.b, color.a * parentAlpha);
background.draw(batch, x, y, getWidth(), getHeight());
}
代码示例来源:origin: libgdx/libgdx
/** Called to draw the background, before clipping is applied (if enabled). Default implementation draws the background
* drawable. */
protected void drawBackground (Batch batch, float parentAlpha, float x, float y) {
if (background == null) return;
Color color = getColor();
batch.setColor(color.r, color.g, color.b, color.a * parentAlpha);
background.draw(batch, x, y, getWidth(), getHeight());
}
代码示例来源:origin: libgdx/libgdx
protected void drawBackground (Batch batch, float parentAlpha, float x, float y) {
super.drawBackground(batch, parentAlpha, x, y);
// Manually draw the title table before clipping is done.
titleTable.getColor().a = getColor().a;
float padTop = getPadTop(), padLeft = getPadLeft();
titleTable.setSize(getWidth() - padLeft - getPadRight(), padTop);
titleTable.setPosition(padLeft, getHeight() - padTop);
drawTitleTable = true;
titleTable.draw(batch, parentAlpha);
drawTitleTable = false; // Avoid drawing the title table again in drawChildren.
}
代码示例来源:origin: libgdx/libgdx
protected void drawBackground (Batch batch, float parentAlpha, float x, float y) {
super.drawBackground(batch, parentAlpha, x, y);
// Manually draw the title table before clipping is done.
titleTable.getColor().a = getColor().a;
float padTop = getPadTop(), padLeft = getPadLeft();
titleTable.setSize(getWidth() - padLeft - getPadRight(), padTop);
titleTable.setPosition(padLeft, getHeight() - padTop);
drawTitleTable = true;
titleTable.draw(batch, parentAlpha);
drawTitleTable = false; // Avoid drawing the title table again in drawChildren.
}
代码示例来源:origin: com.badlogicgames.gdx/gdx
/** Called to draw the background, before clipping is applied (if enabled). Default implementation draws the background
* drawable. */
protected void drawBackground (Batch batch, float parentAlpha, float x, float y) {
if (background == null) return;
Color color = getColor();
batch.setColor(color.r, color.g, color.b, color.a * parentAlpha);
background.draw(batch, x, y, getWidth(), getHeight());
}
代码示例来源:origin: com.github.xaguzman/gamedevlib-libgdx
protected void drawBackground (Batch batch, float parentAlpha, float x, float y) {
super.drawBackground(batch, parentAlpha, x, y);
// Manually draw the title table before clipping is done.
titleTable.getColor().a = getColor().a;
float padTop = getPadTop(), padLeft = getPadLeft();
titleTable.setSize(getWidth() - padLeft - getPadRight(), padTop);
titleTable.setPosition(padLeft, getHeight() - padTop);
drawTitleTable = true;
titleTable.draw(batch, parentAlpha);
drawTitleTable = false; // Avoid drawing the title table again in drawChildren.
}
代码示例来源:origin: com.badlogicgames.gdx/gdx
protected void drawBackground (Batch batch, float parentAlpha, float x, float y) {
super.drawBackground(batch, parentAlpha, x, y);
// Manually draw the title table before clipping is done.
titleTable.getColor().a = getColor().a;
float padTop = getPadTop(), padLeft = getPadLeft();
titleTable.setSize(getWidth() - padLeft - getPadRight(), padTop);
titleTable.setPosition(padLeft, getHeight() - padTop);
drawTitleTable = true;
titleTable.draw(batch, parentAlpha);
drawTitleTable = false; // Avoid drawing the title table again in drawChildren.
}
代码示例来源:origin: manuelbua/uracer-kotd
@Override
protected void drawBackground (Batch batch, float parentAlpha, float x, float y) {
float width = getWidth(), height = getHeight();
float padTop = getPadTop();
super.drawBackground(batch, parentAlpha, x, y);
// Draw button table.
buttonTable.getColor().a = getColor().a;
buttonTable.pack();
buttonTable.setPosition(width - buttonTable.getWidth(), Math.min(height - padTop, height - buttonTable.getHeight()));
buttonTable.draw(batch, parentAlpha);
// Draw the title without the batch transformed or clipping applied.
y += height;
TextBounds bounds = titleCache.getBounds();
if ((titleAlignment & Align.left) != 0)
x += getPadLeft();
else if ((titleAlignment & Align.right) != 0)
x += width - bounds.width - getPadRight();
else
x += (width - bounds.width) / 2;
if ((titleAlignment & Align.top) == 0) {
if ((titleAlignment & Align.bottom) != 0)
y -= padTop - bounds.height;
else
y -= (padTop - bounds.height) / 2;
}
titleCache.setColors(tmpColor.set(getColor()).mul(style.titleFontColor));
titleCache.setPosition((int)x, (int)y - 15); // HACK for Kenney's skin only!!
titleCache.draw(batch, parentAlpha);
}
代码示例来源:origin: dsaltares/libgdx-cookbook
table.getColor().a = 0f;
代码示例来源:origin: dsaltares/libgdx-cookbook
table.getColor().a = 0f;
内容来源于网络,如有侵权,请联系作者删除!