Skip to content
Snippets Groups Projects
Commit 5bd89194 authored by Eric Oulashin's avatar Eric Oulashin
Browse files

dd_lightbar_menu.js: In numbered mode (non-lightbar), only prepend the item...

dd_lightbar_menu.js: In numbered mode (non-lightbar), only prepend the item number to the item text if it's selectable
parent 21b26fed
Branches
Tags
1 merge request!343dd_lightbar_menu.js: Refactored substrWithAttrCodes() to fix issues with it. Added mechanisms to have additional keys for page-up, page-down, first page (HOME), and last page (END), similar to the additional quit keys.
Pipeline #4792 passed
...@@ -1576,8 +1576,8 @@ function DDLightbarMenu_GetItemText(pIdx, pItemLen, pHighlight, pSelected) ...@@ -1576,8 +1576,8 @@ function DDLightbarMenu_GetItemText(pIdx, pItemLen, pHighlight, pSelected)
var currentTextLen = itemTextDisplayableLen(itemText, this.ampersandHotkeysInItems); var currentTextLen = itemTextDisplayableLen(itemText, this.ampersandHotkeysInItems);
if (currentTextLen < itemLen) if (currentTextLen < itemLen)
itemText += format("%" + +(itemLen-currentTextLen) + "s", ""); // Append spaces to the end of itemText itemText += format("%" + +(itemLen-currentTextLen) + "s", ""); // Append spaces to the end of itemText
// If in numbered mode, prepend the item number to the front of the item text. // If in numbered mode and the item is selectable, prepend the item number to the front of the item text.
if (this.numberedMode) if (this.numberedMode && menuItem.isSelectable)
{ {
if (this.itemNumLen == 0) if (this.itemNumLen == 0)
this.itemNumLen = numItems.toString().length; this.itemNumLen = numItems.toString().length;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment