Package org.getspout.spoutapi.gui

Examples of org.getspout.spoutapi.gui.GenericGradient


           
      // remove old widgets
      clear(player);
     
      // add bg
      GenericGradient gradient = new GenericGradient();
      gradient.setAnchor(WidgetAnchor.TOP_LEFT);
      gradient.setTopColor(new Color(0.0F, 0.0F, 0.0F, 0.4F)); // (order is Red, Green, Blue, Alpha)
      gradient.setBottomColor(new Color(0.0F, 0.0F, 0.0F, 0.0F));
      gradient.setHeight(statsOffset.get(1) + 4).setWidth((int)(statsOffset.get(0)));
     
      player.getMainScreen().attachWidget(War.war, gradient);
     
      // border in color of team
      GenericGradient teamGradient = new GenericGradient();
      teamGradient.setAnchor(WidgetAnchor.TOP_LEFT);
     
      Team team = Team.getTeamByPlayerName(playerName);
     
      Color spoutColor = new Color(250.0F, 250.0F, 250.0F, 1.0F);
      if (team != null) {
        spoutColor = team.getKind().getSpoutColor();
      }
      spoutColor.setAlpha(0.5F);
     
      teamGradient.setY(2 + LINE_HEIGHT_WITH_MARGIN);
      teamGradient.setTopColor(spoutColor);
      teamGradient.setBottomColor(new Color(256, 256, 256, 1.0F));
      teamGradient.setHeight(2).setWidth((int)(statsOffset.get(0)));
     
      player.getMainScreen().attachWidget(War.war, teamGradient);
     
      // update stats panel
      drawStats(player, statsLines);
View Full Code Here


        private final GenericGradient box;
        private final SpoutPlayer player;

        public StatusBar(SpoutPlayer player) {
            this.label = (GenericLabel) new GenericLabel(ChatColor.DARK_AQUA + "Invisible").setAnchor(WidgetAnchor.BOTTOM_LEFT).setX(20).setY(-20).setHeight(10).setWidth(40);
            this.box = (GenericGradient) new GenericGradient().setTopColor(SpoutCraftHook.this.boxColor).setBottomColor(SpoutCraftHook.this.boxColor).setX(18).setY(-22).setHeight(12).setWidth(45).setAnchor(WidgetAnchor.BOTTOM_LEFT).setPriority(RenderPriority.High);
            this.player = player;
        }
View Full Code Here

TOP

Related Classes of org.getspout.spoutapi.gui.GenericGradient

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.