com.badlogic.gdx.scenes.scene2d.utils.TiledDrawable Java Examples
The following examples show how to use
com.badlogic.gdx.scenes.scene2d.utils.TiledDrawable.
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: ScreenBackgroundViewController.java From gdx-vfx with Apache License 2.0 | 4 votes |
@LmlAction("createCheckerboardDrawable") Drawable createCheckerboardDrawable() { Texture texture = assets.get("bg-transparency-tile.png"); return new TiledDrawable(new TextureRegion(texture)); }
Example #2
Source File: BusyBar.java From gdx-texture-packer-gui with Apache License 2.0 | 4 votes |
public BusyBar(Style style) { this.style = style; patternDrawable = new TiledDrawable((TextureRegionDrawable) style.pattern); }
Example #3
Source File: ImageTiledLmlAttribute.java From gdx-texture-packer-gui with Apache License 2.0 | 4 votes |
@Override public void process(final LmlParser parser, final LmlTag tag, final Image actor, final String rawAttributeData) { Skin skin = parser.getData().getDefaultSkin(); TiledDrawable drawable = skin.getTiledDrawable(parser.parseString(rawAttributeData, actor)); actor.setDrawable(drawable); }
Example #4
Source File: TableTiledBackgroundLmlAttribute.java From gdx-texture-packer-gui with Apache License 2.0 | 4 votes |
@Override public void process(final LmlParser parser, final LmlTag tag, final Table actor, final String rawAttributeData) { Skin skin = parser.getData().getDefaultSkin(); TiledDrawable drawable = skin.getTiledDrawable(parser.parseString(rawAttributeData, actor)); actor.setBackground(drawable); }
Example #5
Source File: ScnWidget.java From bladecoder-adventure-engine with Apache License 2.0 | 4 votes |
public ScnWidget(Skin skin) { bigFont = skin.get("big-font", BitmapFont.class); defaultFont = skin.get("default-font", BitmapFont.class); setSize(150, 150); tile = new TiledDrawable(Ctx.assetManager.getIcon("transparent-light")); background = skin.getDrawable("background"); faRenderer.setViewport(getWidth(), getHeight()); setLayoutEnabled(true); addListener(inputListner); Ctx.project.addPropertyChangeListener(new PropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent e) { EditorLogger.debug("ScnWidget Listener: " + e.getPropertyName()); if (e.getPropertyName().equals(Project.NOTIFY_SCENE_SELECTED)) { if (!projectLoadedFlag) setSelectedScene(Ctx.project.getSelectedScene()); } else if (e.getPropertyName().equals(Project.NOTIFY_ACTOR_SELECTED)) { if (!projectLoadedFlag) setSelectedActor(Ctx.project.getSelectedActor()); } else if (e.getPropertyName().equals(Project.NOTIFY_ANIM_SELECTED)) { if (!projectLoadedFlag && Ctx.project.getSelectedFA() != null) setSelectedFA(Ctx.project.getSelectedFA()); } else if (e.getPropertyName().equals(Project.NOTIFY_PROJECT_LOADED)) { projectLoadedFlag = true; } else if (e.getPropertyName().equals("scene")) { setSelectedScene(Ctx.project.getSelectedScene()); setSelectedActor(Ctx.project.getSelectedActor()); } else if (e.getPropertyName().equals("init_animation")) { if (!inScene) setSelectedFA(null); } } }); showSpriteBounds = Boolean .parseBoolean(Ctx.project.getEditorConfig().getProperty("view.showSpriteBounds", "true")); inScene = Boolean.parseBoolean(Ctx.project.getEditorConfig().getProperty("view.inScene", "false")); animation = Boolean.parseBoolean(Ctx.project.getEditorConfig().getProperty("view.animation", "true")); scnMoveIcon = Ctx.assetManager.getIcon("scn_move"); scnRotateIcon = Ctx.assetManager.getIcon("scn_rotate"); scnScaleLockIcon = Ctx.assetManager.getIcon("scn_scale_lock"); scnScaleIcon = Ctx.assetManager.getIcon("scn_scale"); }