Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

Thread: FREE Menu Library for ILI9341 Displays

  1. #1

    FREE Menu Library for ILI9341 Displays

    If you have ever used a TFT display and don't / can't enable touch capability, you may have needed a menu system to let users set calibration settings, parameters, colors or other "Tools | Options" type things. Writing menu code is tedious but I've decided to make my personal library available to all.

    This library will simplify creating and implementing a menu system for TFT displays that are use the ILI9341_t3 library and Teensy(R) microcontrollers. This library includes two menu objects:

    1. A simple selection menu (ItemMenu object) where the user can scroll up/down and select an item and some programmer-defined action can be performed such as drawing a screen or activating a sub menu
    2. A menu with in-line editing (EditMenu object) where the user can scroll up/down the list and select an item, however the difference is that move/up down on a selected item will scroll the values stored with that menu item, selecting a selected item will restore control to moving up/down the menu list



    Click image for larger version. 

Name:	0003.jpg 
Views:	6 
Size:	11.4 KB 
ID:	27177 Click image for larger version. 

Name:	0007.jpg 
Views:	5 
Size:	12.0 KB 
ID:	27178 Click image for larger version. 

Name:	0073.jpg 
Views:	5 
Size:	9.9 KB 
ID:	27179

    Library highlights

    • Automatic wrapping for menu rows that exceed screen size
    • For EditMenu objects, edits can be within a defined range or from an array
    • Menus can include no icon, mono icon, or color icons
    • Programmer has full control over margins, colors, fonts, etc.
    • Menus can have up to 15 items, but expandable to more by editing the #define MAX_OPT 15
    • Menu items can be enabled or disabled through code
    • Automatic wrapping during editing for items within editable menus
    • Menu item text can be changed at any time through code
    • Initial data in EditMenu objects can be set based on stored or set values
    • Menu selector bars can have round or sharp corners and have a border to accentuate selection
    • Automatic up/down arrows on top and bottom screen rows to indicate to the user "there's more"



    Code here: https://github.com/KrisKasprzak/ILI9341_t3_Menu

    YouTube video demo here: https://youtu.be/KUi9f4hcV6A


    Enjoy

    Kris
    Attached Images Attached Images

  2. #2
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    7,875
    Wow Kris - fantastic library!!!!!

    Will definitely save a heck of a lot of time !!!! Great video as well on using the library as always.

  3. #3
    Thanks for the reply.

    If anyone must use the Adafruit_ILI9431 display driver (and say an ESP32), I have created a specific library for that driver.

    https://github.com/KrisKasprzak/Adafruit_ILI9341_Menu

  4. #4
    Excellent tutorial. Thank you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •