Tactile Media / Skids Progress Gauge

Organizing tasks to work on, New Features Ideas, Building LCS & LCB Libraries & Widgets, Redecorating and Modifying the IDE, Hacking / Editing Tools, Compiling the Engine from Source, etc.
Post Reply
Skids
Posts: 106
Joined: Thu Dec 22, 2022 9:40 am
Location: North Lincolnshire
Contact:

Tactile Media / Skids Progress Gauge

Post by Skids »

This CustomControl originated from RunRev14 and was written by Scott Rossi. I believe he gave it and other demonstrations to everyone to play with and use. Since sharing a version via my CustomControl Palette yesterday I have been updating the documentation as well as moving the API code into the group. I will publish the update on this thread once its ready.

In the mean time here are two screen shots of the CustomControl on a demonstration stack.
Screenshot 2024-08-15 at 11.36.13.png
Screenshot 2024-08-15 at 11.36.13.png (94.33 KiB) Viewed 6590 times
and the settings page:
Screenshot 2024-08-15 at 11.36.28.png
Screenshot 2024-08-15 at 11.36.28.png (114.96 KiB) Viewed 6590 times
S
Mostly using a Mac Studio M2 running MacOS Sonoma.
User avatar
richmond62
Posts: 4830
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Tactile Media / Skids Progress Gauge

Post by richmond62 »

Would it also be possible to unshoogle the central number?
-
Screen Shot 2024-08-15 at 2.01.57 pm.png
Screen Shot 2024-08-15 at 2.01.57 pm.png (10.72 KiB) Viewed 6585 times
-
https://richmondmathewson.owlstown.net/
Skids
Posts: 106
Joined: Thu Dec 22, 2022 9:40 am
Location: North Lincolnshire
Contact:

Re: Tactile Media / Skids Progress Gauge

Post by Skids »

tperry2x suggested the following in another thread:
To combat the initialisation step, you could perhaps put the script of the initialise button in a "on preOpenStack" handler in the stack script, or in the group itself, you could have:

on preOpenControl
SetMaxValue 100
SetValue 0
InitialiseProgress 100
end preOpenControl
The updated version just requires a single line to initialise:

Code: Select all

 dispatch "InitialiseProgress" to group "tm_circular_gauge" with 100
where 100 is the maximum value.

The way I have used this CustomControl in the past is in an application that parses a folder of images. A large version of the Progress Gauge is placed on the stack covering all other controls. When the load of images starts the number of images to be processed becomes known, At this point the stack blurs its contents and displays the ProgressGauge on top of the blurred stack. This works because the initialise handler unhides the control.

Some of the Custom Properties are user editable and others should be left to the code. This is the area which I am trying to understand and make as robust as possible.

In the longer term I wonder if I can write a new palette designed to display and edit user editable customProperties of correctly constructed custom controls.

Simon
Mostly using a Mac Studio M2 running MacOS Sonoma.
User avatar
tperry2x
Posts: 3208
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Tactile Media / Skids Progress Gauge

Post by tperry2x »

Skids wrote: Thu Aug 15, 2024 11:01 am The updated version just requires a single line to initialise:

Code: Select all

 dispatch "InitialiseProgress" to group "tm_circular_gauge" with 100
where 100 is the maximum value.
That's cool.
I prefer that, a lot easier.

Something else worth checking.
If I increase the value to say, 50 with my Properties palette, but you can see the widget is stuck on 45 still:
a.png
a.png (175.44 KiB) Viewed 6579 times
I was thinking it was something wrong with my properties palette, but I can check the value is set correctly with the 'old' inspector (so my properties palette is working):
b.png
b.png (181.81 KiB) Viewed 6579 times
The issue seems to be [emphasis on this, as it's as far as I can tell] that the new value for this widget is getting updated by the widget script in the 'customkeys' property set, which is returning as a blank line in the old inspector (which is why me changing it is having no effect):
c.png
c.png (175.73 KiB) Viewed 6579 times
You can try setting a custom value by using this in a btn, which seems to work as you are setting the value in the array keyset directly:

Code: Select all

on mousedown
   put 20 into tNewValue
   set the tmControlData["gaugeValue"] of group "tm_circular_gauge" to tNewValue
   UpdateProgress tNewValue
end mousedown
Here's a version where I do that by increasing and decreasing that value +1 and -1
I also just put that script in the "on preOpenControl" of the group. This will want changing for your updated example, but just means you don't have to click the initialise button any more.
gauge-test.png
gauge-test.png (11.43 KiB) Viewed 6569 times
Attachments
GaugeTest.oxtstack
(14.02 KiB) Downloaded 89 times
Skids
Posts: 106
Joined: Thu Dec 22, 2022 9:40 am
Location: North Lincolnshire
Contact:

Re: Tactile Media / Skids Progress Gauge

Post by Skids »

I will have a look but advise controlling the gauge using dispatch commands.

I've attached an update to the demo stack but please treat it and the gauge as very beta.

S
v2 GaugeTest.oxtstack
I hope I grabbed the correct version....
(96.92 KiB) Downloaded 87 times
Mostly using a Mac Studio M2 running MacOS Sonoma.
Skids
Posts: 106
Joined: Thu Dec 22, 2022 9:40 am
Location: North Lincolnshire
Contact:

Re: Tactile Media / Skids Progress Gauge

Post by Skids »

I have reached a point where I need to stop and the three stacks are working but not fully tested.

I'm attaching three stack files here.

The first is the the progress CustomControl on a stack with other components that enable the CC to be added to the CC palette that I am also working on. Of course you can copy the CC and its behavior button to any stack, link them and use but I feel that this is a little clumsy. If you have a copy of my palette then all you need to do is have both the palette open and the stack open - select the CustomControl and then press the add control button on the palette.
tmCircularGaugeV2-1.oxtstack
(16.36 KiB) Downloaded 90 times
The second stack is my test stack which shows how to set the various properties of the Progress Gauge.
v2 GaugeTestofNewVersion of CC.oxtstack
(103.4 KiB) Downloaded 85 times
The third is the palette stack which I'm making changes to.
UserToolsv2-1-2WIP ScrollTest.oxtstack
(249.64 KiB) Downloaded 86 times
All feedback welcomed.

S
Mostly using a Mac Studio M2 running MacOS Sonoma.
User avatar
tperry2x
Posts: 3208
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Tactile Media / Skids Progress Gauge

Post by tperry2x »

Skids wrote: Thu Aug 15, 2024 1:53 pm I've attached an update to the demo stack but please treat it and the gauge as very beta.
No problem. I think you did, as I've now got some settings I can tweak - although it's got inherited default colours from the OS - easily rectified by setting the foregroundcolour of the card / stack.
native-linux-inherited.png
native-linux-inherited.png (145.48 KiB) Viewed 6536 times
Anyway, please don't see that as a criticism.

There is a weird thing with the Gauge now. Seems to run backwards, and I seem to have to initialise it multiple times for it to work. (Demo video of what I mean)

Again, not a criticism - just an observation or something to consider.
Skids
Posts: 106
Joined: Thu Dec 22, 2022 9:40 am
Location: North Lincolnshire
Contact:

Re: Tactile Media / Skids Progress Gauge

Post by Skids »

Check the radio buttons - clockwise / anticlockwise
Mostly using a Mac Studio M2 running MacOS Sonoma.
User avatar
tperry2x
Posts: 3208
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Tactile Media / Skids Progress Gauge

Post by tperry2x »

Skids wrote: Thu Aug 15, 2024 3:39 pm Check the radio buttons - clockwise / anticlockwise
:lol: Oh yeah, couldn't see them! haha
Skids
Posts: 106
Joined: Thu Dec 22, 2022 9:40 am
Location: North Lincolnshire
Contact:

Re: Tactile Media / Skids Progress Gauge

Post by Skids »

Great, but I need to get an understanding of what happens in dark mode (if thats its name). For example does xtalk raise a message that can be used to reverse the colours or something?

S
Mostly using a Mac Studio M2 running MacOS Sonoma.
User avatar
tperry2x
Posts: 3208
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Tactile Media / Skids Progress Gauge

Post by tperry2x »

This is just OS inheritance, and is what I've been banging on about for over a year now :lol: .
I'll come back to this in a bit.

I've tweaked it a bit, hope you don't mind.
I set the initialise to do it for you.
I set a colour of the foreground on the card so text shows up neutrally.
I set the update loop as a non-blocking loop
I added a busy animation as I honestly thought it had locked up when I went to the settings

I'll stop hijacking your project now, promise!
2-2.png
2-2.png (122.23 KiB) Viewed 6514 times
Gauge-v2-2.oxtstack
(84.16 KiB) Downloaded 90 times
User avatar
tperry2x
Posts: 3208
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Tactile Media / Skids Progress Gauge

Post by tperry2x »

Right, so this is what I'm on about with theme inheritance on Linux.
What your system theme is set to, is what the IDE uses.
So, if you want a specific look - then you need to override it as otherwise the IDE inherits the system theme.
mariwata.png
mariwata.png (73.95 KiB) Viewed 6510 times
mariwata-IDE.png
mariwata-IDE.png (210.6 KiB) Viewed 6510 times
Skids
Posts: 106
Joined: Thu Dec 22, 2022 9:40 am
Location: North Lincolnshire
Contact:

Re: Tactile Media / Skids Progress Gauge

Post by Skids »

I've tweaked it a bit, hope you don't mind.
Not at all - I'll learn something
I set the initialise to do it for you.
Fine
I set a colour of the foreground on the card so text shows up neutrally.
Again fine plus its only a demo
I set the update loop as a non-blocking loop
Interesting and useful
I added a busy animation as I honestly thought it had locked up when I went to the settings
Most odd as I don't see any issues when running it here. The open card updates the lists of colours and fonts and its not that fast but as long as I have locked the screen it was quick enough at my end.
I'll stop hijacking your project now, promise!
Keep hijacking! The real project is the palette for CustomControls.

Richmond just prompted me to discover so called LC Script Widgets, not really relevant here as they only appeared in LC v10 but an interesting development. see https://lessons.livecode.com/m/98525/l/ ... ipt-widget please note that I am at least a year out of date - Doh!

S
Mostly using a Mac Studio M2 running MacOS Sonoma.
User avatar
tperry2x
Posts: 3208
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Tactile Media / Skids Progress Gauge

Post by tperry2x »

Skids wrote: Thu Aug 15, 2024 4:20 pm Richmond just prompted me to discover so called LC Script Widgets, not really relevant here as they only appeared in LC v10.
Yeah, that's all well and good - and all very interesting... if you are running LC 10. :D
I think we can certainly surpass this, both for ease of use and for preset examples (eventually).
User avatar
tperry2x
Posts: 3208
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Tactile Media / Skids Progress Gauge

Post by tperry2x »

Skids wrote: Thu Aug 15, 2024 4:20 pm Most odd as I don't see any issues when running it here. The open card updates the lists of colours and fonts and its not that fast but as long as I have locked the screen it was quick enough at my end.
This computer downstairs is only a 4th gen i5 with 16GB of memory, but this is loading the settings card (card 2) in realtime.
cpu.png
cpu.png (6.89 KiB) Viewed 6487 times
Skids
Posts: 106
Joined: Thu Dec 22, 2022 9:40 am
Location: North Lincolnshire
Contact:

Re: Tactile Media / Skids Progress Gauge

Post by Skids »

Ouch! It will be the setting of the colours of the text plus the font styles. If the stack is saved it will save the lists so the code only needs to run once per machine.

S
Mostly using a Mac Studio M2 running MacOS Sonoma.
User avatar
tperry2x
Posts: 3208
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Tactile Media / Skids Progress Gauge

Post by tperry2x »

Skids wrote: Thu Aug 15, 2024 5:45 pm Ouch! It will be the setting of the colours of the text plus the font styles.
Yes, you were right. What was slowing everything down was setting of the font styles.
I've commented that part out for a faster load, version 2.3 attached:
Gauge-v2-3.oxtstack
(72.71 KiB) Downloaded 94 times
Right, that's enough interfering by me! :D
User avatar
OpenXTalkPaul
Posts: 2633
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Tactile Media / Skids Progress Gauge

Post by OpenXTalkPaul »

Skids wrote: Thu Aug 15, 2024 10:39 am This CustomControl originated from RunRev14 and was written by Scott Rossi. I believe he gave it and other demonstrations to everyone to play with and use. Since sharing a version via my CustomControl Palette yesterday I have been updating the documentation as well as moving the API code into the group. I will publish the update on this thread once its ready.

In the mean time here are two screen shots of the CustomControl on a demonstration stack.
Screenshot 2024-08-15 at 11.36.13.png

and the settings page:

Screenshot 2024-08-15 at 11.36.28.png

S
Hey Nice!
That Scott Rossi guy really put out some nice UI tricks stacks!
I have a custom control that's similar to this saved in my Object Library, it's a 'rotator' angle-setter grouped graphics control that I extracted from a stack by Hermann Hoch, I'll upload it later.
Skids
Posts: 106
Joined: Thu Dec 22, 2022 9:40 am
Location: North Lincolnshire
Contact:

Re: Tactile Media / Skids Progress Gauge

Post by Skids »

That Scott Rossi guy really put out some nice UI tricks stacks!
He did and its a shame that he seems to have moved on to using other tools as he has some good ideas. If I remember correctly he found the graphics capabilities of Livecode to limiting.

S
Mostly using a Mac Studio M2 running MacOS Sonoma.
User avatar
OpenXTalkPaul
Posts: 2633
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Tactile Media / Skids Progress Gauge

Post by OpenXTalkPaul »

Skids wrote: Fri Aug 16, 2024 4:24 am
That Scott Rossi guy really put out some nice UI tricks stacks!
He did and its a shame that he seems to have moved on to using other tools as he has some good ideas. If I remember correctly he found the graphics capabilities of Livecode to limiting.

S
He should have gotten into canvas drawing widgets, they may be harder to get into writing, but it's far less limited as to what could be done with it. Of course if you needed anything more than what lib Skia can do (like 3D .obj rendering), you're have to either wrap some other drawing library yourself with xBuilder, use a JavaScript library within the Browser Widget, or switch to another coding language / environment all together.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest