本文整理汇总了Java中com.badlogic.gdx.scenes.scene2d.ui.VerticalGroup类的典型用法代码示例。如果您正苦于以下问题:Java VerticalGroup类的具体用法?Java VerticalGroup怎么用?Java VerticalGroup使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
VerticalGroup类属于com.badlogic.gdx.scenes.scene2d.ui包,在下文中一共展示了VerticalGroup类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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();
}
开发者ID:TudorRosca,项目名称:enklave,代码行数:26,代码来源:ScreenChat.java
示例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();
}
开发者ID:TudorRosca,项目名称:enklave,代码行数:26,代码来源:ScreenChat.java
示例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);
}
开发者ID:Radomiej,项目名称:JavityEngine,代码行数:21,代码来源:JXmlUi.java
示例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);
}
}
开发者ID:czyzby,项目名称:gdx-lml,代码行数:21,代码来源:CellPadTopLmlAttribute.java
示例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);
}
}
开发者ID:czyzby,项目名称:gdx-lml,代码行数:21,代码来源:CellPadLeftLmlAttribute.java
示例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);
}
}
开发者ID:czyzby,项目名称:gdx-lml,代码行数:21,代码来源:CellPadRightLmlAttribute.java
示例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);
}
}
开发者ID:czyzby,项目名称:gdx-lml,代码行数:22,代码来源:CellAlignLmlAttribute.java
示例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);
}
}
开发者ID:czyzby,项目名称:gdx-lml,代码行数:21,代码来源:CellPadBottomLmlAttribute.java
示例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());
}
开发者ID:PhilippGrulich,项目名称:HAW-SE2-projecthorse,代码行数:24,代码来源:LootGallery.java
示例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());
}
开发者ID:pyros2097,项目名称:GdxStudio,代码行数:27,代码来源:Serializer.java
示例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;
}
开发者ID:bitbrain,项目名称:craft,代码行数:17,代码来源:ItemWidget.java
示例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;
}
开发者ID:e-ucm,项目名称:ead,代码行数:25,代码来源:VerticalLayoutProcessor.java
示例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();
}
开发者ID:MMORPG-Prototype,项目名称:MMORPG_Prototype,代码行数:37,代码来源:InventoryDialog.java
示例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);
}
}
开发者ID:czyzby,项目名称:gdx-lml,代码行数:14,代码来源:CellSpaceLmlAttribute.java
示例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);
}
开发者ID:PhilippGrulich,项目名称:HAW-SE2-projecthorse,代码行数:14,代码来源:Popup.java
示例16: Credits
import com.badlogic.gdx.scenes.scene2d.ui.VerticalGroup; //导入依赖的package包/类
/**
* Default Konstruktor.
*/
public Credits() {
// Laden und Abspielen der Hintergrundmusik
AssetManager.loadMusic("mainMenu");
music = audioManager.getMusic("mainMenu", "belotti.mp3");
if (!music.isPlaying()) {
music.setLooping(true);
music.play();
}
// stage initialisieren
stage = new Stage(getViewport());
InputManager.addInputProcessor(stage);
background = new Image(AssetManager.getTextureRegion("ui",
"panel_beige"));
background.setSize(width, height);
stage.addActor(background);
// Scroll Panel initialisieren
textContainer = new VerticalGroup();
initializeText();
scroller = new DefaultScrollPane(textContainer, height * 0.8f, width);
scroller.setPosition(0, height * 0.08f);
scroller.setupFadeScrollBars(1f, 2f);
scroller.setFadeScrollBars(true);
stage.addActor(scroller);
}
开发者ID:PhilippGrulich,项目名称:HAW-SE2-projecthorse,代码行数:32,代码来源:Credits.java
示例17: initTable
import com.badlogic.gdx.scenes.scene2d.ui.VerticalGroup; //导入依赖的package包/类
/**
* Initialisiert die Tabelle.
*/
private void initTable() {
table = new VerticalGroup();
table.setHeight((float) (height * 0.5));
table.setY((height / 2) - table.getHeight() / 2);
table.setWidth(width);
}
开发者ID:PhilippGrulich,项目名称:HAW-SE2-projecthorse,代码行数:11,代码来源:MainMenu.java
示例18: initTable
import com.badlogic.gdx.scenes.scene2d.ui.VerticalGroup; //导入依赖的package包/类
/**
* Initialisiert die Tabelle.
*/
private void initTable() {
table = new VerticalGroup();
table.setHeight((float) (height * 0.1));
table.setY((height / 2) - table.getHeight() / 2);
table.setWidth(width);
}
开发者ID:PhilippGrulich,项目名称:HAW-SE2-projecthorse,代码行数:11,代码来源:SplashScreen.java
示例19: setupUI
import com.badlogic.gdx.scenes.scene2d.ui.VerticalGroup; //导入依赖的package包/类
@Override
protected void setupUI(final PinnableWindow window, Object... params) {
final VerticalGroup items = new VerticalGroup();
items.left();
items.addAction(new Action() {
int hashCode = 0;
@Override
public boolean act(float delta) {
int hc = getInventory().hashCode();
if (hc != hashCode) {
hashCode = hc;
for (int i = 0; i < Item.ITEMS; i++) {
Item item = Item.getForId(i);
if (item == null) continue;
Actor a = items.findActor(i + "");
if (a != null) ((NonStackingInventoryListItem) a).setAmount(getInventory().get(item));
else items.addActor(new NonStackingInventoryListItem(window.getStage(), item, getInventory().get(item)));
}
}
return false;
}
});
window.row().pad(0).width(400);
final ScrollPane itemsWrap = new ScrollPane(items, Vloxlands.skin);
itemsWrap.setScrollbarsOnTop(false);
itemsWrap.setFadeScrollBars(false);
itemsWrap.setScrollingDisabled(true, false);
itemsWrap.getStyle().background.setLeftWidth(10);
itemsWrap.getStyle().background.setRightWidth(10);
itemsWrap.getStyle().background.setBottomHeight(10);
itemsWrap.getStyle().background.setTopHeight(10);
window.add(itemsWrap).left().maxHeight(100).minHeight(100).width(220).padRight(10).padRight(0);
}
开发者ID:Dakror,项目名称:Vloxlands,代码行数:37,代码来源:Warehouse.java
示例20: getHandledType
import com.badlogic.gdx.scenes.scene2d.ui.VerticalGroup; //导入依赖的package包/类
@Override
public Class<VerticalGroup> getHandledType() {
return VerticalGroup.class;
}
开发者ID:czyzby,项目名称:gdx-lml,代码行数:5,代码来源:VerticalGroupPaddingBottomLmlAttribute.java
注:本文中的com.badlogic.gdx.scenes.scene2d.ui.VerticalGroup类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论