*
* The MIT License (MIT)
*
- * Copyright (C) 2017 Kevin Lamonte
+ * Copyright (C) 2019 Kevin Lamonte
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
/**
* TSubMenu is a special case menu item that wraps another TMenu.
*/
-public final class TSubMenu extends TMenuItem {
+public class TSubMenu extends TMenuItem {
// ------------------------------------------------------------------------
// Variables --------------------------------------------------------------
}
// Add the arrow
- getScreen().putCharXY(getWidth() - 2, 0, GraphicsChars.CP437[0x10],
- menuColor);
+ putCharXY(getWidth() - 2, 0, GraphicsChars.CP437[0x10], menuColor);
}
/**
return menu.addDefaultItem(id);
}
+ /**
+ * Convenience function to add one of the default menu items.
+ *
+ * @param id menu item ID. Must be between 0 (inclusive) and 1023
+ * (inclusive).
+ * @param enabled default state for enabled
+ * @return the new menu item
+ */
+ public TMenuItem addDefaultItem(final int id, final boolean enabled) {
+ return menu.addDefaultItem(id, enabled);
+ }
+
/**
* Convenience function to add a menu separator.
*/