Yes, A possible issue I just thought of is the increments I designed the code to automatically make incremental bars, basically divide it into segments based on the height of the slider and the difference of the range values.
If you have a slider that is only 100 pixels in height but the range is set to 0 - 255 at 1 increment, then you most likely won't see anything, however it will still function.
Based on that issue, I will make the incremental bars optional.
As per the issue foreseen with the Sliders, there is now the option to show the bars "Bars" or to not show them "NoBars"
To choose between the two, you add either Bars or NoBars to the end of the Padding function.
Ex:
Slider.Padding(2, BLUE, Bars);
You will most likely not see the bars if the difference of the set range divided by the incremental value is greater than the overall height or width of the slider. NoBars fixes this by just giving you a solid bar.
Attached is the updated keywords file and .h file. (No new examples have been made yet)
OK, getting to grips with the V2 library, and figured out not to use 'myTFT', but to use SlideV.
Regarding using the slider to control PWM o/p for the brightness of a TFT backlight, i was going about it the 'long way', when i glanced at the Keywords, and spotted 'GetValue'.
Can i use 'GetValue', to get the value of where the slider's position is to then o/p a PWM?
I haven't got very far with the code, but like i say i was using 'pinMode, analogWrite' etc then spotted 'GetValue'.
No, .Touch() will return the value from the slider.
SlideV.SetValue(SlideV.Touch());
GetValue was mainly for the .Touch() function and should have been private. As it is only helpful if you Set a value first.
You don't need to set the value to the same value its already at. Just read the value from SliderV.Touch().
SetValue allows the user to set the value to whatever they want (given it is within the setrange). My example was to show how one slider can change another based on that function.
Quick update, not releasing the library just yet though. I fixed the issues with the slider class, to where I added a new function called SetStartingValue( int ). This is to go into the setup function and based on the range you set with the SetRange function, it will output that value as well as move the slider accordingly.
Another minor addition was made to the swipe class, in which I added a simple function to show the swip area based on the set coordinates.
Now the major addition I made to this library is the keyboard. I currently have a working keyboard that can be stretched to fit any screen (although not recommended for screens smaller than 320x240 resolution).
The reason I am not releasing this new update is because of the amount of memory the keyboard class takes up.
Shockingly, the keyboard class by itself as it currently stands, it takes up about 31K of memory!
I want to try to cut that down and maybe redesign the structure of the keyboard class to something more practical in terms of memory usage.
Hello Everybody, and first of all many thx to HazardsMind for his work.
I'm new from the Forum.
I've downloaded and work some days with the TFT_ExtensionV2 and I've a question about the slider.
How is possible to change the color of text that plot "SlideV.Touch"?
I.e. I've a button (ON/OFF) and a Slider.
When the button is "OFF" the text background is "red". When the button turn "ON" the background go "red".