• exec/load/dd_lightbar_menu.js

    From nightfox@VERT to CVS commit on Sat Apr 4 15:06:12 2020
    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 Sat Apr 4 19:21:34 2020
    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 Sat Apr 4 21:22:38 2020
    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 Sun Apr 5 14:02:29 2020
    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 Sun Apr 5 18:07:35 2020
    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 Sun Apr 5 18:41:45 2020
    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 Mon Apr 6 17:03:29 2020
    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 Tue Apr 7 13:40:20 2020
    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 Tue Apr 7 16:31:55 2020
    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 Sun Apr 12 01:20:44 2020
    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 Mon Apr 13 16:30:10 2020
    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 Tue May 5 19:50:15 2020
    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 nightfox@VERT to CVS commit on Wed May 6 21:40:14 2020
    exec/load dd_lightbar_menu.js 1.22 1.23
    Update of /cvsroot/sbbs/exec/load
    In directory cvs:/tmp/cvs-serv1466

    Modified Files:
    dd_lightbar_menu.js
    Log Message:
    Now includes mouse support. A mouse click on an item in the menu will make it the currently highlighted item, and if the scrollbar is enabled, clicking above/below the solid scroll block will do a page up/down.
    I'm wondering if there's a function (other than time()) that has higher resolution than 1 second (perhaps milliseconds?) so I can detect a double-click in a short amount of time (to perhaps add an item when multi-select is enabled).
    I also saw the 'motion' variable, and I'm wondering if that coudl be used to detect mouse motion when the button is pressed (so that the menu can scroll when the mouse is moved while the mouse button is pressed over the scroll block).


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From echicken@VERT/ECBBS to nightfox on Thu May 7 01:15:07 2020
    Re: exec/load/dd_lightbar_menu.js
    By: nightfox to CVS commit on Wed May 06 2020 21:40:14

    do a page up/down. I'm wondering if there's a function (other than time()) that has higher
    resolution than 1 second (perhaps milliseconds?) so I can detect a double-click in a short amount of

    The system.timer property provides this. Fractional seconds after the decimal point, IIRC.

    (Or you could do (new Date()).getTime(), but the former is probably faster.)

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com
    þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com
  • From nightfox@VERT to CVS commit on Thu May 7 21:49:10 2020
    exec/load dd_lightbar_menu.js 1.23 1.24
    Update of /cvsroot/sbbs/exec/load
    In directory cvs:/tmp/cvs-serv11218

    Modified Files:
    dd_lightbar_menu.js
    Log Message:
    A double-click of the mouse button now selects an item on the menu if multi-select is enabled. A double-click is detected if 2 mouse clicks happen within 0.4 seconds (arbitrarily chosen).


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Eric Oulashin@VERT to Git commit to main/sbbs/master on Tue Dec 7 22:24:57 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/bfcf6d24ef50ee585cd40778
    Modified Files:
    exec/load/dd_lightbar_menu.js
    Log Message:
    Made a fix (kludge?) to properly write menu items with the check character (multi-selected) in a borderless menu (vs. a menu with borders).

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Tue Dec 7 22:24:57 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/bf968208bdb1b35f58f0c472
    Modified Files:
    exec/load/dd_lightbar_menu.js
    Log Message:
    Merge branch 'ddLightBarMenuMultiSelectDrawFix' into 'master'

    dd_lightbar_menu: Made a fix (kludge?) to properly write menu items with the check character

    See merge request main/sbbs!127

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Eric Oulashin@VERT to Git commit to main/sbbs/master on Tue Dec 14 14:58:38 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/2e9cd51bfa18b60fa0c90dcb
    Modified Files:
    exec/load/dd_lightbar_menu.js
    Log Message:
    Better handling of ESC key input if mouse support is disabled

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Tue Dec 14 14:58:38 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/5a5882607b77733cc780d14e
    Modified Files:
    exec/load/dd_lightbar_menu.js
    Log Message:
    Merge branch 'dd_lightbar_menu_nomoues_traditional_input' into 'master'

    Better handling of ESC key input if mouse support is disabled

    See merge request main/sbbs!130

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Eric Oulashin@VERT to Git commit to main/sbbs/master on Thu Jun 27 14:43:53 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/b6c58742dad53585161361eb
    Modified Files:
    exec/load/dd_lightbar_menu.js
    Log Message:
    dd_lightbar_menu: str_is_utf8() seems to return true sometimes when a string doesn't have UTF-8, so that is now commented out for now

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Thu Jun 27 14:43:53 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/654b6f76d462f885147cc32e
    Modified Files:
    exec/load/dd_lightbar_menu.js
    Log Message:
    Merge branch 'dd_lightbar_menu_text_is_utf8_dont_use_str_is_utf8' into 'master'

    dd_lightbar_menu: str_is_utf8() seems to return true sometimes when a string doesn't have UTF-8, so that is now commented out for now

    See merge request main/sbbs!440

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Eric Oulashin@VERT to Git commit to main/sbbs/master on Sat Jun 29 17:10:45 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/d3792caafc3640f2fe1cfc1a
    Modified Files:
    exec/load/dd_lightbar_menu.js
    Log Message:
    dd_lightbar_menu.js: Fixed text truncation issue when displaying item text when we know it's UTF-8

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sat Jun 29 17:10:45 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/61049cd7f5e421542d57147d
    Modified Files:
    exec/load/dd_lightbar_menu.js
    Log Message:
    Merge branch 'dd_lightbar_menu_write_item_utf8_improvement' into 'master'

    dd_lightbar_menu.js: Fixed text truncation issue when displaying item text when we know it's UTF-8

    See merge request main/sbbs!441

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Eric Oulashin@VERT to Git commit to main/sbbs/master on Wed Sep 4 23:27:18 2024
    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 Wed Sep 4 23:27:18 2024
    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