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

Thread: Add sliders to your touch screen projects -- free library

  1. #1

    Add sliders to your touch screen projects -- free library

    If you use touch screens (ILI9341_t3), maybe this slider library will add some flare to your GUI.

    Library at: https://github.com/KrisKasprzak/ILI9341_t3_controls

    Short vid on usage: https://www.youtube.com/watch?v=HE2Y7moK56A


    Hope this helps someone.

  2. #2
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    5,631
    Thanks Kris - just saw the post, very cool.

  3. #3
    Senior Member
    Join Date
    Aug 2019
    Location
    Melbourne Australia
    Posts
    160
    Thank you Kris, having loads of fun with it.

    Click image for larger version. 

Name:	CovidMidi1.jpg 
Views:	12 
Size:	129.3 KB 
ID:	21654

  4. #4
    Senior Member
    Join Date
    Aug 2019
    Location
    Melbourne Australia
    Posts
    160
    Hi Kris. Double thank you again. Playing around exploring limits and came up with this:-

    Click image for larger version. 

Name:	DSC_0860.jpg 
Views:	11 
Size:	127.4 KB 
ID:	21717

    Very useful for visual feedback, hooked up to 16 encoders. Slider heights are 80 and with the higher vertical Touch resolution, a steady hand and a small-tipped stylus, Touch is workable for the 0 - 127 range of values.

    Took some library edits to reduce the Ball size, necessary to make it all fit.

    Thinking on the Ball, got my hand up for exposing Ball parameters to the user, eg.

    Size.

    Shape, Round, square, maybe a triangle, rotated 45 Deg, and Offset left or right so the pointy bit points at the end of the Tick mark. Or perhaps two triangles so the result is like a bow-tie cursor?

    For the Tick marks, top same height as the rest and add the bottom one. Centered on the vertical line.

    Any thoughts?

  5. #5
    Your wish has been granted.

    Get the latest lib here: https://github.com/KrisKasprzak/ILI9341_t3_controls


    1. New methods on vertical and horizontal sliders

    xxx.setHandleSize(int val); // 4 to 40 pixels
    xxx.setHandleShape(byte val); // one of the following: HANDLE_NONE, HANDLE_CIRCLE, HANDLE_SQUARE, HANDLE_TRIANGLE_1, HANDLE_TRIANGLE_2, HANDLE_TRIANGLE_3
    xxx.change(); // sets a flag to force the lib to redraw inside the draw method--this is really only for special cases when using code to update a different slider, see ColorPicker example


    2. added checker to eliminate redraw from other changes inside the draw method
    3. fixed bars so they are centered with changes to handle size


    Click image for larger version. 

Name:	20200914_135307.jpg 
Views:	6 
Size:	113.9 KB 
ID:	21723

  6. #6
    Senior Member
    Join Date
    Aug 2019
    Location
    Melbourne Australia
    Posts
    160
    Thank you Kris. All the best.

Posting Permissions

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