1.1 --- a/src/main/java/de/uapcore/lightpit/MenuEntry.java Sat Aug 22 16:25:03 2020 +0200 1.2 +++ b/src/main/java/de/uapcore/lightpit/MenuEntry.java Sat Aug 22 18:17:06 2020 +0200 1.3 @@ -50,13 +50,28 @@ 1.4 */ 1.5 private boolean active = false; 1.6 1.7 + /** 1.8 + * The menu level. 1.9 + */ 1.10 + private int level; 1.11 + 1.12 public MenuEntry(ResourceKey resourceKey, String pathName) { 1.13 + this(0, resourceKey, pathName); 1.14 + } 1.15 + 1.16 + public MenuEntry(String text, String pathName) { 1.17 + this(0, text, pathName); 1.18 + } 1.19 + 1.20 + public MenuEntry(int level, ResourceKey resourceKey, String pathName) { 1.21 + this.level = level; 1.22 this.text = null; 1.23 this.resourceKey = resourceKey; 1.24 this.pathName = pathName; 1.25 } 1.26 1.27 - public MenuEntry(String text, String pathName) { 1.28 + public MenuEntry(int level, String text, String pathName) { 1.29 + this.level = level; 1.30 this.text = text; 1.31 this.resourceKey = null; 1.32 this.pathName = pathName; 1.33 @@ -82,4 +97,11 @@ 1.34 this.active = true; 1.35 } 1.36 1.37 + public int getLevel() { 1.38 + return level; 1.39 + } 1.40 + 1.41 + public void setLevel(int level) { 1.42 + this.level = level; 1.43 + } 1.44 }