@@ -422,21 +422,85 @@ class TcMenuBuilder {
422422 TcMenuBuilder& textItem (menuid_t id, const char *name, EepromPosition eepromPosition, uint16_t textLength,
423423 MenuFlags flags, const char *initial = " " , MenuCallbackFn callbackFn = nullptr );
424424
425+ /* *
426+ * Advanced build option for override of the regular text component for advanced cases, for example editing values that
427+ * need customization such as editing hex values for example.
428+ * @param id the ID of the item
429+ * @param name the name of the item
430+ * @param eepromPosition for dynamic set to ROM_SAVE or DONT_SAVE, for legacy mode use an eeprom address.
431+ * @param textLength The length of the text to be edited.
432+ * @param renderFn The callback function that will customize the control. Consult documentation for details.
433+ * @param flags The configuration flags that define the item's behavior and state.
434+ * @param initial the initial value, optional.
435+ * @param callbackFn The callback function triggered when the item's value changes.
436+ * @return
437+ */
438+ TcMenuBuilder& textCustomRt (menuid_t id, const char *name, EepromPosition eepromPosition, uint16_t textLength,
439+ RuntimeRenderingFn renderFn, MenuFlags flags, const char * initial = " " , MenuCallbackFn callbackFn = nullptr );
440+
441+ /* *
442+ * Adds an IP address menu item to the menu structure. This item allows the user
443+ * to interact with and configure an IP address.
444+ *
445+ * @param id The unique identifier for this menu item.
446+ * @param name The display name for this menu item.
447+ * @param eepromPosition for dynamic set to ROM_SAVE or DONT_SAVE, for legacy mode use an eeprom address.
448+ * @param flags The configuration flags that define the item's behavior and state.
449+ * @param callbackFn An optional callback function triggered when the menu item is changed.
450+ * @return Reference to the TcMenuBuilder instance to allow for method chaining.
451+ */
425452 TcMenuBuilder& ipAddressItem (menuid_t id, const char *name, EepromPosition eepromPosition, MenuFlags flags, MenuCallbackFn callbackFn = nullptr );
426453
454+ /* *
455+ * Adds an IP Address type menu item to the menu structure being built. The IP Address menu item allows users
456+ * to configure or display an IP address directly within the menu.
457+ *
458+ * @param id The unique identifier for the menu item.
459+ * @param name The display name for the menu item.
460+ * @param eepromPosition The EEPROM storage position for persisting the value, or -1 if not stored in EEPROM.
461+ * @param flags The flags specifying visibility, read-only status, and other properties of the menu item.
462+ * @param initial The initial value for the IP address storage.
463+ * @param callbackFn The callback function invoked when the menu item is selected or updated.
464+ * @return Reference to the current instance of TcMenuBuilder to allow method chaining.
465+ */
427466 TcMenuBuilder& ipAddressItem (menuid_t id, const char *name, EepromPosition eepromPosition, MenuFlags flags,
428467 IpAddressStorage ipInitial, MenuCallbackFn callbackFn = nullptr );
429468
469+ /* *
470+ * Advanced construction/build option. Adds a custom IP address menu item to the menu using the provided parameters.
471+ * This method allows customization of properties such as the menu ID, display name, EEPROM storage position, flags,
472+ * initial IP address, and an optional
473+ * callback function.
474+ *
475+ * @param id The unique identifier for the menu item.
476+ * @param name The display name of the menu item.
477+ * @param eepromPosition The EEPROM storage position for the value of this item.
478+ * @param flags Additional menu flags controlling visibility, read-only status, etc.
479+ * @param renderFn The callback function that will customize the control. Consult documentation for details.
480+ * @param ipInitial The initial value for the IP address to be displayed or stored.
481+ * @param callbackFn (Optional) A callback function invoked when the menu item is interacted with. Defaults to nullptr if not provided.
482+ * @return A reference to the TcMenuBuilder for further modification or chaining of method calls.
483+ */
484+ TcMenuBuilder& ipAddressCustomRt (menuid_t id, const char *name, EepromPosition eepromPosition, MenuFlags flags,
485+ RuntimeRenderingFn renderFn, IpAddressStorage ipInitial, MenuCallbackFn callbackFn = nullptr );
486+
430487 TcMenuBuilder& timeItem (menuid_t id, const char *name, EepromPosition eepromPosition, MenuFlags flags, MultiEditWireType timeFormat,
431488 const TimeStorage& timeStorage, MenuCallbackFn callbackFn = nullptr );
432489
433490 TcMenuBuilder& timeItem (menuid_t id, const char *name, EepromPosition eepromPosition, MenuFlags flags, MultiEditWireType timeFormat,
434491 MenuCallbackFn callbackFn = nullptr );
435492
493+ TcMenuBuilder& timeItemCustomRt (menuid_t id, const char *name, EepromPosition eepromPosition, const TimeStorage& timeStorage,
494+ RuntimeRenderingFn renderFn, MenuFlags flags, MultiEditWireType timeFormat, MenuCallbackFn callbackFn = nullptr );
495+
436496 TcMenuBuilder& dateItem (menuid_t id, const char *name, EepromPosition eepromPosition, MenuFlags flags, DateStorage initial,
437497 MenuCallbackFn callbackFn = nullptr );
498+
438499 TcMenuBuilder& dateItem (menuid_t id, const char *name, EepromPosition eepromPosition, MenuFlags flags, MenuCallbackFn callbackFn = nullptr );
439500
501+ TcMenuBuilder& dateItemCustomRt (menuid_t id, const char *name, EepromPosition eepromPosition, MenuFlags flags, DateStorage initial,
502+ RuntimeRenderingFn renderFn, MenuCallbackFn callbackFn = nullptr );
503+
440504 /* *
441505 * @brief Creates and preconfigures a ScrollChoiceBuilder to define a scrollable choice menu item.
442506 *
@@ -500,7 +564,24 @@ class TcMenuBuilder {
500564 * @return A reference to the current `TcMenuBuilder` instance to allow for method chaining.
501565 */
502566 TcMenuBuilder& rgb32Item (menuid_t id, const char *name, EepromPosition eepromPosition, bool alphaChannel,
503- MenuFlags flags, RgbColor32 initial, MenuCallbackFn callbackFn = nullptr );
567+ MenuFlags flags, const RgbColor32& initial, MenuCallbackFn callbackFn = nullptr );
568+
569+ /* *
570+ * Advanced construction/build case for RGB items where you need to override the menu in a custom way. This is
571+ * normally used when you want to customize the rendering or behavior of the RGB menu item beyond the standard options.
572+ *
573+ * @param id The unique identifier for the RGB32 menu item.
574+ * @param name The display name of the menu item.
575+ * @param eepromPosition for dynamic set to ROM_SAVE or DONT_SAVE, for legacy mode use an eeprom address.
576+ * @param alphaChannel Boolean flag indicating whether the alpha channel is supported.
577+ * @param renderFn The custom rendering function for the RGB menu item. Consult the documentation
578+ * @param flags Additional configuration flags for the menu item.
579+ * @param initial The initial color value of type `RgbColor32` for the menu item.
580+ * @param callbackFn A function pointer for the menu item callback, invoked on user interaction.
581+ * @return A reference to the current `TcMenuBuilder` instance to allow for method chaining.
582+ */
583+ TcMenuBuilder& rgb32CustomRt (menuid_t id, const char *name, EepromPosition eepromPosition, bool alphaChannel,
584+ RuntimeRenderingFn renderFn, MenuFlags flags, const RgbColor32& initial, MenuCallbackFn callbackFn = nullptr );
504585
505586 /* *
506587 * @brief Adds a list menu item to the menu structure with content stored in RAM.
@@ -579,7 +660,7 @@ class TcMenuBuilder {
579660 /* *
580661 * Add an item that you've created manually, such as a custom item outside the scope of this builder. For example, if
581662 * you had used the traditional static method for some complex items, you could add them using this method.
582- * @param itemToAdd the item to append to the menu hierarchy.
663+ * @param itemToAdd the item to append to the menu hierarchy. The item must not be deallocated after addition!
583664 * @return A reference to the current TcMenuBuilder instance for method chaining.
584665 */
585666 TcMenuBuilder& appendCustomItem (MenuItem* itemToAdd);
@@ -626,5 +707,4 @@ class TcMenuBuilder {
626707
627708};
628709
629-
630- #endif // TCLIBRARYDEV_TCMENUBUILDER_H
710+ #endif // TCLIBRARYDEV_TCMENUBUILDER_H
0 commit comments