com.badlogic.gdx.scenes.scene2d.ui.Container Java Examples
The following examples show how to use
com.badlogic.gdx.scenes.scene2d.ui.Container.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TabPanel.java From bladecoder-adventure-engine with Apache License 2.0 | 6 votes |
public TabPanel(Skin skin) { super(skin); this.skin = skin; buttonGroup = new ButtonGroup<Button>(); header = new HorizontalGroup(); body = new Container<Actor>(); tabs = new ArrayList<Tab>(); buttonGroup.setMaxCheckCount(1); buttonGroup.setMinCheckCount(1); buttonGroup.setUncheckLast(true); header.wrap(true); header.rowAlign(Align.left); add(header).expandX().fillX().left(); row(); add(body).expand().fill(); body.fill(); }
Example #2
Source File: MenuItemFillImageLmlAttribute.java From gdx-texture-packer-gui with Apache License 2.0 | 5 votes |
@Override public void process(final LmlParser parser, final LmlTag tag, final MenuItem actor, final String rawAttributeData) { Image image = new Image(parser.getData().getDefaultSkin().getDrawable(rawAttributeData)); Container<Image> imageContainer = new Container<>(image); imageContainer.setFillParent(true); imageContainer.align(Align.left); imageContainer.padLeft(25f); actor.addActor(imageContainer); }
Example #3
Source File: TabbedPane.java From riiablo with Apache License 2.0 | 5 votes |
public TabbedPane() { clickListener = new ClickListener() { @Override public void clicked(InputEvent event, float x, float y) { Button button = (Button) event.getListenerActor(); contentPanel.setActor(map.get(button.getName())); notifyTabSwitched(buttons.getChecked().getName(), button.getName()); } }; add(tabs = new VisTable()).growX().row(); add(new Image(VisUI.getSkin().getDrawable("list-selection"))).growX().row(); add(contentPanel = new Container<>()).align(Align.top).row(); }
Example #4
Source File: ProcessingNodeListViewItem.java From gdx-texture-packer-gui with Apache License 2.0 | 5 votes |
public void showLogWindow() { final String log = node.getLog(); if (Strings.isEmpty(log)) return; VisDialog dialog = (VisDialog)App.inst().getInterfaceService().getParser().parseTemplate(Gdx.files.internal("lml/dialogPackingLog.lml")).first(); Container containerLog = dialog.findActor("containerLog"); final VisScrollPane scrLog = dialog.findActor("scrLog"); final Button btnCopyToClipboard = dialog.findActor("btnCopyToClipboard"); VisLabel lblLog = new VisLabel("", "small") { // @Override // protected void sizeChanged() { // super.sizeChanged(); // // Scroll down scroller // scrLog.setScrollPercentY(1f); // } }; lblLog.setAlignment(Align.topLeft); lblLog.setWrap(true); lblLog.setText(log); containerLog.setActor(lblLog); btnCopyToClipboard.addListener(new ChangeListener() { @Override public void changed(ChangeEvent event, Actor actor) { Gdx.app.getClipboard().setContents(log); } }); dialog.getTitleLabel().setText(App.inst().getI18n().format("dialogTitlePackLog", node.getPack().getName())); dialog.show(getStage()); getStage().setScrollFocus(scrLog); }
Example #5
Source File: BottomMenu.java From Norii with Apache License 2.0 | 5 votes |
private void populateStatsGroup() { final float statsWidth = STATS_MENU_WIDTH_TILES * tileWidthPixel; final float statsHeight = BOTTOM_MENU_HEIGHT_TILES; statsGroup.setHeight(statsHeight); statsGroup.setWidth(statsWidth); statsGroup.align(Align.left); addLabelsToStatsGroup(); statsGroupContainer = new Container<Table>(statsGroup); bottomMenuTable.addActor(statsGroupContainer.prefSize(statsWidth, statsHeight)); statsGroup.setFillParent(true); }
Example #6
Source File: ContainerPadBottomLmlAttribute.java From gdx-vfx with Apache License 2.0 | 4 votes |
@Override protected void applyToCell(final Container<?> actor, final Cell<?> cell) { cell.padBottom(actor.getPadBottom()); // Any could do, height(Value) sets all. }
Example #7
Source File: ContainerPadRightLmlAttribute.java From gdx-vfx with Apache License 2.0 | 4 votes |
@Override protected void applyToContainer(final LmlParser parser, final LmlTag tag, final Container<?> actor, final String rawAttributeData) { actor.padRight(LmlUtilities.parseHorizontalValue(parser, tag.getParent(), actor, rawAttributeData)); }
Example #8
Source File: ContainerPadRightLmlAttribute.java From gdx-vfx with Apache License 2.0 | 4 votes |
@Override protected void applyToCell(final Container<?> actor, final Cell<?> cell) { cell.padRight(actor.getPadRight()); // Any could do, height(Value) sets all. }
Example #9
Source File: ContainerPadBottomLmlAttribute.java From gdx-vfx with Apache License 2.0 | 4 votes |
@Override protected void applyToContainer(final LmlParser parser, final LmlTag tag, final Container<?> actor, final String rawAttributeData) { actor.padBottom(LmlUtilities.parseHorizontalValue(parser, tag.getParent(), actor, rawAttributeData)); }
Example #10
Source File: ContainerPadTopLmlAttribute.java From gdx-vfx with Apache License 2.0 | 4 votes |
@Override protected void applyToContainer(final LmlParser parser, final LmlTag tag, final Container<?> actor, final String rawAttributeData) { actor.padTop(LmlUtilities.parseHorizontalValue(parser, tag.getParent(), actor, rawAttributeData)); }
Example #11
Source File: ContainerPadLmlAttribute.java From gdx-texture-packer-gui with Apache License 2.0 | 4 votes |
@Override public Class<Container<?>> getHandledType() { // Double cast as there were a problem with generics - SomeClass.class cannot be returned as // <Class<SomeClass<?>>, even though casting never throws ClassCastException in the end. return (Class<Container<?>>) (Object) Container.class; }
Example #12
Source File: ContainerPadLmlAttribute.java From gdx-texture-packer-gui with Apache License 2.0 | 4 votes |
@Override public void process(final LmlParser parser, final LmlTag tag, final Container<?> actor, final String rawAttributeData) { actor.padLeft(LmlUtilities.parseHorizontalValue(parser, tag.getParent(), actor, rawAttributeData)); }
Example #13
Source File: ContainerPadLmlAttribute.java From gdx-texture-packer-gui with Apache License 2.0 | 4 votes |
@Override public void process(final LmlParser parser, final LmlTag tag, final Container<?> actor, final String rawAttributeData) { actor.padRight(LmlUtilities.parseHorizontalValue(parser, tag.getParent(), actor, rawAttributeData)); }
Example #14
Source File: ContainerPadLmlAttribute.java From gdx-texture-packer-gui with Apache License 2.0 | 4 votes |
@Override public void process(final LmlParser parser, final LmlTag tag, final Container<?> actor, final String rawAttributeData) { actor.padTop(LmlUtilities.parseHorizontalValue(parser, tag.getParent(), actor, rawAttributeData)); }
Example #15
Source File: ContainerPadLmlAttribute.java From gdx-texture-packer-gui with Apache License 2.0 | 4 votes |
@Override public void process(final LmlParser parser, final LmlTag tag, final Container<?> actor, final String rawAttributeData) { actor.padBottom(LmlUtilities.parseHorizontalValue(parser, tag.getParent(), actor, rawAttributeData)); }
Example #16
Source File: ContainerPadLmlAttribute.java From gdx-texture-packer-gui with Apache License 2.0 | 4 votes |
@Override public void process(final LmlParser parser, final LmlTag tag, final Container<?> actor, final String rawAttributeData) { actor.pad(LmlUtilities.parseHorizontalValue(parser, tag.getParent(), actor, rawAttributeData)); }
Example #17
Source File: ContainerPadLeftLmlAttribute.java From gdx-vfx with Apache License 2.0 | 4 votes |
@Override protected void applyToCell(final Container<?> actor, final Cell<?> cell) { cell.padLeft(actor.getPadLeft()); // Any could do, height(Value) sets all. }
Example #18
Source File: ContainerPadLeftLmlAttribute.java From gdx-vfx with Apache License 2.0 | 4 votes |
@Override protected void applyToContainer(final LmlParser parser, final LmlTag tag, final Container<?> actor, final String rawAttributeData) { actor.padLeft(LmlUtilities.parseHorizontalValue(parser, tag.getParent(), actor, rawAttributeData)); }
Example #19
Source File: ContainerPadTopLmlAttribute.java From gdx-vfx with Apache License 2.0 | 4 votes |
@Override protected void applyToCell(final Container<?> actor, final Cell<?> cell) { cell.padTop(actor.getPadTop()); // Any could do, height(Value) sets all. }