• exec/load/dd_lightbar_menu.js

    From nightfox@VERT to CVS commit on Sunday, February 09, 2020 19:15:02
    exec/load dd_lightbar_menu.js 1.5 1.6
    Update of /cvsroot/sbbs/exec/load
    In directory cvs:/tmp/cvs-serv15577

    Modified Files:
    dd_lightbar_menu.js
    Log Message:
    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.


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Digital Man@VERT to nightfox on Sunday, February 09, 2020 19:53:09
    Re: exec/load/dd_lightbar_menu.js
    By: nightfox to CVS commit on Sun Feb 09 2020 11:15 am

    exec/load dd_lightbar_menu.js 1.5 1.6
    Update of /cvsroot/sbbs/exec/load
    In directory cvs:/tmp/cvs-serv15577

    Modified Files:
    dd_lightbar_menu.js
    Log Message:
    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

    An array of strings is an odd way to represent an array of keys. Is each only only one character? If so, then a string is the normal way to represent an array of characters.

    digital man

    This Is Spinal Tap quote #8:
    Derek Smalls: Making a big thing out of it would have been a good idea.
    Norco, CA WX: 56.7øF, 70.0% humidity, 4 mph WNW wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Nightfox@VERT/DIGDIST to Digital Man on Monday, February 10, 2020 04:05:37
    Re: exec/load/dd_lightbar_menu.js
    By: Digital Man to nightfox on Sun Feb 09 2020 11:53 am

    An array of strings is an odd way to represent an array of keys. Is each only only one character? If so, then a string is the normal way to represent an array of characters.

    I suppose that's true. I should probably change it as such.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
  • From nightfox@VERT to CVS commit on Monday, February 10, 2020 04:38:58
    exec/load dd_lightbar_menu.js 1.6 1.7
    Update of /cvsroot/sbbs/exec/load
    In directory cvs:/tmp/cvs-serv3623

    Modified Files:
    dd_lightbar_menu.js
    Log Message:
    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.


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net