Class WindowColonyMap.MapDecoration
java.lang.Object
com.minecolonies.core.client.gui.map.WindowColonyMap.MapDecoration
- Enclosing class:
WindowColonyMap
Holds information about the map decorations that may be associated with each building.
-
Field Summary
FieldsModifier and TypeFieldDescriptioncom.ldtteam.blockui.views.Boxcom.ldtteam.blockui.controls.ItemIconcom.ldtteam.blockui.views.Boxcom.ldtteam.blockui.controls.Image -
Constructor Summary
ConstructorsConstructorDescriptionMapDecoration(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 TypeMethodDescriptionstatic intgetGreenFromRange(double pctFull) Returns the green component of a color based on the percentage of building capacity used.static intgetRedFromRange(double pctFull) Returns the red component of a color based on the percentage of building capacity used.
-
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
-