Synchronet v3.19b-Win32 (install) has been released (Jan-2022).

You can donate to the Synchronet project using PayPal.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
custom:javascript:lib:ddlightbarmenu.js [2023/10/07 14:50] – Added notes for the functions AddAdditionalQuitKeys(), ClearAdditionalQuitKeys(), and the upcoming new functions AddAdditionalPageUpKeys, ClearAdditionalPageUpKeys, AddAdditionalPageDownKeys, ClearAdditionalPageDownKeys, AddAdditionalFirstPageKeys, ClearA Nightfoxcustom:javascript:lib:ddlightbarmenu.js [2024/02/11 14:37] – Add() now has an additional parameter: isUTF8 (for the item text) nightfox
Line 20: Line 20:
 **DDLightbarMenu methods** **DDLightbarMenu methods**
 ^ Name                          ^ Returns          ^ Usage                                        ^ Description^ ^ Name                          ^ Returns          ^ Usage                                        ^ Description^
-| Add                           | void    | DDLightbarMenu.Add(text, retval, hotkey, selectable)     | Adds an item to the menu with a given item text, return value, and hotkey for the item.  If the ampersandHotkeysInItems property is set to true before this method is called, then a & can be used in the item text just before the hotkey you want to enable for the item.  For example, "Item &1" would display the text "Item 1" with "1" being the hotkey for the item. The 3rd parameter, selectable, is an optional boolean that specifies whether or not the item is selectable. Non-selectable items will be skipped when scrolling through the menu. |+| Add                           | void    | DDLightbarMenu.Add(text, retval, hotkey, selectable, isUTF8)     | Adds an item to the menu with a given item text, return value, and hotkey for the item.  The isUTF8 parameter specifies whether the item text is UTF-8 (if so, then it will be displayed with the P_UTF8 mode bit to look correct on UTF-8 capable terminals, or converted to cp437 for non-UTF-8 terminals).  If the ampersandHotkeysInItems property is set to true before this method is called, then a & can be used in the item text just before the hotkey you want to enable for the item.  For example, "Item &1" would display the text "Item 1" with "1" being the hotkey for the item. The 3rd parameter, selectable, is an optional boolean that specifies whether or not the item is selectable. Non-selectable items will be skipped when scrolling through the menu. |
 | Remove                        | void    | DDLightbarMenu.Remove(idx)                   | Removes an item from the menu by its index | | Remove                        | void    | DDLightbarMenu.Remove(idx)                   | Removes an item from the menu by its index |
 | RemoveAllItems                | void    | DDLightbarMenu.RemoveAllItems()              | Removes all items from the menu | | RemoveAllItems                | void    | DDLightbarMenu.RemoveAllItems()              | Removes all items from the menu |