• exec/load/dd_lightbar_menu.js

    From nightfox@VERT to CVS commit on Sunday, February 09, 2020 10: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 10: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 Sunday, February 09, 2020 19: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 Sunday, February 09, 2020 19: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
  • From nightfox@VERT to CVS commit on Sunday, March 29, 2020 15:08:05
    exec/load dd_lightbar_menu.js 1.7 1.8
    Update of /cvsroot/sbbs/exec/load
    In directory cvs:/tmp/cvs-serv25167

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


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From nightfox@VERT to CVS commit on Monday, March 30, 2020 16:50:24
    exec/load dd_lightbar_menu.js 1.8 1.9
    Update of /cvsroot/sbbs/exec/load
    In directory cvs:/tmp/cvs-serv6073

    Modified Files:
    dd_lightbar_menu.js
    Log Message:
    Now uses console.strlen() to measure printed text length rather than strip_ctrl(text).length.


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From nightfox@VERT to CVS commit on Tuesday, March 31, 2020 20:06:54
    exec/load dd_lightbar_menu.js 1.9 1.10
    Update of /cvsroot/sbbs/exec/load
    In directory cvs:/tmp/cvs-serv15214

    Modified Files:
    dd_lightbar_menu.js
    Log Message:
    Scrollbar functionality finally exists now, even though there was already a property to toggle a scrollbar from the beginning.. A scrollbar can be useful to visually show how far the user is in the list of items, particularly if the list is long.
    You can enable the display of a scrollbar by setting the scrollbarEnabled property to true. By default, it is false. For instance (assuming the menu object is lbMenu):
    lbMenu.scrollbarEnabled = true;
    When enabled, the scrollbar will appear on the right side of the menu. If borders are enabled, the scrollbar will appear just inside the right border. Also, if the scrollbar is enabled but all the items would fit in a single "page" in the menu, then the scrollbar won't be displayed.
    The scrollbar uses block characters to draw the scrollbar: ASCII character 176 for the background and ASCII 177 for the block that moves on the scrollbar. If you want to change those characters, you can change the scrollbarInfo.BGChar and scrollbarInfo.blockChar properties in the menu object.
    By default, the scrollbar colors are high (bright) black for the background and high (bright) white for the moving block character. If desired, those can be changed with the colors.scrollbarBGColor and colors.scrollbarScrollBlockColor properties in the menu object.


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From nightfox@VERT to CVS commit on Saturday, April 04, 2020 14:06:12
    exec/load dd_lightbar_menu.js 1.10 1.11
    Update of /cvsroot/sbbs/exec/load
    In directory cvs:/tmp/cvs-serv941

    Modified Files:
    dd_lightbar_menu.js
    Log Message:
    When displaying the menu items, rather than directly referring to the list of menu item objects, there are now a couple of functions (mainly for internal use), NumItems() (which returns the number of items) and GetItem() (which returns a specific menu item object). The intent is that calling code can replace these two functions in the DDLightbarMenu object to have the DDLightbarMenu effectively access a different list of items rather than its own list of items. This can be more efficient, for instance, in scripts that are working with a Synchronet messagebase, to avoid calling DDLightbarMenu's Add() function to add/copy a bunch of data, which can take significant time (i.e., if a messagebase contains a lot of messages).

    The colors.itemColor and colors.selectedItemColor properties in a DDLightbarMenu object can now be either a string (with Synchronet color/attribute codes for the item text) or an array with objects specifying color/attribute codes for different parts of an item's text string displayed on the menu.
    Item color arrays: Currently, colors.itemColor and colors.seletedItemColor within a DDLightbarMenu object can be either a string (containing color/attribute codes) or an array with color/attribute codes for different sections of the item strings to display in the menu. The array is to contain objects with the following properties:
    start: The index of the first character in the item string to apply the colors to
    end: One past the last character index in the string to apply the colors to
    attrs: The Synchronet attribute codes to apply to the section of the item string
    For the last item, the 'end' property can be -1, 0, or greater than the length of the item to apply the color/attribute codes to the rest of the string.


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From nightfox@VERT to CVS commit on Saturday, April 04, 2020 18:21:34
    exec/load dd_lightbar_menu.js 1.11 1.12
    Update of /cvsroot/sbbs/exec/load
    In directory cvs:/tmp/cvs-serv15919

    Modified Files:
    dd_lightbar_menu.js
    Log Message:
    The list of hotkeys for a menu item is now a string instead of an array of strings


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From nightfox@VERT to CVS commit on Saturday, April 04, 2020 20:22:38
    exec/load dd_lightbar_menu.js 1.12 1.13
    Update of /cvsroot/sbbs/exec/load
    In directory cvs:/tmp/cvs-serv2433

    Modified Files:
    dd_lightbar_menu.js
    Log Message:
    DDLightbarMenu now has a couple of alternate item color properties, colors.altItemColor and colors.altSelectedItemColor. The menu item objects have a new property, useAltColors, which is a boolean that specifies whether to use the alternate colors (if false, the menu will use the regular colors). useAltColors is false by default.


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From nightfox@VERT to CVS commit on Sunday, April 05, 2020 13:02:29
    exec/load dd_lightbar_menu.js 1.13 1.14
    Update of /cvsroot/sbbs/exec/load
    In directory cvs:/tmp/cvs-serv28841

    Modified Files:
    dd_lightbar_menu.js
    Log Message:
    Typo fixed: GetTopItemIdxToTopOfLastPage -> GetTopItemIdxOfLastPage


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From nightfox@VERT to CVS commit on Sunday, April 05, 2020 17:07:35
    exec/load dd_lightbar_menu.js 1.14 1.15
    Update of /cvsroot/sbbs/exec/load
    In directory cvs:/tmp/cvs-serv3775

    Modified Files:
    dd_lightbar_menu.js
    Log Message:
    Each menu item can now (optionally) have its own colors specified. If specified, the colors set in an item object take precedence over the item colors set in the DDLightbarMenu object. The itemColor and itemSelectedColor properties in an item object set the normal and selected item color, respectively, and they default to null (no color specified, so the menu would default to the menu object's configured item colors).


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From nightfox@VERT to CVS commit on Sunday, April 05, 2020 17:41:45
    exec/load dd_lightbar_menu.js 1.15 1.16
    Update of /cvsroot/sbbs/exec/load
    In directory cvs:/tmp/cvs-serv8963

    Modified Files:
    dd_lightbar_menu.js
    Log Message:
    In the user input loop, the case for checking the additional quit keys was moved above the case checking for the spacebar. The spacebar normally selects an item in multi-select mode, but the calling code might want the spacebar to be an additional keypress for exiting out of the menu input loop (i.e., if the calling code wants to respond to the spacebar to do something else).


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From nightfox@VERT to CVS commit on Monday, April 06, 2020 16:03:29
    exec/load dd_lightbar_menu.js 1.16 1.17
    Update of /cvsroot/sbbs/exec/load
    In directory cvs:/tmp/cvs-serv2612

    Modified Files:
    dd_lightbar_menu.js
    Log Message:
    For a screen update optimization, implemented a way to temporarily restrict which part of the items to draw the next time Draw() is called (and thus when WriteItem() is called for each tiem). There is a new property in the DDLightbarMenu class, nextDrawOnlyItemSubstr, that can be set to an object with 'start' and 'end' properties specifyign the start and end indexes (1 past the last char index) of the item strings to write in the menu the next time Draw() is called. Draw() will then set nextDrawOnlyItemSubstr to null when it's done.


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From nightfox@VERT to CVS commit on Tuesday, April 07, 2020 12:40:20
    exec/load dd_lightbar_menu.js 1.17 1.18
    Update of /cvsroot/sbbs/exec/load
    In directory cvs:/tmp/cvs-serv1241

    Modified Files:
    dd_lightbar_menu.js
    Log Message:
    The F and L keys now nagivate to the first & last pages, respectfully (unless the calling code has added either of those keys as additional keys to exit the input loop in case the calling code wants to handle those keys for something). Also, fixed a minor bug in calculating the length of items to print when the scrollbar is enabled but not refreshed on the screen when writing the items.


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From nightfox@VERT to CVS commit on Tuesday, April 07, 2020 15:31:55
    exec/load dd_lightbar_menu.js 1.18 1.19
    Update of /cvsroot/sbbs/exec/load
    In directory cvs:/tmp/cvs-serv27288

    Modified Files:
    dd_lightbar_menu.js
    Log Message:
    On second thought, F and L for first & last page isn't really needed, since Home and End do that.


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From nightfox@VERT to CVS commit on Sunday, April 12, 2020 00:20:44
    exec/load dd_lightbar_menu.js 1.19 1.20
    Update of /cvsroot/sbbs/exec/load
    In directory cvs:/tmp/cvs-serv8277

    Modified Files:
    dd_lightbar_menu.js
    Log Message:
    The new property nextDrawOnlyItems is an array that contains indexes for specific items to be written the next time the menu is drawn. It can be used as a display optimization; for example, if the menu is redrawn in an input loop in the calling code and the selected item changed on the same 'page' on the menu, then the calling code can add the indexes of the 2 items to redraw the next the the menu is drawn so that the menu will only refresh those 2 items on the screen rather than the whole page of items.


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From nightfox@VERT to CVS commit on Monday, April 13, 2020 15:30:10
    exec/load dd_lightbar_menu.js 1.20 1.21
    Update of /cvsroot/sbbs/exec/load
    In directory cvs:/tmp/cvs-serv12955

    Modified Files:
    dd_lightbar_menu.js
    Log Message:
    Screen refresh optimization: Only do PageUp and PageDown if not already at the top or bottom of the menu items. If already there, don't redraw the menu items.


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From nightfox@VERT to CVS commit on Tuesday, May 05, 2020 18:50:15
    exec/load dd_lightbar_menu.js 1.21 1.22
    Update of /cvsroot/sbbs/exec/load
    In directory cvs:/tmp/cvs-serv10433

    Modified Files:
    dd_lightbar_menu.js
    Log Message:
    Now uses KEY_PAGEUP and KEY_PAGEDN, as defined by key_defs.js rather than using its own pageup/pagedown variable definitions as it was doing before. Also, fixed some weirdness & improved the apperance when selecting & de-selecting items in multi-select mode when using color arrays to color the items.


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Eric Oulashin@VERT to Git commit to main/sbbs/master on Wednesday, September 04, 2024 23:27:18
    https://gitlab.synchro.net/main/sbbs/-/commit/806593aca6d931349d2b789e
    Modified Files:
    exec/load/dd_lightbar_menu.js
    Log Message:
    dd_lightbar_menu.js: Fix for out-of-bounds row updates when updating the scrollbar in DDLightbarMenu_UpdateScrollbar()

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Wednesday, September 04, 2024 23:27:18
    https://gitlab.synchro.net/main/sbbs/-/commit/320bd3658625014bed5a4a58
    Modified Files:
    exec/load/dd_lightbar_menu.js
    Log Message:
    Merge branch 'dd_lightbar_menu_UpdateScrollbar_RowOutOfRange_Fix' into 'master'

    dd_lightbar_menu.js: Fix for out-of-bounds row updates when updating the scrollbar in DDLightbarMenu_UpdateScrollbar()

    See merge request main/sbbs!457

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Eric Oulashin@VERT to Git commit to main/sbbs/master on Saturday, November 30, 2024 22:28:36
    https://gitlab.synchro.net/main/sbbs/-/commit/d88c443568ac8c094137a4ec
    Modified Files:
    exec/load/dd_lightbar_menu.js
    Log Message:
    DDLightbarMenu: When clearing the remainder of the screen after drawing the menu, ensure the console attributes are reset. Also, refactored that section of code.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Saturday, November 30, 2024 22:28:36
    https://gitlab.synchro.net/main/sbbs/-/commit/e95618521c9d3f86cd59a27c
    Modified Files:
    exec/load/dd_lightbar_menu.js
    Log Message:
    Merge branch 'dd_lightbar_menu_clear_after_menu_draw_fix' into 'master'

    DDLightbarMenu: When clearing the remainder of the screen after drawing the menu, ensure the console attributes are reset. Also, refactored that section of code.

    See merge request main/sbbs!478

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Eric Oulashin@VERT to Git commit to main/sbbs/master on Friday, January 24, 2025 19:56:37
    https://gitlab.synchro.net/main/sbbs/-/commit/7181168590bfe2741c466840
    Modified Files:
    exec/load/dd_lightbar_menu.js
    Log Message:
    DDLightbarMenu: Remove the inputTimeoutMS property; use console.inactivity_hangup instead.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Friday, January 24, 2025 19:56:37
    https://gitlab.synchro.net/main/sbbs/-/commit/622273166edd7942dc2d7fc2
    Modified Files:
    exec/load/dd_lightbar_menu.js
    Log Message:
    Merge branch 'dd_lightbar_menu_use_console_inactivity_hangup' into 'master'

    DDLightbarMenu: Remove the inputTimeoutMS property; use console.inactivity_hangup instead.

    See merge request main/sbbs!492

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Eric Oulashin@VERT to Git commit to main/sbbs/master on Saturday, March 01, 2025 15:10:30
    https://gitlab.synchro.net/main/sbbs/-/commit/c42f0f9a458d9f3c8d0b6afb
    Modified Files:
    exec/load/dd_lightbar_menu.js
    Log Message:
    DDLightbarMenu: For numbered mode (no lightbar), allow 1 mor character when using substr with the item text

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Saturday, March 01, 2025 15:10:30
    https://gitlab.synchro.net/main/sbbs/-/commit/d1b2b0284d3549051738c30d
    Modified Files:
    exec/load/dd_lightbar_menu.js
    Log Message:
    Merge branch 'dd_lightbar_menu_numbered_mode_substr_1_longer' into 'master'

    DDLightbarMenu: For numbered mode (no lightbar), allow 1 mor character when using substr with the item text

    See merge request main/sbbs!516

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Eric Oulashin@VERT to Git commit to main/sbbs/master on Wednesday, March 05, 2025 11:07:05
    https://gitlab.synchro.net/main/sbbs/-/commit/0d3726b59fe9acf0de64e035
    Modified Files:
    exec/load/dd_lightbar_menu.js
    Log Message:
    DDLightbarMenu: AdditionalQuitKeys now are honored in traditional (non-lightbar) mode, and there's a new menu property, nonANSIPromptText, which allows customization of the prompt text when in traditional/non-ANSI mode.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Wednesday, March 05, 2025 11:07:05
    https://gitlab.synchro.net/main/sbbs/-/commit/93d71feb53424a90202a4cbe
    Modified Files:
    exec/load/dd_lightbar_menu.js
    Log Message:
    Merge branch 'dd_lightbar_menu_non_ansi_input_update' into 'master'

    DDLightbarMenu: AdditionalQuitKeys now are honored in traditional (non-lightbar) mode, and there's a new menu property, nonANSIPromptText, which allows customization of the prompt text when in traditional/non-ANSI mode.

    See merge request main/sbbs!518

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