Class RubbleClearSprite
java.lang.Object
megamek.client.ui.clientGUI.boardview.sprite.Sprite
megamek.client.ui.clientGUI.boardview.sprite.HexSprite
megamek.client.ui.clientGUI.boardview.sprite.RubbleClearSprite
- All Implemented Interfaces:
ImageObserver,Comparable<Sprite>
Displays a rubble-clearing-in-progress indicator on the hex a bulldozer vehicle is clearing (TacOps). Shows the
clearing progress as text ("2/8") and fades in the matching "cleared paths" rubble artwork
(saxarba/rubble_<type>_path.png) at an opacity that grows with progress, so the rubble hex is progressively
replaced by the bulldozed-path version as the work nears completion. If the path image cannot be loaded it falls back
to fading the hex to its exposed base-terrain colour.
-
Field Summary
Fields inherited from class megamek.client.ui.clientGUI.boardview.sprite.Sprite
bounds, bv, hidden, imageFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
ConstructorsConstructorDescriptionRubbleClearSprite(BoardView boardView, Coords loc, int turnsCompleted, int turnsRequired, boolean overlayCounter) Creates a new rubble-clearing sprite for the given hex. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true when this Sprite should be hidden by overlapping terrain in isometric mode, i.e.voidprepare()Do any necessary preparation.Methods inherited from class megamek.client.ui.clientGUI.boardview.sprite.HexSprite
createNewHexImage, getPosition, updateBoundsMethods inherited from class megamek.client.ui.clientGUI.boardview.sprite.Sprite
compareTo, drawOnto, drawOnto, equals, getBounds, getSpritePriority, getTooltip, imageUpdate, isHidden, isInside, isReady, setHidden, toString
-
Constructor Details
-
RubbleClearSprite
public RubbleClearSprite(BoardView boardView, Coords loc, int turnsCompleted, int turnsRequired, boolean overlayCounter) Creates a new rubble-clearing sprite for the given hex.- Parameters:
boardView- the parent board viewloc- the rubble hex being clearedturnsCompleted- the turns of clearing banked so far (the numerator)turnsRequired- the total turns the clearing needs (the denominator)overlayCounter-trueto draw the progress counter over the unit;falseto draw the cleared-path fade behind
-
-
Method Details
-
prepare
public void prepare()Description copied from class:SpriteDo any necessary preparation. This is called after creation, but before drawing, when a device context is ready to draw with. -
isBehindTerrain
public boolean isBehindTerrain()Description copied from class:HexSpriteReturns true when this Sprite should be hidden by overlapping terrain in isometric mode, i.e. hidden behind mountains. By default, this method returns true.- Overrides:
isBehindTerrainin classHexSprite- Returns:
- True for Sprites that should be hidden by overlapping terrain in isometric mode
-