desbyc 2019-02-07 14:13
is there a better way to do that?
I am not happy with my result. 🥺
Timo 2019-02-07 14:45
For GUIs with dragging and stuff this might be useful:
was8bit 2019-02-07 16:59 (Edited)
Here is my approach.... I took the approach of using least amount of code and resources... I also took the liberty of placing left 2 and right 2 on left and right speakers...
One advantage, to set all at one volume just slowly swipe across the screen at the desired level and they all get set with one swipe :)
Timo 2019-02-07 20:05
The main point of my GUI library is, that when you tap on something, it locks the focus on this element until you stop touching. So if you start on one slider and drag to another slider, you don't change the other one.
was8bit 2019-02-08 00:17
Could some of that funtionality be added at the core level as commands??
I've always liked the idea of SUB memory being static... with an IF INITIALIZE THEN END IF where one could initialize all internal variables it needs to keep track of things, and their values are maintained between calls
and perhaps FUNC for functions that behave exactly like current subs do, but their memory is dynamic and their memories are not kept after the call is over..
THAT WAY, libraries could be totally self contained, users would not have to worry about initializing special variables, not using some variables, adding extra variables in the CALL command, etc.. all they would have to do is copy paste the one library sub and just use it right away ...
was8bit 2019-02-08 00:23
With the static memory SUB(), coupled with dynamic memory FUNC(), one could use different FUNC routines in conjunction with the one SUB, and still user wouldn't have to worry about initial setup...
I know in higher level programming you simply add the LIB command with the library you want, and presto you're good to go and use the library functions... in fact in this scenario you dont even see the library code at all... I understand this isn't directly possible in lowres.. but maybe in function could be done ??? ... just thinking outside the box...
Timo 2019-02-08 07:19
For this idea I already reserved the STATIC keyword. You would call STATIC inside of a SUB with all the variables you want to keep. It's a bit like GLOBAL, but the other way around ;)
Anyway, this is not yet on my to-do list.
was8bit 2019-02-08 11:10
Oh cool!!!! :)