Skip to content
Snippets Groups Projects
  1. Mar 29, 2020
  2. Feb 10, 2020
    • nightfox's avatar
      AddAdditionalSelectItemKeys() now takes a string specifying additional keys... · 4ee4ef43
      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.
      4ee4ef43
  3. Feb 09, 2020
    • nightfox's avatar
      New function: AddAdditionalSelectItemKeys(), which adds additional keys that... · 7498ae74
      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.
      7498ae74
  4. May 13, 2019
  5. May 11, 2019
  6. Mar 23, 2019
  7. Dec 24, 2018
  8. Mar 26, 2018
  9. Dec 18, 2017
  10. Sep 10, 2017
  11. Sep 09, 2017
  12. Aug 19, 2017
  13. Aug 17, 2017
  14. Aug 16, 2017
    • nightfox's avatar
      Started working on the ability to select multiple items from the menu (which... · adb2ad45
      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.
      adb2ad45
  15. Aug 06, 2017
    • nightfox's avatar
    • nightfox's avatar
      Updated the drawing function so that when in numbered mode and there are fewer... · 0d0d4f22
      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.
      0d0d4f22
    • nightfox's avatar
      Added an optional "numbered mode", where each option is displayed with a... · c009bd9d
      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.
      c009bd9d
  16. Aug 05, 2017
  17. Aug 04, 2017
    • nightfox's avatar
      Added a new property to the menu object, ampersandHotkeysInItems, which... · 11926046
      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.
      11926046
  18. Jul 09, 2017
  19. Jul 08, 2017
    • nightfox's avatar
      d2da63c6
    • nightfox's avatar
      Changed the way the border characters are configured in a way that is more... · 562e580a
      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.
      562e580a
    • nightfox's avatar
      Updated to optinally have the menu draw a border around the menu items. This... · 36b6a1ad
      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.
      36b6a1ad
  20. Jan 08, 2017
  21. Dec 31, 2016
  22. Dec 30, 2016
    • nightfox's avatar
      This provides a scrollable lightbar menu in the form of a JavaScript class. ... · bfe0b3f3
      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.
      bfe0b3f3
Loading