Package org.spout.api.component.widget

Examples of org.spout.api.component.widget.RenderPartComponent


        label = ((Client) VanillaPlugin.getInstance().getEngine()).getScreenStack().createWidget();
        VanillaPlugin plugin = VanillaPlugin.getInstance();
        popup.setGrabsMouse(false);

        // Setup the window to render
        RenderPartComponent backgroundRect = background.add(RenderPartComponent.class);
        backgroundRect.setRenderMaterial(type.getRenderMaterial());
        backgroundRect.setSprite(new Rectangle(-WIDTH * SCALE, -WIDTH, HEIGHT * 2 * SCALE, HEIGHT * 2));
        backgroundRect.setSource(new Rectangle(0, 0, WIDTH, HEIGHT));
        popup.attachWidget(plugin, background);

        // Draw title
        LabelComponent labelComponent = label.add(LabelComponent.class);
        labelComponent.setFont(VanillaRenderMaterials.FONT);
View Full Code Here


public class VanillaCrosshair extends CrosshairWidget {
  @Override
  public void init(Widget crosshair, HUD hud) {
    super.init(crosshair, hud);
    final RenderPartComponent crosshairRect = widget.add(RenderPartComponent.class);
    crosshairRect.setRenderMaterial(VanillaRenderMaterials.ICONS_MATERIAL);
    crosshairRect.setColor(Color.WHITE);
    crosshairRect.setSprite(new Rectangle(-0.0625f * SCALE, -0.0625f, 0.125f * SCALE, 0.125f));
    crosshairRect.setSource(new Rectangle(0f / 256f, 0f / 256f, 16f / 256f, 16f / 256f));

    attach();
  }
View Full Code Here

TOP

Related Classes of org.spout.api.component.widget.RenderPartComponent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.