diff --git a/apps/promenu/ChangeLog b/apps/promenu/ChangeLog
index 83140c994e..bbcab00f68 100644
--- a/apps/promenu/ChangeLog
+++ b/apps/promenu/ChangeLog
@@ -12,3 +12,4 @@
0.08: Fix bug with modifying menu - allows hadash to save scroll positions
0.09: Don't show "..." if a string isn't truncated (i.e. scrolled)
0.10: Trigger `remove` callbacks when ending the menu
+0.11: Add options for natural scroll and disabling wrap-around
diff --git a/apps/promenu/bootb2.js b/apps/promenu/bootb2.js
index 1090229d20..71692dd33f 100644
--- a/apps/promenu/bootb2.js
+++ b/apps/promenu/bootb2.js
@@ -1,3 +1,7 @@
+var _a, _b;
+var settings = (require("Storage").readJSON("promenu.settings.json", true) || {});
+(_a = settings.naturalScroll) !== null && _a !== void 0 ? _a : (settings.naturalScroll = false);
+(_b = settings.wrapAround) !== null && _b !== void 0 ? _b : (settings.wrapAround = true);
E.showMenu = function (items) {
var RectRnd = function (x1, y1, x2, y2, r) {
var pp = [];
@@ -164,7 +168,12 @@ E.showMenu = function (items) {
}
else {
var lastSelected = selected;
- selected = (selected + dir + menuItems.length) % menuItems.length;
+ if (settings.wrapAround) {
+ selected = (selected + dir + menuItems.length) % menuItems.length;
+ }
+ else {
+ selected = E.clip(selected + dir, 0, menuItems.length - 1);
+ }
scroller.scroll = selected;
l.draw(Math.min(lastSelected, selected), Math.max(lastSelected, selected));
}
@@ -201,7 +210,7 @@ E.showMenu = function (items) {
},
}, function (dir) {
if (dir)
- l.move(dir);
+ l.move(settings.naturalScroll ? -dir : dir);
else
l.select();
});
diff --git a/apps/promenu/bootb2.ts b/apps/promenu/bootb2.ts
index c284ad88b9..c448397d30 100644
--- a/apps/promenu/bootb2.ts
+++ b/apps/promenu/bootb2.ts
@@ -1,9 +1,19 @@
type ActualMenuItem = Exclude