dd_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.
Merged
requested to merge dd_lightbar_menu_substrWithAttrCodes_refactor_and_additional_nav_keys into master
Compare changes
+ 280
− 48
@@ -198,6 +198,15 @@ To add additional key characters as quit keys (in addition to ESC), call
@@ -469,6 +478,10 @@ function DDLightbarMenu(pX, pY, pWidth, pHeight)
@@ -553,6 +566,18 @@ function DDLightbarMenu(pX, pY, pWidth, pHeight)
@@ -1031,7 +1056,10 @@ function DDLightbarMenu_Draw(pSelectedItemIndexes, pDrawBorders, pDrawScrollbar,
@@ -1195,6 +1223,16 @@ function DDLightbarMenu_DrawPartial(pStartX, pStartY, pWidth, pHeight, pSelected
@@ -1311,6 +1349,16 @@ function DDLightbarMenu_DrawPartial(pStartX, pStartY, pWidth, pHeight, pSelected
@@ -1331,7 +1379,8 @@ function DDLightbarMenu_DrawPartial(pStartX, pStartY, pWidth, pHeight, pSelected
@@ -1362,6 +1411,16 @@ function DDLightbarMenu_DrawPartialAbs(pStartX, pStartY, pWidth, pHeight, pSelec
@@ -1374,6 +1433,16 @@ function DDLightbarMenu_DrawPartialAbs(pStartX, pStartY, pWidth, pHeight, pSelec
@@ -1510,8 +1579,8 @@ function DDLightbarMenu_GetItemText(pIdx, pItemLen, pHighlight, pSelected)
@@ -1790,9 +1859,7 @@ function DDLightbarMenu_GetVal(pDraw, pSelectedItemIndexes)
@@ -1800,7 +1867,7 @@ function DDLightbarMenu_GetVal(pDraw, pSelectedItemIndexes)
@@ -1823,18 +1890,18 @@ function DDLightbarMenu_GetVal(pDraw, pSelectedItemIndexes)
@@ -2677,7 +2744,8 @@ function DDLightbarMenu_CalcPageForItemAndSetTopItemIdx(pNumItemsPerPage, pNumIt
@@ -2699,6 +2767,70 @@ function DDLightbarMenu_ClearAdditionalQuitKeys()
@@ -3434,55 +3566,155 @@ function substrWithAttrCodes(pStr, pStartIdx, pLen)