Skip to content

Commit

Permalink
Fixed tab/spaces formatting. Used spaces instead of tab.
Browse files Browse the repository at this point in the history
  • Loading branch information
HoneySkull committed Dec 26, 2023
1 parent 356b0c7 commit 47ca905
Show file tree
Hide file tree
Showing 7 changed files with 457 additions and 457 deletions.
8 changes: 4 additions & 4 deletions megamek/src/megamek/client/ui/swing/DeploymentDisplay.java
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,10 @@ public void selectEntity(int en) {

private void computeCFWarningHexes(Entity ce) {
List<Coords> warnList =
ConstructionFactorWarning.findCFWarningsDeployment(
clientgui.getBoardView().game,
ce,
clientgui.getBoardView().game.getBoard());
ConstructionFactorWarning.findCFWarningsDeployment(
clientgui.getBoardView().game,
ce,
clientgui.getBoardView().game.getBoard());

clientgui.getBoardView().setCFWarningSprites(warnList);

Expand Down
6 changes: 3 additions & 3 deletions megamek/src/megamek/client/ui/swing/GUIPreferences.java
Original file line number Diff line number Diff line change
Expand Up @@ -1789,9 +1789,9 @@ public void setFiringSolutions(boolean state) {
store.setValue(FIRING_SOLUTIONS, state);
}

public void setShowCFWarnings(boolean b) {
store.setValue(CONSTRUCTOR_FACTOR_WARNING, b);
}
public void setShowCFWarnings(boolean b) {
store.setValue(CONSTRUCTOR_FACTOR_WARNING, b);
}

public void setMoveEnvelope(boolean state) {
store.setValue(MOVE_ENVELOPE, state);
Expand Down
8 changes: 4 additions & 4 deletions megamek/src/megamek/client/ui/swing/MovementDisplay.java
Original file line number Diff line number Diff line change
Expand Up @@ -4547,10 +4547,10 @@ && ce().getMovementMode() == EntityMovementMode.TRACKED) {

private void computeCFWarningHexes(Entity ce) {
List<Coords> warnList =
ConstructionFactorWarning.findCFWarningsMovement(
clientgui.getBoardView().game,
ce,
clientgui.getBoardView().game.getBoard());
ConstructionFactorWarning.findCFWarningsMovement(
clientgui.getBoardView().game,
ce,
clientgui.getBoardView().game.getBoard());

clientgui.getBoardView().setCFWarningSprites(warnList);
}
Expand Down
36 changes: 18 additions & 18 deletions megamek/src/megamek/client/ui/swing/boardview/BoardView.java
Original file line number Diff line number Diff line change
Expand Up @@ -3882,24 +3882,24 @@ public void clearFiringSolutionData() {
repaint();
}

public void setCFWarningSprites(List<Coords> warnList) {
// Clear existing sprites before setting new ones.
clearCFWarningData();

if (warnList == null) {
return;
}

// Loops through list of coordinates, and create new CF warning sprite and add it to the sprites list.
for (Coords c : warnList) {
ConstructionWarningSprite cfws = new ConstructionWarningSprite(this, c);
cfWarningSprites.add(cfws);
}
}

public void clearCFWarningData() {
cfWarningSprites.clear();
}
public void setCFWarningSprites(List<Coords> warnList) {
// Clear existing sprites before setting new ones.
clearCFWarningData();

if (warnList == null) {
return;
}

// Loops through list of coordinates, and create new CF warning sprite and add it to the sprites list.
for (Coords c : warnList) {
ConstructionWarningSprite cfws = new ConstructionWarningSprite(this, c);
cfWarningSprites.add(cfws);
}
}

public void clearCFWarningData() {
cfWarningSprites.clear();
}

public void addStrafingCoords(Coords c) {
strafingCoords.add(c);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,48 +48,48 @@ public class ConstructionWarningSprite extends HexSprite {

//Draw a special character 'warning sign'.
private final StringDrawer xWriter = new StringDrawer("\u26A0")
.at(HEX_CENTER_X, HEX_CENTER_Y)
.color(TEXT_COLOR)
.at(HEX_CENTER_X, HEX_CENTER_Y)
.color(TEXT_COLOR)
.fontSize(TEXT_SIZE)
.center().outline(OUTLINE_COLOR, 1.5f);

/**
* @param boardView1 - parent BoardView object this sprite will be displayed on.
* @param loc - Hex location coordinates of building or bridge where warning will be visible.
*/
public ConstructionWarningSprite(BoardView boardView1, Coords loc) {
super(boardView1, loc);
}
/**
* @param boardView1 - parent BoardView object this sprite will be displayed on.
* @param loc - Hex location coordinates of building or bridge where warning will be visible.
*/
public ConstructionWarningSprite(BoardView boardView1, Coords loc) {
super(boardView1, loc);
}

@Override
public void prepare() {
@Override
public void prepare() {
Graphics2D graph = spriteSetup();
xWriter.draw(graph);
graph.dispose();
}
/*
* Standard Hex Sprite 2D Graphics setup. Creates the context, base hex image
* settings, scale, and fonts.
*/
private Graphics2D spriteSetup() {
}

/*
* Standard Hex Sprite 2D Graphics setup. Creates the context, base hex image
* settings, scale, and fonts.
*/
private Graphics2D spriteSetup() {
updateBounds();
image = createNewHexImage();
Graphics2D graph = (Graphics2D) image.getGraphics();
UIUtil.setHighQualityRendering(graph);
graph.scale(bv.scale, bv.scale);

fontSetup(graph);

return graph;
}
/*
* Sets the font name, style, and size from configured default parameters.
*/
private void fontSetup(Graphics2D graph) {
}

/*
* Sets the font name, style, and size from configured default parameters.
*/
private void fontSetup(Graphics2D graph) {
String fontName = GUIP.getMoveFontType();
int fontStyle = GUIP.getMoveFontStyle();
graph.setFont(new Font(fontName, fontStyle, TEXT_SIZE));
}
}
}
Loading

0 comments on commit 47ca905

Please sign in to comment.