From 1809a3c3b549ba1b50f3d965972a391a912264dc Mon Sep 17 00:00:00 2001 From: Joshua Skelton Date: Thu, 16 Apr 2020 21:24:10 -0700 Subject: [PATCH] Draw Gizmos correctly for entities inside of Groups --- .../dungeoneer/editor/gizmos/GroupGizmo.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 DelvEdit/src/com/interrupt/dungeoneer/editor/gizmos/GroupGizmo.java diff --git a/DelvEdit/src/com/interrupt/dungeoneer/editor/gizmos/GroupGizmo.java b/DelvEdit/src/com/interrupt/dungeoneer/editor/gizmos/GroupGizmo.java new file mode 100644 index 00000000..5f800cde --- /dev/null +++ b/DelvEdit/src/com/interrupt/dungeoneer/editor/gizmos/GroupGizmo.java @@ -0,0 +1,18 @@ +package com.interrupt.dungeoneer.editor.gizmos; + +import com.interrupt.dungeoneer.entities.Entity; +import com.interrupt.dungeoneer.entities.Group; + +@GizmoFor(target = Group.class) +public class GroupGizmo extends EntityGizmo { + @Override + public void draw(Entity entity) { + super.draw(entity); + + Group group = (Group)entity; + for (Entity e : group.entities) { + Gizmo gizmo = GizmoProvider.getGizmo(e.getClass()); + gizmo.draw(e); + } + } +}