本文整理了Java中com.badlogic.gdx.scenes.scene2d.ui.Label.invalidateHierarchy()
方法的一些代码示例,展示了Label.invalidateHierarchy()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Label.invalidateHierarchy()
方法的具体详情如下:
包路径:com.badlogic.gdx.scenes.scene2d.ui.Label
类名称:Label
方法名:invalidateHierarchy
暂无
代码示例来源:origin: libgdx/libgdx
public void setFontScale (float fontScaleX, float fontScaleY) {
fontScaleChanged = true;
this.fontScaleX = fontScaleX;
this.fontScaleY = fontScaleY;
invalidateHierarchy();
}
代码示例来源:origin: libgdx/libgdx
/** If false, the text will only wrap where it contains newlines (\n). The preferred size of the label will be the text bounds.
* If true, the text will word wrap using the width of the label. The preferred width of the label will be 0, it is expected
* that something external will set the width of the label. Wrapping will not occur when ellipsis is enabled. Default is false.
* <p>
* When wrap is enabled, the label's preferred height depends on the width of the label. In some cases the parent of the label
* will need to layout twice: once to set the width of the label and a second time to adjust to the label's new preferred
* height. */
public void setWrap (boolean wrap) {
this.wrap = wrap;
invalidateHierarchy();
}
代码示例来源:origin: libgdx/libgdx
/** If false, the text will only wrap where it contains newlines (\n). The preferred size of the label will be the text bounds.
* If true, the text will word wrap using the width of the label. The preferred width of the label will be 0, it is expected
* that something external will set the width of the label. Wrapping will not occur when ellipsis is enabled. Default is false.
* <p>
* When wrap is enabled, the label's preferred height depends on the width of the label. In some cases the parent of the label
* will need to layout twice: once to set the width of the label and a second time to adjust to the label's new preferred
* height. */
public void setWrap (boolean wrap) {
this.wrap = wrap;
invalidateHierarchy();
}
代码示例来源:origin: libgdx/libgdx
public void setFontScale (float fontScaleX, float fontScaleY) {
fontScaleChanged = true;
this.fontScaleX = fontScaleX;
this.fontScaleY = fontScaleY;
invalidateHierarchy();
}
代码示例来源:origin: libgdx/libgdx
public void setStyle (LabelStyle style) {
if (style == null) throw new IllegalArgumentException("style cannot be null.");
if (style.font == null) throw new IllegalArgumentException("Missing LabelStyle font.");
this.style = style;
cache = style.font.newFontCache();
invalidateHierarchy();
}
代码示例来源:origin: libgdx/libgdx
public void setStyle (LabelStyle style) {
if (style == null) throw new IllegalArgumentException("style cannot be null.");
if (style.font == null) throw new IllegalArgumentException("Missing LabelStyle font.");
this.style = style;
cache = style.font.newFontCache();
invalidateHierarchy();
}
代码示例来源:origin: libgdx/libgdx
public void render () {
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
drawn = 0;
stage.act(Gdx.graphics.getDeltaTime());
stage.draw();
drawnLabel.setText("Drawn: " + drawn + "/" + count);
drawnLabel.invalidateHierarchy();
}
代码示例来源:origin: libgdx/libgdx
/** @param newText May be null, "" will be used. */
public void setText (CharSequence newText) {
if (newText == null) newText = "";
if (newText instanceof StringBuilder) {
if (text.equals(newText)) return;
text.setLength(0);
text.append((StringBuilder)newText);
} else {
if (textEquals(newText)) return;
text.setLength(0);
text.append(newText);
}
intValue = Integer.MIN_VALUE;
invalidateHierarchy();
}
代码示例来源:origin: libgdx/libgdx
/** @param newText May be null, "" will be used. */
public void setText (CharSequence newText) {
if (newText == null) newText = "";
if (newText instanceof StringBuilder) {
if (text.equals(newText)) return;
text.setLength(0);
text.append((StringBuilder)newText);
} else {
if (textEquals(newText)) return;
text.setLength(0);
text.append(newText);
}
intValue = Integer.MIN_VALUE;
invalidateHierarchy();
}
代码示例来源:origin: libgdx/libgdx
if (prefHeight != lastPrefHeight) {
lastPrefHeight = prefHeight;
invalidateHierarchy();
代码示例来源:origin: libgdx/libgdx
if (prefHeight != lastPrefHeight) {
lastPrefHeight = prefHeight;
invalidateHierarchy();
代码示例来源:origin: com.badlogicgames.gdx/gdx
/** If false, the text will only wrap where it contains newlines (\n). The preferred size of the label will be the text bounds.
* If true, the text will word wrap using the width of the label. The preferred width of the label will be 0, it is expected
* that something external will set the width of the label. Wrapping will not occur when ellipsis is enabled. Default is false.
* <p>
* When wrap is enabled, the label's preferred height depends on the width of the label. In some cases the parent of the label
* will need to layout twice: once to set the width of the label and a second time to adjust to the label's new preferred
* height. */
public void setWrap (boolean wrap) {
this.wrap = wrap;
invalidateHierarchy();
}
代码示例来源:origin: com.badlogicgames.gdx/gdx
public void setFontScale (float fontScaleX, float fontScaleY) {
fontScaleChanged = true;
this.fontScaleX = fontScaleX;
this.fontScaleY = fontScaleY;
invalidateHierarchy();
}
代码示例来源:origin: com.badlogicgames.gdx/gdx
public void setStyle (LabelStyle style) {
if (style == null) throw new IllegalArgumentException("style cannot be null.");
if (style.font == null) throw new IllegalArgumentException("Missing LabelStyle font.");
this.style = style;
cache = style.font.newFontCache();
invalidateHierarchy();
}
代码示例来源:origin: com.badlogicgames.gdx/gdx
/** @param newText May be null, "" will be used. */
public void setText (CharSequence newText) {
if (newText == null) newText = "";
if (newText instanceof StringBuilder) {
if (text.equals(newText)) return;
text.setLength(0);
text.append((StringBuilder)newText);
} else {
if (textEquals(newText)) return;
text.setLength(0);
text.append(newText);
}
intValue = Integer.MIN_VALUE;
invalidateHierarchy();
}
代码示例来源:origin: com.badlogicgames.gdx/gdx
if (prefHeight != lastPrefHeight) {
lastPrefHeight = prefHeight;
invalidateHierarchy();
内容来源于网络,如有侵权,请联系作者删除!