Class WindowColonyMap.MapDecoration

java.lang.Object
com.minecolonies.core.client.gui.map.WindowColonyMap.MapDecoration
Enclosing class:
WindowColonyMap

public class WindowColonyMap.MapDecoration extends Object
Holds information about the map decorations that may be associated with each building.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    com.ldtteam.blockui.views.Box
     
    com.ldtteam.blockui.controls.ItemIcon
     
    com.ldtteam.blockui.views.Box
     
    com.ldtteam.blockui.controls.Image
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    MapDecoration(com.ldtteam.blockui.controls.ItemIcon icon, com.ldtteam.blockui.views.Box rangeBox, com.ldtteam.blockui.views.Box highlightBox, com.ldtteam.blockui.controls.Image statusImage)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    getGreenFromRange(double pctFull)
    Returns the green component of a color based on the percentage of building capacity used.
    static int
    getRedFromRange(double pctFull)
    Returns the red component of a color based on the percentage of building capacity used.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • icon

      public com.ldtteam.blockui.controls.ItemIcon icon
    • rangeBox

      public com.ldtteam.blockui.views.Box rangeBox
    • highlightBox

      public com.ldtteam.blockui.views.Box highlightBox
    • statusImage

      public com.ldtteam.blockui.controls.Image statusImage
  • Constructor Details

    • MapDecoration

      public MapDecoration(com.ldtteam.blockui.controls.ItemIcon icon, com.ldtteam.blockui.views.Box rangeBox, com.ldtteam.blockui.views.Box highlightBox, com.ldtteam.blockui.controls.Image statusImage)
  • Method Details

    • getRedFromRange

      public static int getRedFromRange(double pctFull)
      Returns the red component of a color based on the percentage of building capacity used.
      Parameters:
      pctFull - the percentage of building capacity used
      Returns:
      the red component of the color
    • getGreenFromRange

      public static int getGreenFromRange(double pctFull)
      Returns the green component of a color based on the percentage of building capacity used.
      Parameters:
      pctFull - the percentage of building capacity used
      Returns:
      the green component of the color