本文整理了Java中com.badlogic.gdx.scenes.scene2d.ui.Table.getStage()
方法的一些代码示例,展示了Table.getStage()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.getStage()
方法的具体详情如下:
包路径:com.badlogic.gdx.scenes.scene2d.ui.Table
类名称:Table
方法名:getStage
暂无
代码示例来源:origin: libgdx/libgdx
private void drawDebugRects (ShapeRenderer shapes) {
if (debugRects == null || !getDebug()) return;
shapes.set(ShapeType.Line);
shapes.setColor(getStage().getDebugColor());
float x = 0, y = 0;
if (!isTransform()) {
x = getX();
y = getY();
}
for (int i = 0, n = debugRects.size; i < n; i++) {
DebugRect debugRect = debugRects.get(i);
shapes.setColor(debugRect.color);
shapes.rect(x + debugRect.x, y + debugRect.y, debugRect.width, debugRect.height);
}
}
代码示例来源:origin: libgdx/libgdx
private void drawDebugRects (ShapeRenderer shapes) {
if (debugRects == null || !getDebug()) return;
shapes.set(ShapeType.Line);
shapes.setColor(getStage().getDebugColor());
float x = 0, y = 0;
if (!isTransform()) {
x = getX();
y = getY();
}
for (int i = 0, n = debugRects.size; i < n; i++) {
DebugRect debugRect = debugRects.get(i);
shapes.setColor(debugRect.color);
shapes.rect(x + debugRect.x, y + debugRect.y, debugRect.width, debugRect.height);
}
}
代码示例来源:origin: com.badlogicgames.gdx/gdx
private void drawDebugRects (ShapeRenderer shapes) {
if (debugRects == null || !getDebug()) return;
shapes.set(ShapeType.Line);
shapes.setColor(getStage().getDebugColor());
float x = 0, y = 0;
if (!isTransform()) {
x = getX();
y = getY();
}
for (int i = 0, n = debugRects.size; i < n; i++) {
DebugRect debugRect = debugRects.get(i);
shapes.setColor(debugRect.color);
shapes.rect(x + debugRect.x, y + debugRect.y, debugRect.width, debugRect.height);
}
}
代码示例来源:origin: kotcrab/vis-ui
/** Displays toast. Toast will be displayed for given amount of seconds. */
public void show (final Toast toast, float timeSec) {
Table toastMainTable = toast.getMainTable();
if (toastMainTable.getStage() != null) {
remove(toast);
}
toasts.add(toast);
toast.setToastManager(this);
toast.fadeIn();
toastMainTable.pack();
root.addActor(toastMainTable);
updateToastsPositions();
if (timeSec > 0) {
Timer.Task fadeOutTask = new Timer.Task() {
@Override
public void run () {
toast.fadeOut();
timersTasks.remove(toast);
}
};
timersTasks.put(toast, fadeOutTask);
Timer.schedule(fadeOutTask, timeSec);
}
}
代码示例来源:origin: crashinvaders/gdx-texture-packer-gui
/** Displays toast. Toast will be displayed for given amount of seconds. */
public Toast show (final Toast toast, float timeSec) {
Table toastMainTable = toast.getMainTable();
if (toastMainTable.getStage() != null) {
remove(toast);
}
toasts.add(toast);
toast.setToastManager(this);
toast.fadeIn();
toastMainTable.pack();
root.addActor(toastMainTable);
updateToastsPositions();
if (timeSec > 0) {
Timer.Task fadeOutTask = new Timer.Task() {
@Override
public void run () {
toast.fadeOut();
timersTasks.remove(toast);
}
};
timersTasks.put(toast, fadeOutTask);
Timer.schedule(fadeOutTask, timeSec);
}
return toast;
}
内容来源于网络,如有侵权,请联系作者删除!