本文整理了Java中com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup.getWidth()
方法的一些代码示例,展示了WidgetGroup.getWidth()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WidgetGroup.getWidth()
方法的具体详情如下:
包路径:com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup
类名称:WidgetGroup
方法名:getWidth
暂无
代码示例来源:origin: libgdx/libgdx
parentHeight = parent.getHeight();
if (getWidth() != parentWidth || getHeight() != parentHeight) {
setWidth(parentWidth);
setHeight(parentHeight);
代码示例来源:origin: libgdx/libgdx
parentHeight = parent.getHeight();
if (getWidth() != parentWidth || getHeight() != parentHeight) {
setWidth(parentWidth);
setHeight(parentHeight);
代码示例来源:origin: com.badlogicgames.gdx/gdx
parentHeight = parent.getHeight();
if (getWidth() != parentWidth || getHeight() != parentHeight) {
setWidth(parentWidth);
setHeight(parentHeight);
代码示例来源:origin: kotcrab/vis-ui
@Override
public boolean onEnd (Draggable draggable, Actor actor, float stageX, float stageY) {
boolean result = super.onEnd(draggable, actor, stageX, stageY);
if (result == APPROVE) return APPROVE;
if (dragged == false) return CANCEL;
// check if any actor corner is over some other tab
tabsPane.stageToLocalCoordinates(tmpVector.set(stageX, stageY));
if (tabsPane.hit(tmpVector.x, tmpVector.y, true) != null) return CANCEL;
if (tabsPane.hit(tmpVector.x + actor.getWidth(), tmpVector.y, true) != null) return CANCEL;
if (tabsPane.hit(tmpVector.x, tmpVector.y - actor.getHeight(), true) != null) return CANCEL;
if (tabsPane.hit(tmpVector.x + actor.getWidth(), tmpVector.y - actor.getHeight(), true) != null)
return CANCEL;
Vector2 stagePos = tabsPane.localToStageCoordinates(tmpVector.setZero());
tmpRect.set(stagePos.x, stagePos.y, tabsPane.getGroup().getWidth(), tabsPane.getGroup().getHeight());
if (tmpRect.contains(stageX, stageY) == false) return CANCEL;
if (tabsPane.isHorizontalFlow() || tabsPane.isVerticalFlow()) {
DRAG_POSITION.set(stageX, stageY);
tabsPane.addActor(actor);
return APPROVE;
}
return CANCEL;
}
});
内容来源于网络,如有侵权,请联系作者删除!