本文整理汇总了Java中com.badlogic.gdx.scenes.scene2d.ui.VerticalGroup类的典型用法代码示例。如果您正苦于以下问题:Java VerticalGroup类的具体用法?Java VerticalGroup怎么用?Java VerticalGroup使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
VerticalGroup类属于com.badlogic.gdx.scenes.scene2d.ui包,在下文中一共展示了VerticalGroup类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Addtogroup
import com.badlogic.gdx.scenes.scene2d.ui.VerticalGroup; //导入依赖的package包/类
public void Addtogroup(){
grchatfaction = new VerticalGroup();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd/HH:mm:ss");
try {
grchatfaction.addActor(addComment(sdf.parse("2016/5/17/13:34:23"),"adrian", Color.BLUE,"Welcome Chat!"));
grchatfaction.addActor(addComment(sdf.parse("2016/5/17/13:34:23"),"adrian", Color.BLUE,"Faction!"));
grchatfaction.addActor(labelTest1);
} catch (ParseException e) {
e.printStackTrace();
Gdx.app.log("eroare","intra");
}
sp = new ScrollPane(grchatfaction);
sp.layout();
sp.setScrollingDisabled(true, false);
sp.setFillParent(true);sp.setLayoutEnabled(true);
ta = new Table();
ta.setFillParent(false);
ta.add(sp).fill().expand();
ta.setBounds(WIDTH *0.05f,background1.getY(), WIDTH*0.9f,background1.getHeight() * 1.05f);
ta.setVisible(false);
groupbotttom.addActor(ta);
sp.setScrollPercentY(200);
sp.act(Gdx.graphics.getDeltaTime());
sp.updateVisualScroll();
}
示例2: addchatlocation
import com.badlogic.gdx.scenes.scene2d.ui.VerticalGroup; //导入依赖的package包/类
public void addchatlocation(){
grchatlocation = new VerticalGroup();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd/HH:mm:ss");
try {
grchatlocation.addActor(addComment(sdf.parse("2016/5/17/13:34:23"),"adrian", Color.RED,"Welcome Chat!"));
grchatlocation.addActor(addComment(sdf.parse("2016/5/17/13:34:23"),"adrian", Color.GREEN,"Location!"));
grchatlocation.addActor(labelTest);
} catch (ParseException e) {
e.printStackTrace();
Gdx.app.log("eroare","intra");
}
scrollchatpublic = new ScrollPane(grchatlocation);
scrollchatpublic.layout();
scrollchatpublic.setScrollingDisabled(true, false);
scrollchatpublic.setFillParent(true);
scrollchatpublic.setLayoutEnabled(true);
tablechatpublic = new Table();
tablechatpublic.setFillParent(false);
tablechatpublic.add(scrollchatpublic).fill().expand();
tablechatpublic.setBounds(WIDTH *0.05f,background1.getY(), WIDTH*0.9f,background1.getHeight() * 1.05f);
groupbotttom.addActor(tablechatpublic);
scrollchatpublic.setScrollPercentY(100);
scrollchatpublic.act(Gdx.graphics.getDeltaTime());
scrollchatpublic.updateVisualScroll();
}
示例3: addVerticalGroup
import com.badlogic.gdx.scenes.scene2d.ui.VerticalGroup; //导入依赖的package包/类
private void addVerticalGroup(Table table, Element element) {
VerticalGroup verticalGroup = new VerticalGroup();
ScrollPane scrollPane = new ScrollPane(verticalGroup, skin);
Cell<ScrollPane> cell = table.add(scrollPane);
ObjectMap<String, String> atrributes = element.getAttributes();
if (atrributes == null) {
atrributes = new ObjectMap<String, String>();
}
for (String key : atrributes.keys()) {
if (key.equalsIgnoreCase("name")) {
verticalGroup.setName(atrributes.get(key));
}
}
cellPrepare(cell, atrributes);
// addChildrens(element, horizontalGroup);
actorsMap.put(verticalGroup.getName(), verticalGroup);
}
示例4: processForActor
import com.badlogic.gdx.scenes.scene2d.ui.VerticalGroup; //导入依赖的package包/类
@Override
protected void processForActor(final LmlParser parser, final LmlTag tag, final Actor actor,
final String rawAttributeData) {
// Parsed if actor is not in a cell:
if (actor instanceof Table) {
final Value verticalValue = LmlUtilities.parseVerticalValue(parser, tag.getParent(), actor,
rawAttributeData);
((Table) actor).padTop(verticalValue);
} else if (actor instanceof VerticalGroup) {
((VerticalGroup) actor).padTop(parser.parseFloat(rawAttributeData, actor));
} else if (actor instanceof HorizontalGroup) {
((HorizontalGroup) actor).padTop(parser.parseFloat(rawAttributeData, actor));
} else if (actor instanceof Container<?>) {
((Container<?>) actor)
.padTop(LmlUtilities.parseVerticalValue(parser, tag.getParent(), actor, rawAttributeData));
} else {
// Exception:
super.processForActor(parser, tag, actor, rawAttributeData);
}
}
示例5: processForActor
import com.badlogic.gdx.scenes.scene2d.ui.VerticalGroup; //导入依赖的package包/类
@Override
protected void processForActor(final LmlParser parser, final LmlTag tag, final Actor actor,
final String rawAttributeData) {
// Parsed if actor is not in a cell:
if (actor instanceof Table) {
final Value horizontalValue = LmlUtilities.parseHorizontalValue(parser, tag.getParent(), actor,
rawAttributeData);
((Table) actor).padLeft(horizontalValue);
} else if (actor instanceof VerticalGroup) {
((VerticalGroup) actor).padLeft(parser.parseFloat(rawAttributeData, actor));
} else if (actor instanceof HorizontalGroup) {
((HorizontalGroup) actor).padLeft(parser.parseFloat(rawAttributeData, actor));
} else if (actor instanceof Container<?>) {
((Container<?>) actor)
.padLeft(LmlUtilities.parseHorizontalValue(parser, tag.getParent(), actor, rawAttributeData));
} else {
// Exception:
super.processForActor(parser, tag, actor, rawAttributeData);
}
}
示例6: processForActor
import com.badlogic.gdx.scenes.scene2d.ui.VerticalGroup; //导入依赖的package包/类
@Override
protected void processForActor(final LmlParser parser, final LmlTag tag, final Actor actor,
final String rawAttributeData) {
// Parsed if actor is not in a cell:
if (actor instanceof Table) {
final Value horizontalValue = LmlUtilities.parseHorizontalValue(parser, tag.getParent(), actor,
rawAttributeData);
((Table) actor).padRight(horizontalValue);
} else if (actor instanceof VerticalGroup) {
((VerticalGroup) actor).padRight(parser.parseFloat(rawAttributeData, actor));
} else if (actor instanceof HorizontalGroup) {
((HorizontalGroup) actor).padRight(parser.parseFloat(rawAttributeData, actor));
} else if (actor instanceof Container<?>) {
((Container<?>) actor)
.padRight(LmlUtilities.parseHorizontalValue(parser, tag.getParent(), actor, rawAttributeData));
} else {
// Exception:
super.processForActor(parser, tag, actor, rawAttributeData);
}
}
示例7: processForActor
import com.badlogic.gdx.scenes.scene2d.ui.VerticalGroup; //导入依赖的package包/类
@Override
protected void processForActor(final LmlParser parser, final LmlTag tag, final Actor actor,
final String rawAttributeData) {
// Applied if not in a cell.
if (actor instanceof Label) {
((Label) actor).setAlignment(LmlUtilities.parseAlignment(parser, actor, rawAttributeData));
} else if (actor instanceof Table) {
((Table) actor).align(LmlUtilities.parseAlignment(parser, actor, rawAttributeData));
} else if (actor instanceof Image) {
((Image) actor).setAlign(LmlUtilities.parseAlignment(parser, actor, rawAttributeData));
} else if (actor instanceof HorizontalGroup) {
((HorizontalGroup) actor).align(LmlUtilities.parseAlignment(parser, actor, rawAttributeData));
} else if (actor instanceof VerticalGroup) {
((VerticalGroup) actor).align(LmlUtilities.parseAlignment(parser, actor, rawAttributeData));
} else if (actor instanceof TextField) {
((TextField) actor).setAlignment(LmlUtilities.parseAlignment(parser, actor, rawAttributeData));
} else {
// Exception:
super.processForActor(parser, tag, actor, rawAttributeData);
}
}
示例8: processForActor
import com.badlogic.gdx.scenes.scene2d.ui.VerticalGroup; //导入依赖的package包/类
@Override
protected void processForActor(final LmlParser parser, final LmlTag tag, final Actor actor,
final String rawAttributeData) {
// Parsed if actor is not in a cell:
if (actor instanceof Table) {
final Value verticalValue = LmlUtilities.parseVerticalValue(parser, tag.getParent(), actor,
rawAttributeData);
((Table) actor).padBottom(verticalValue);
} else if (actor instanceof VerticalGroup) {
((VerticalGroup) actor).padBottom(parser.parseFloat(rawAttributeData, actor));
} else if (actor instanceof HorizontalGroup) {
((HorizontalGroup) actor).padBottom(parser.parseFloat(rawAttributeData, actor));
} else if (actor instanceof Container<?>) {
((Container<?>) actor)
.padBottom(LmlUtilities.parseVerticalValue(parser, tag.getParent(), actor, rawAttributeData));
} else {
// Exception:
super.processForActor(parser, tag, actor, rawAttributeData);
}
}
示例9: initializeUiElements
import com.badlogic.gdx.scenes.scene2d.ui.VerticalGroup; //导入依赖的package包/类
/**
* Initialisiert die UI-Elemente.
*/
private void initializeUiElements() {
DefaultScrollPane tableContainer;
tableWidth = width - 150;
tableHeight = height - 300;
lootTable = new VerticalGroup();
lootTable.space(10);
lootTable.align(Align.left + Align.top);
lootTable.setWidth(tableWidth);
tableContainer = new DefaultScrollPane(lootTable, tableHeight,
tableWidth);
tableContainer.setPosition(75, 50);
tableContainer.toFront();
stage.addActor(tableContainer);
// switch button erstellen
stage.addActor(createSwitchButton());
}
示例10: setup
import com.badlogic.gdx.scenes.scene2d.ui.VerticalGroup; //导入依赖的package包/类
public static void setup(){
registerSerializer(Actor.class, new ActorSerializer());
registerSerializer(Scene.class, new SceneSerializer());
registerSerializer(ImageJson.class, new ImageJson());
registerSerializer(Label.class, new LabelSerializer());
registerSerializer(Button.class, new ButtonSerializer());
registerSerializer(TextButton.class, new TextButtonSerializer());
registerSerializer(Table.class, new TableSerializer());
registerSerializer(CheckBox.class, new CheckBoxSerializer());
registerSerializer(SelectBox.class, new SelectBoxSerializer());
registerSerializer(List.class, new ListSerializer());
registerSerializer(Slider.class, new SliderSerializer());
registerSerializer(TextField.class, new TextFieldSerializer());
registerSerializer(Touchpad.class, new TouchpadSerializer());
registerSerializer(Sprite.class, new SpriteSerializer());
registerSerializer(Dialog.class, new DialogSerializer());
registerSerializer(SplitPane.class, new SplitPaneSerializer());
registerSerializer(ScrollPane.class, new ScrollPaneSerializer());
registerSerializer(Stack.class, new StackSerializer());
registerSerializer(Tree.class, new TreeSerializer());
registerSerializer(Table.class, new TableSerializer());
registerSerializer(ButtonGroup.class, new ButtonGroupSerializer());
registerSerializer(HorizontalGroup.class, new HorizontalGroupSerializer());
registerSerializer(VerticalGroup.class, new VerticalGroupSerializer());
}
示例11: generateRight
import com.badlogic.gdx.scenes.scene2d.ui.VerticalGroup; //导入依赖的package包/类
private Actor generateRight(Item item) {
VerticalGroup layout = new VerticalGroup();
layout.align(Align.left);
layout.padLeft(15f);
name.setColor(item.getRarity().getColor());
name.setFontScale(0.90f);
layout.addActor(name);
Table descContainer = new Table();
level = new StarLevelWidget(item.getLevel(), 7);
availability = new AvailabilityIcon(item);
descContainer.add(level);
descContainer.right().add(availability).padLeft(70f).padTop(27f);
layout.addActor(descContainer);
layout.setTouchable(Touchable.disabled);
return layout;
}
示例12: getComponent
import com.badlogic.gdx.scenes.scene2d.ui.VerticalGroup; //导入依赖的package包/类
@Override
public Component getComponent(VerticalLayout component) {
VerticalLayoutComponent verticalLayout = gameLoop
.createComponent(VerticalLayoutComponent.class);
for (Control control : component.getControls()) {
addControls(verticalLayout,
componentLoader.toEngineComponent(control));
}
VerticalGroup group = verticalLayout.getControl();
switch (component.getAlign()) {
case LEFT:
group.left();
break;
case CENTER:
group.center();
break;
case RIGHT:
group.right();
break;
}
group.pack();
return verticalLayout;
}
示例13: InventoryDialog
import com.badlogic.gdx.scenes.scene2d.ui.VerticalGroup; //导入依赖的package包/类
public InventoryDialog(UserInterface linkedInterface, Integer linkedFieldGold)
{
super("Inventory", Settings.DEFAULT_SKIN);
this.linkedInterface = linkedInterface;
Button closeButton = new CloseButton(this);
getTitleTable().add(closeButton).size(15, 15).padRight(-5).top().right();
for (int i = 0; i < numberOfPages; i++)
inventoryPages.add(new InventoryPage(this, i));
currentPageButtons.addActor(inventoryPages.get(0));
addActor(currentPageButtons);
Table contentTable = this.getContentTable();
contentTable.add(currentPageButtons);
VerticalGroup switchButtons = new VerticalGroup().space(0).pad(0).top().padTop(-8).fill();
for (int i = 0; i < numberOfPages; i++)
{
InventoryTextField<Item> switchButton = createSwitchButton(i);
switchButtons.addActor(switchButton);
switchPageButtons.add(switchButton);
}
switchPageButtons.get(0).setColor(0.5f, 0.5f, 0.5f, 1);
contentTable.add(switchButtons);
contentTable.row();
goldLabel.setValue(linkedFieldGold);
goldLabel.update();
contentTable.add(goldLabel).left();
contentTable.row();
this.setX(1230);
this.setY(43);
this.pack();
}
示例14: processForActor
import com.badlogic.gdx.scenes.scene2d.ui.VerticalGroup; //导入依赖的package包/类
@Override
protected void processForActor(final LmlParser parser, final LmlTag tag, final Actor actor,
final String rawAttributeData) {
// Parsed if actor is not in a cell:
if (actor instanceof VerticalGroup) {
((VerticalGroup) actor).space(parser.parseFloat(rawAttributeData, actor));
} else if (actor instanceof HorizontalGroup) {
((HorizontalGroup) actor).space(parser.parseFloat(rawAttributeData, actor));
} else {
// Exception:
super.processForActor(parser, tag, actor, rawAttributeData);
}
}
示例15: createContentGroup
import com.badlogic.gdx.scenes.scene2d.ui.VerticalGroup; //导入依赖的package包/类
/**
* Inizialisierung der VerticalGroup.
*/
private void createContentGroup() {
contentGroup = new VerticalGroup();
contentGroup.space(10);
contentGroup.setHeight(popupHeight);
contentGroup.setWidth(popupWidth);
contentGroup.align(Align.center);
content.addActor(contentGroup);
}