It is currently April 26th, 2024, 2:51 pm

Fully Customizable Icon Meters

Get help with creating, editing & fixing problems with skins
User avatar
kami
Posts: 39
Joined: July 3rd, 2010, 10:47 am
Location: Canosa di Puglia, Italy

Fully Customizable Icon Meters

Post by kami »

I ever tried to change some rainmeter codes and i've done it succesfully. But when i tried for the first time to follow the complete guide to make my first own config.ini file, many things haven't worked.

My purpose is to create a simple fully customizable icon with certain features in the source code.
sample icon is this:
Image
I want the ini code to do several things:
possibility to rotate the icon;
possibility to flip the icon;
possibility to change icon dimensions preserving aspect ratio;
possibility to colorize the icon in any color
possibility to execute a mouse action
possibility to display a custom text within the label area (the text must rotate as much as the icon eventually does so it remains precisely within the label even if you rotate the icon)

and i would also make an effect on mouse over (with the possibility to activate it and deactivate it in the ini file):
icons must be normally greyscaled and when you pass over it with mouse they gradually colorize to their real color.

Now i tried to work on all my objectives and i created this ini code

Code: Select all

[Rainmeter]
Author=My Name

[Badge Icon]
Meter=IMAGE
ImageName=Colors\Red.png
PreserveAspectRatio=1
W=256
LeftMouseUpAction=action
I followed the guide and i was successful in creating the possibility to change icon dimensions preserving the aspect ratio and to easily set a mouse action. I had difficulties on rotating the image and colorizing it.
There is an example about ImageTint parameter in the guide; well i tried to write the same thing in my ini code and it didn't worked. Is the example wrong?
I wrote under the LeftMouseUpAction line, these lines

Code: Select all

GreyScale=1
ImageTint=255,128,64,255
i thought these parameters could make my icon orange but when i refreshed it didn't worked.
Rotation function also doesn't work, i tried to insert the ImageRotate parameter and so the same thing with ImageFlip parameter. These parameters correspond to Image Meters, why they don't work when i use them?

The only things i'm not able to do are the possibility to create the custom text (which rotates as much as the label does) and the creation of the mouse-over effect i explained upper.
Maybe many things i wrote are ridiculous because i am a total noob at programming in Rainmeter but i want to understand why the code works partially. I want to learn how to solve these problems so i won't have any in future.

(sorry for my bad english)
User avatar
jsmorley
Developer
Posts: 22630
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Fully Customizable Icon Meters

Post by jsmorley »

Not sure what you have going on. I cropped your image a bit so it didn't have so much dead space around it, and saved it as "TestImage.png" in the skin folder with this code:

Code: Select all

[Rainmeter]
BackgroundMode=2
SolidColor=0,0,0,200

[MeterDefault]
Meter=IMAGE
ImageName=TestImage.png
X=0
Y=0
LeftMouseUpAction=!Execute ["Notepad.exe"]

[MeterShrink]
Meter=IMAGE
ImageName=TestImage.png
X=0
Y=10R
W=128
AntiAlias=1
PreserveAspectRatio=1

[MeterFlip]
Meter=IMAGE
ImageName=TestImage.png
X=0
Y=10R
ImageFlip=Horizontal

[MeterTint]
Meter=IMAGE
ImageName=TestImage.png
X=0
Y=10R
GreyScale=1
ImageTint=255,128,64,255

[MeterAll]
Meter=IMAGE
ImageName=TestImage.png
X=0
Y=10R
W=128
AntiAlias=1
PreserveAspectRatio=1
ImageFlip=Horizontal
GreyScale=1
ImageTint=255,128,64,255
Worked just fine for me. Take a look at what I did, and see if maybe you missed something.
TestImage.png
7-10-2010 8-32-43 AM.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
kami
Posts: 39
Joined: July 3rd, 2010, 10:47 am
Location: Canosa di Puglia, Italy

Re: Fully Customizable Icon Meters

Post by kami »

I tried to use your code but the result on my PC is this:

Image

Why?
User avatar
kami
Posts: 39
Joined: July 3rd, 2010, 10:47 am
Location: Canosa di Puglia, Italy

Re: Fully Customizable Icon Meters

Post by kami »

It works now!
I had the 1.1 version of Rainmeter and it didn't work with that one.
I did the update and now it's all working! Thank you very much!