Tactile Media / Skids Progress Gauge
-
- Posts: 106
- Joined: Thu Dec 22, 2022 9:40 am
- Location: North Lincolnshire
- Contact:
Tactile Media / Skids Progress Gauge
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. and the settings page:
S
In the mean time here are two screen shots of the CustomControl on a demonstration stack. and the settings page:
S
Mostly using a Mac Studio M2 running MacOS Sonoma.
- richmond62
- Posts: 4830
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: Tactile Media / Skids Progress Gauge
Would it also be possible to unshoogle the central number?
- -
- -
https://richmondmathewson.owlstown.net/
-
- Posts: 106
- Joined: Thu Dec 22, 2022 9:40 am
- Location: North Lincolnshire
- Contact:
Re: Tactile Media / Skids Progress Gauge
tperry2x suggested the following in another thread:
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
The updated version just requires a single line to initialise: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
Code: Select all
dispatch "InitialiseProgress" to group "tm_circular_gauge" with 100
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.
- 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
That's cool.Skids wrote: ↑Thu Aug 15, 2024 11:01 am The updated version just requires a single line to initialise:where 100 is the maximum value.Code: Select all
dispatch "InitialiseProgress" to group "tm_circular_gauge" with 100
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: 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): 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): 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
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.
- Attachments
-
- GaugeTest.oxtstack
- (14.02 KiB) Downloaded 89 times
-
- Posts: 106
- Joined: Thu Dec 22, 2022 9:40 am
- Location: North Lincolnshire
- Contact:
Re: Tactile Media / Skids Progress Gauge
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
I've attached an update to the demo stack but please treat it and the gauge as very beta.
S
Mostly using a Mac Studio M2 running MacOS Sonoma.
-
- Posts: 106
- Joined: Thu Dec 22, 2022 9:40 am
- Location: North Lincolnshire
- Contact:
Re: Tactile Media / Skids Progress Gauge
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. The second stack is my test stack which shows how to set the various properties of the Progress Gauge. The third is the palette stack which I'm making changes to. All feedback welcomed.
S
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. The second stack is my test stack which shows how to set the various properties of the Progress Gauge. The third is the palette stack which I'm making changes to. All feedback welcomed.
S
Mostly using a Mac Studio M2 running MacOS Sonoma.
- 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
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. 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.
-
- Posts: 106
- Joined: Thu Dec 22, 2022 9:40 am
- Location: North Lincolnshire
- Contact:
Re: Tactile Media / Skids Progress Gauge
Check the radio buttons - clockwise / anticlockwise
Mostly using a Mac Studio M2 running MacOS Sonoma.
- tperry2x
- Posts: 3208
- Joined: Tue Dec 21, 2021 9:10 pm
- Location: Somewhere in deepest darkest Norfolk, England
- Contact:
-
- Posts: 106
- Joined: Thu Dec 22, 2022 9:40 am
- Location: North Lincolnshire
- Contact:
Re: Tactile Media / Skids Progress Gauge
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
S
Mostly using a Mac Studio M2 running MacOS Sonoma.
- 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
This is just OS inheritance, and is what I've been banging on about for over a year now
.
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!

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!
- 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
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.
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.
-
- Posts: 106
- Joined: Thu Dec 22, 2022 9:40 am
- Location: North Lincolnshire
- Contact:
Re: Tactile Media / Skids Progress Gauge
Not at all - I'll learn somethingI've tweaked it a bit, hope you don't mind.
FineI set the initialise to do it for you.
Again fine plus its only a demoI set a colour of the foreground on the card so text shows up neutrally.
Interesting and usefulI set the update loop as a non-blocking loop
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 added a busy animation as I honestly thought it had locked up when I went to the settings
Keep hijacking! The real project is the palette for CustomControls.I'll stop hijacking your project now, promise!
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.
- 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
Yeah, that's all well and good - and all very interesting... if you are running LC 10.

I think we can certainly surpass this, both for ease of use and for preset examples (eventually).
- 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
This computer downstairs is only a 4th gen i5 with 16GB of memory, but this is loading the settings card (card 2) in realtime.
-
- Posts: 106
- Joined: Thu Dec 22, 2022 9:40 am
- Location: North Lincolnshire
- Contact:
Re: Tactile Media / Skids Progress Gauge
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
S
Mostly using a Mac Studio M2 running MacOS Sonoma.
- 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
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: Right, that's enough interfering by me!

- OpenXTalkPaul
- Posts: 2633
- Joined: Sat Sep 11, 2021 4:19 pm
- Contact:
Re: Tactile Media / Skids Progress Gauge
Hey Nice!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
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.
-
- Posts: 106
- Joined: Thu Dec 22, 2022 9:40 am
- Location: North Lincolnshire
- Contact:
Re: Tactile Media / Skids Progress Gauge
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.That Scott Rossi guy really put out some nice UI tricks stacks!
S
Mostly using a Mac Studio M2 running MacOS Sonoma.
- OpenXTalkPaul
- Posts: 2633
- Joined: Sat Sep 11, 2021 4:19 pm
- Contact:
Re: Tactile Media / Skids Progress Gauge
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.
Who is online
Users browsing this forum: No registered users and 1 guest