Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds borders to mini-maps #249

Merged
merged 1 commit into from
Mar 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public ArrayList<Vector> getCorners()
@Override
public void draw(GraphicsContext gc)
{
gc.setStroke(Color.BLACK);
gc.setStroke(Color.GREEN);
gc.strokeLine(a.getX(), a.getY(), b.getX(), b.getY());
}

Expand Down
14 changes: 14 additions & 0 deletions src/main/java/app/view/simulation/Renderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,13 @@ private void drawMiniMapGuard(GraphicsContext gc)
DIAMETER * Info.getInfo().getZoom(),
DIAMETER * Info.getInfo().getZoom());
}

gc.setStroke(Color.BLACK);
gc.setLineWidth(2);
gc.strokeRect((xPos -2) * Info.getInfo().getZoom() + Info.getInfo().offsetX,
(yPos -2) * Info.getInfo().getZoom() + Info.getInfo().offsetY,
(mapWidthScaled + 4) * Info.getInfo().getZoom(),
(mapHeightScaled + 4) * Info.getInfo().getZoom());
}

private void drawMiniMapIntruder(GraphicsContext gc)
Expand Down Expand Up @@ -167,6 +174,13 @@ private void drawMiniMapIntruder(GraphicsContext gc)
DIAMETER * Info.getInfo().getZoom(),
DIAMETER * Info.getInfo().getZoom());
}

gc.setStroke(Color.BLACK);
gc.setLineWidth(2);
gc.strokeRect((xPos -2) * Info.getInfo().getZoom() + Info.getInfo().offsetX,
(yPos -2) * Info.getInfo().getZoom() + Info.getInfo().offsetY,
(mapWidthScaled + 4) * Info.getInfo().getZoom(),
(mapHeightScaled + 4) * Info.getInfo().getZoom());
}

private void handleScroll(ScrollEvent e)
Expand Down
4 changes: 1 addition & 3 deletions src/main/resources/map_1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,4 @@ wall = 1001 740 1078 760
wall = 1139 740 1158 759
spawnAreaGuards = 200 320 300 421
spawnAreaIntruders = 1250 700 1350 800
targetArea = 800 99 920 181
soundSource = 300 300 200

targetArea = 800 99 920 181