- Mar 29, 2020
-
-
nightfox authored
The HOME and END keys now go to the first and last item in the whole list, rather than just the current page. This behavior is more consistent with things like sbbslist.js.
-
- Feb 10, 2020
-
-
nightfox authored
AddAdditionalSelectItemKeys() now takes a string specifying additional keys rather than an array of strings. For instance, if you want both lowercase 'e' and uppercase 'E' to allow selecting an item, the call would look like this (assuming lbMenu is the menu object): lbMenu.AddAdditionalSelectItemKeys("eE"); Also, changed AddAdditionalQuitKeys() to work the same way. Note: If you are using SlyVote, you will need to also update SlyVote, since SlyVote has also been updated to call AddAdditionalQuitKeys() this way.
-
- Feb 09, 2020
-
-
nightfox authored
New function: AddAdditionalSelectItemKeys(), which adds additional keys that can be used to select any item (in addition to Enter). This function takes an array, and the keys are case-sensitive. For example, to add the key E to select any item (assuming the menu object is lbMenu): lbMenu.AddAdditionalSelectItemKeys(["E"]); To make a case-insensitive verison, both the uppercase and lowercase letter would need to be added, as in the following example for E: lbMenu.AddAdditionalSelectItemKeys(["E", "e"]); Also, after showing the menu & getting a value from the user (using the GetVal() function), the lastUserInput property will have the user's last keypress.
-
- May 13, 2019
-
-
nightfox authored
Renamed the menuTitle property to topBorderText. Added a bottomBorderText property, for text to be displayed in the bottom border.
-
- May 11, 2019
-
-
nightfox authored
Fixed a bug that somehow crept in: Tthe check mark for selections in multi-select mode was being displayed in the wrong place when using a menu border.
-
nightfox authored
Now supports a title in the top border line: Added a new property for the DDLightbarMenu object, menuTitle, which is a string that specifies the title text to write in the top border (if the border is being displayed). It defaults to an empty string (for no title). Synchronet attribute codes are supported.
-
- Mar 23, 2019
-
-
nightfox authored
Added the AddAdditionalQuitKeys() method, to add additional key characters to quit out of the meu in addition to ESC. It takes an array of key characters as strings. For example: lbMenu.AddAdditionalQuitKeys(["q", "Q"]);
-
- Dec 24, 2018
-
-
nightfox authored
Renamed DDLightbarMenu.js to dd_lightbar_menu.js to be more inline with the other filenames in the Synchronet CVS repository
-
- Mar 26, 2018
-
-
nightfox authored
-
- Dec 18, 2017
-
-
nightfox authored
Updated the definitions of the KEY_PAGE_UP and KEY_PAGE_DOWN veriables to match what they are in sbbsdefs.js (if defined) from December 18, 2017 so that the PageUp and PageDown keys continue to work properly. This script should still also work with older builds of Synchronet.
-
- Sep 10, 2017
-
-
nightfox authored
Bug fix: Updated GetTopItemIdxToTopOfLastPage() and SetTopItemIdxToTopOfLastPage() to return/set the top item index to 0 if there is only one page of menu items
-
- Sep 09, 2017
-
-
nightfox authored
Added the functions GetNumItemsPerPage, GetTopItemIdxToTopOfLastPage, and SetTopItemIdxToTopOfLastPage.
-
- Aug 19, 2017
- Aug 17, 2017
-
-
nightfox authored
Added a property, maxNumSelections, to limit the number of selections a user can make in multi-select mode. -1 or 0 means no limit. I still need to work on getting the check mark displayed properly for selected items in multi-select mode..
-
- Aug 16, 2017
-
-
nightfox authored
Started working on the ability to select multiple items from the menu (which is done with the spacebar). Multi-item selection is enabled by setting the multiSelect property to true (which is false by default). In multi-select mode, the GetVal() function will return an array of selected return values rather than a string. The display of selected items still needs to be worked on.. Right now it will display a check mark next to selected items after the user scrolls away from the item, and the position of the check mark is currently a little wierd, but multi-select is working.
-
- Aug 06, 2017
-
-
nightfox authored
-
nightfox authored
Updated the drawing function so that when in numbered mode and there are fewer items than the menu's height, it looks better.
-
nightfox authored
Added an optional "numbered mode", where each option is displayed with a number to the left (starting at 1), and the user is allowed to choose an option by typing the number of the item. Numbered mode is disabled by default and can be enabled by setting the numberedMode property to true. For example: lbMenu.numberedMode = true; When numbered mode is enabled and the user starts typing a number, the menu will prompt the user for an item number. The prompt will be located on the line below the menu, so in addition to the menu's height, you'll also need an extra line on the screen to account for the item prompt. In addition, when the user presses the enter key after the item number, a carriage return/line feed will be outputted, so in numbered mode, the menu's height should not go further than 2 lines below the console height. Otherwise, the display of the menu will not be correct if the user decides not to enter a number.
-
- Aug 05, 2017
-
-
nightfox authored
-
nightfox authored
-
nightfox authored
Menu items can now have multiple hotkeys. Hotkeys can be specified in the Add() method by passing a hotkey as the 3rd parameter and/or by putting a & in the menu item text just before a key you want to use as the hotkey. Also added the method AddItemHotkey(), which can add a hotkey to a menu item in addition to its existing hotkey(s).
-
- Aug 04, 2017
-
-
nightfox authored
Added a new property to the menu object, ampersandHotkeysInItems, which specifies whether or not to interpret an ampersand as a hotkey in a menu item if placed immediately before a non-space character. It defaults to true. In some cases it might be desirable to disable that and have all ampersands in the menu items literally displayed.
-
- Jul 09, 2017
-
-
nightfox authored
Made a minor update for efficiency when displaying menu items ensuring the text fills the menu area (in case there's a text background in use)
-
- Jul 08, 2017
-
-
nightfox authored
-
nightfox authored
Changed the way the border characters are configured in a way that is more flexible. Now, you can specify whatever border characters you want to use by changing the properties in the borderChars object within the menu object. Also, when adding a menu item, the pHotkey parameter will always be used as the hotkey if specified, but now if that parameter is not specified, then the first non-space character after a & in the item text will be used as the hotkey (in addition to that character being highlighted in a different color, as with the last commit). Also made some bug fixes regarding scrolling when using a border.
-
nightfox authored
Updated to optinally have the menu draw a border around the menu items. This functionality uses the new borderStyle property, which can be one of the following: BORDER_NONE (no borders), BORDER_SINGLE (single-line border), or BORDER_DOUBLE (double-line border). I might add more border styles in the future (such as single-line vertical with double-line horizontal, etc.). Also, added a way to have a single non-space character in an item text highlighted with a different color (i.e., to show a hotkey in the item text). That is done by putting a & in the item text immediately before the key to highlight (i.e., "E&xit" would highlight the 'x' character). Added the itemTextCharHighlightColor property to specify the color attribute to use to highlight a hotkey character (currently, it defaults to bright yellow). Also, added the property hotkeyCaseSensitive, which is a boolean that specifies whether or not hotkey matching should be case-sensitive. It defaults to false.
-
- Jan 08, 2017
-
-
nightfox authored
-
- Dec 31, 2016
-
-
nightfox authored
Updated so that when looking for an item's hotkey, it uses the first one it finds (in case multiple items have the same hotkey). Previously it would have used the last. Also, added some more methods: Remove(), RemoveAllItems(), RemoveItemHotkey(), and RemoveAllItemHotkeys().
-
nightfox authored
Updated to wrap around when using the up & down arrows to navigate the selections. That behavior can be disabled by setting the wrapNavigation property to false.
-
nightfox authored
Updated to use the right arrow in addition to the down arrow to move down, and the left arrow in addition to the up arrow to move up
-
nightfox authored
Fixed a bug with using the PageDown key. Also, updated the GetVal() method so that it resets the terminal color back to normal when it's done so that any text printed afterward will look good.
-
- Dec 30, 2016
-
-
nightfox authored
This provides a scrollable lightbar menu in the form of a JavaScript class. Item colors (normal and selected) can be customized. Allows scrolling of the menu items, so that if there are more items than can fit on the menu, the user can scroll through them. Supports use of the up & down arrows, PageUp, PageDown, Home, and End keys, and the Enter key selects an item. This requires an ANSI terminal.
-