--- a/src/main/java/de/uapcore/lightpit/MenuEntry.java Sat Aug 22 16:25:03 2020 +0200 +++ b/src/main/java/de/uapcore/lightpit/MenuEntry.java Sat Aug 22 18:17:06 2020 +0200 @@ -50,13 +50,28 @@ */ private boolean active = false; + /** + * The menu level. + */ + private int level; + public MenuEntry(ResourceKey resourceKey, String pathName) { + this(0, resourceKey, pathName); + } + + public MenuEntry(String text, String pathName) { + this(0, text, pathName); + } + + public MenuEntry(int level, ResourceKey resourceKey, String pathName) { + this.level = level; this.text = null; this.resourceKey = resourceKey; this.pathName = pathName; } - public MenuEntry(String text, String pathName) { + public MenuEntry(int level, String text, String pathName) { + this.level = level; this.text = text; this.resourceKey = null; this.pathName = pathName; @@ -82,4 +97,11 @@ this.active = true; } + public int getLevel() { + return level; + } + + public void setLevel(int level) { + this.level = level; + } }