It is currently October 24th, 2020, 6:52 am

Border round slide image

Help with creating, editing & fixing problems with skins
Mascott
Posts: 10
Joined: September 5th, 2016, 4:36 pm

Border round slide image

Post by Mascott »

Hi all,
Bin trying to get my head round the action timer and using it to create a meter that slides to show a bigger meter, have got that part working with the help of js morleys sample skins but for the life of me cant get the border to show on my image all the way round when i click on it, is there something i am missing or can you not use a png image with a border round it? Here my code i am using

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
SkinWidth=280
SkinHeight=140

[Metadata]
Name=SlideDemo\SimpleToDown
Author=JSMorley
Version=May 11, 2016
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
Information=Demonstration of using ActionTimer to slide out a panel

[Variables]
OffSet=-40
State=1
U=[!UpdateMeasure MeasureSlider][!UpdateMeter *][!Redraw]

; Slider Measure

[MeasureSlider]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Repeat SlideDown, 2, 4
SlideDown=[!SetVariable State "2"][!SetVariable OffSet "(Clamp(#OffSet#+10,-40,0))"]#U#
ActionList2=Repeat SlideUp, 2, 4
SlideUp=[!SetVariable State "1"][!SetVariable OffSet "(Clamp(#OffSet#-10,-40,0))"]#U#
DynamicVariables=1

; Meters

[MeterBack]
Meter=Image
ImagePath=#@#Images\
ImageName=8mmborder.png
X=0
Y=#offset#
W=280
H=140
DynamicVariables=1
LeftMouseUpAction=[!CommandMeasure MeasureSlider "Execute #State#"]
Have also attached the rmskin package to show what i mean
Thanks in advance for any help
You do not have the required permissions to view the files attached to this post.
User avatar
CodeCode
Posts: 111
Joined: September 7th, 2020, 2:24 pm

Re: Border round slide image

Post by CodeCode »

Try setting this into the Image Meter:

Code: Select all

SolidColor=0,0,0,1
Can't fix it if it ain't broke - unless it is in code.
User avatar
balala
Rainmeter Sage
Posts: 11595
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Border round slide image

Post by balala »

Mascott wrote: October 12th, 2020, 10:35 pm Bin trying to get my head round the action timer and using it to create a meter that slides to show a bigger meter, have got that part working with the help of js morleys sample skins but for the life of me cant get the border to show on my image all the way round when i click on it, is there something i am missing or can you not use a png image with a border round it? Here my code i am using
To be honest I don't follow. The used image (8mmborder.png) from the beginning has a border. Do you need another border as well? If you do, a Shape meter could probably help. But first confirm please if you indeed need a (second) border on the image.
Mascott
Posts: 10
Joined: September 5th, 2016, 4:36 pm

Re: Border round slide image

Post by Mascott »

balala wrote: October 13th, 2020, 10:45 am To be honest I don't follow. The used image (8mmborder.png) from the beginning has a border. Do you need another border as well? If you do, a Shape meter could probably help. But first confirm please if you indeed need a (second) border on the image.
Hi,
The problem i have is at the beginning the image dose not show the top of the border untill you click on it and it slides down then i have the border all the way round the image, basically i want the border to show all the time, slide down and slide up same image with border on four sides.
User avatar
balala
Rainmeter Sage
Posts: 11595
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Border round slide image

Post by balala »

Mascott wrote: October 13th, 2020, 1:33 pm The problem i have is at the beginning the image dose not show the top of the border untill you click on it and it slides down then i have the border all the way round the image, basically i want the border to show all the time, slide down and slide up same image with border on four sides.
I don't say it's impossible, but for sure it's not easy at all, because you have to divide the image and work distinctly with the two sides. Unfortunately I have no enough time to work now with it, but a little bit later I'll try to get it working will come back with a solution (I hope). At least if in meantime someone else won't post a code before me.
Mascott
Posts: 10
Joined: September 5th, 2016, 4:36 pm

Re: Border round slide image

Post by Mascott »

balala wrote: October 13th, 2020, 2:03 pm I don't say it's impossible, but for sure it's not easy at all, because you have to divide the image and work distinctly with the two sides. Unfortunately I have no enough time to work now with it, but a little bit later I'll try to get it working will come back with a solution (I hope). At least if in meantime someone else won't post a code before me.
Would be very grateful for any help you give :-)
User avatar
balala
Rainmeter Sage
Posts: 11595
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Border round slide image

Post by balala »

Mascott wrote: October 13th, 2020, 2:10 pm Would be very grateful for any help you give :-)
Ok, hopfully will be back in a few hours with a solution.
User avatar
balala
Rainmeter Sage
Posts: 11595
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Border round slide image

Post by balala »

balala wrote: October 13th, 2020, 2:24 pm Ok, hopfully will be back in a few hours with a solution.
And here is the solution: just add to the end of the code the following meter:

Code: Select all

[MeterImage]
Meter=Image
ImagePath=#@#Images\
ImageName=8mmborder.png
X=0
Y=0
W=280
ImageCrop=0,0,516,124
Take care to place this meter AFTER [MeterBack].
User avatar
CodeCode
Posts: 111
Joined: September 7th, 2020, 2:24 pm

Re: Border round slide image

Post by CodeCode »

balala wrote: October 13th, 2020, 7:07 pm ...
Take care to place this meter AFTER [MeterBack].
Yes, this important. The first lines of code such as image meters or shapes will appear 'behind' the last lines of code - reading top to bottom of course.

This is not exactly a caveat, but another way of managing special or custom features in the skin or set of skins that are interrelated. :welcome:
Can't fix it if it ain't broke - unless it is in code.
Mascott
Posts: 10
Joined: September 5th, 2016, 4:36 pm

Re: Border round slide image

Post by Mascott »

balala wrote: October 13th, 2020, 7:07 pm And here is the solution: just add to the end of the code the following meter:

Code: Select all

[MeterImage]
Meter=Image
ImagePath=#@#Images\
ImageName=8mmborder.png
X=0
Y=0
W=280
ImageCrop=0,0,516,124
Take care to place this meter AFTER [MeterBack]
Thank you very much for your help, works perfectly now 👍 😃