Skip to content
Draft
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

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions src/main/java/net/rptools/maptool/client/ui/ToolbarPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,9 @@ private OptionPanel createTemplatePanel() {
panel
.add(WallTemplateTool.class)
.setIcon(RessourceManager.getBigIcon(Icons.TOOLBAR_TEMPLATE_WALL));
panel
.add(TriangleTemplateTool.class)
.setIcon(RessourceManager.getBigIcon(Icons.TOOLBAR_TEMPLATE_TRIANGLE));
return panel;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ public enum Icons {
TOOLBAR_TEMPLATE_RADIUS,
TOOLBAR_TEMPLATE_RADIUS_CELL,
TOOLBAR_TEMPLATE_WALL,
TOOLBAR_TEMPLATE_TRIANGLE,
TOOLBAR_TOKENSELECTION_ALL_OFF,
TOOLBAR_TOKENSELECTION_ALL_ON,
TOOLBAR_TOKENSELECTION_ME_OFF,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -398,13 +398,14 @@ public class RessourceManager {
put(
Icons.TOOLBAR_TEMPLATE_LINE_CELL,
ROD_ICONS + "ribbon/Line Template Centered on Grid.svg");
put(Icons.TOOLBAR_TEMPLATE_OFF, ROD_ICONS + "ribbon/Cone Template.svg");
put(Icons.TOOLBAR_TEMPLATE_ON, ROD_ICONS + "ribbon/Cone Template.svg");
put(Icons.TOOLBAR_TEMPLATE_OFF, ROD_ICONS + "ribbon/Triangle Template.svg");
put(Icons.TOOLBAR_TEMPLATE_ON, ROD_ICONS + "ribbon/Triangle Template.svg");
put(Icons.TOOLBAR_TEMPLATE_RADIUS, ROD_ICONS + "ribbon/Radius Template.svg");
put(
Icons.TOOLBAR_TEMPLATE_RADIUS_CELL,
ROD_ICONS + "ribbon/Radius Template Centered on Grid.svg");
put(Icons.TOOLBAR_TEMPLATE_WALL, ROD_ICONS + "ribbon/Wall Line Template.svg");
put(Icons.TOOLBAR_TEMPLATE_TRIANGLE, ROD_ICONS + "ribbon/Triangle Template.svg");
put(Icons.TOOLBAR_TOKENSELECTION_ALL_OFF, ROD_ICONS + "ribbon/All.svg");
put(Icons.TOOLBAR_TOKENSELECTION_ALL_ON, ROD_ICONS + "ribbon/All.svg");
put(Icons.TOOLBAR_TOKENSELECTION_ME_OFF, ROD_ICONS + "ribbon/Me.svg");
Expand Down
14 changes: 14 additions & 0 deletions src/main/java/net/rptools/maptool/model/drawing/Drawable.java
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,20 @@ static Drawable fromDto(DrawableDto drawableDto) {
drawable.setLayer(Zone.Layer.valueOf(dto.getLayer()));
return drawable;
}
case TRIANGLE_TEMPLATE -> {
var dto = drawableDto.getTriangleTemplate();
var id = GUID.valueOf(dto.getId());
var drawable = new TriangleTemplate(id);
drawable.setZoneId(GUID.valueOf(dto.getZoneId()));
drawable.setRadius(dto.getRadius());
var vertex = dto.getVertex();
drawable.setVertex(new ZonePoint(vertex.getX(), vertex.getY()));
if (dto.hasName()) drawable.setName(dto.getName().getValue());
drawable.setLayer(Zone.Layer.valueOf(dto.getLayer()));
drawable.setTheta(dto.getTheta());
drawable.setSensitivity(dto.getSensitivity());
return drawable;
}
case BURST_TEMPLATE -> {
var dto = drawableDto.getBurstTemplate();
var id = GUID.valueOf(dto.getId());
Expand Down
Loading