skin .ini:
Code: Select all
[Rainmeter]
Author=XANCI
[Variables]
CenterX=150
CenterY=150
Radius=100
Tag1=Tag1
Tag2=Tag2
Tag3=Tag3
Tag4=Tag4
Tag5=Tag5
Tag6=Tag6
Color1=FF0000
Color2=FFFF00
Color3=00FF00
Color4=00FFFF
Color5=0000FF
Color6=FF00FF
[MeasureScript]
Measure=Script
ScriptFile="#CURRENTPATH#Radar.lua"
[MeasureCalc1]
Measure=Calc
Formula=0.4
DynamicVariables=1
[MeasureCalc2]
Measure=Calc
Formula=0.7
DynamicVariables=1
[MeasureCalc3]
Measure=Calc
Formula=0.5
DynamicVariables=1
[MeasureCalc4]
Measure=Calc
Formula=0.8
DynamicVariables=1
[MeasureCalc5]
Measure=Calc
Formula=0.9
DynamicVariables=1
[MeasureCalc6]
Measure=Calc
Formula=0.8
DynamicVariables=1
[MeterB]
Meter=IMAGE
W=300
H=300
SolidColor=00000060
[MeterR1]
Meter=IMAGE
X=#CenterX#
Y=(#CenterY#-1)
W=#Radius#
H=2
SolidColor=FFFFFF
AntiAlias=1
[MeterR2]
Meter=IMAGE
X=#CenterX#
Y=(#CenterY#-1)
W=#Radius#
H=2
SolidColor=FFFFFF
AntiAlias=1
[MeterR3]
Meter=IMAGE
X=#CenterX#
Y=(#CenterY#-1)
W=#Radius#
H=2
SolidColor=FFFFFF
AntiAlias=1
[MeterR4]
Meter=IMAGE
X=#CenterX#
Y=(#CenterY#-1)
W=#Radius#
H=2
SolidColor=FFFFFF
AntiAlias=1
[MeterR5]
Meter=IMAGE
X=#CenterX#
Y=(#CenterY#-1)
W=#Radius#
H=2
SolidColor=FFFFFF
AntiAlias=1
[MeterR6]
Meter=IMAGE
X=#CenterX#
Y=(#CenterY#-1)
W=#Radius#
H=2
SolidColor=FFFFFF
AntiAlias=1
[MeterL1]
Meter=IMAGE
W=1
H=2
SolidColor=#Color1#
AntiAlias=1
[MeterL2]
Meter=IMAGE
W=1
H=2
SolidColor=#Color2#
AntiAlias=1
[MeterL3]
Meter=IMAGE
W=1
H=2
SolidColor=#Color3#
AntiAlias=1
[MeterL4]
Meter=IMAGE
W=1
H=2
SolidColor=#Color4#
AntiAlias=1
[MeterL5]
Meter=IMAGE
W=1
H=2
SolidColor=#Color5#
AntiAlias=1
[MeterL6]
Meter=IMAGE
W=1
H=2
SolidColor=#Color6#
AntiAlias=1
[MeterT1]
Meter=STRING
X=255
Y=145
FontColor=FFFFFF
FontSize=8
StringStyle=BOLD
Text="#Tag1#"
AntiAlias=1
[MeterT2]
Meter=STRING
X=200
Y=50
FontColor=FFFFFF
FontSize=8
StringStyle=BOLD
StringAlign=CENTER
Text="#Tag2#"
AntiAlias=1
[MeterT3]
Meter=STRING
X=100
Y=50
FontColor=FFFFFF
FontSize=8
StringStyle=BOLD
StringAlign=CENTER
Text="#Tag3#"
AntiAlias=1
[MeterT4]
Meter=STRING
X=45
Y=145
FontColor=FFFFFF
FontSize=8
StringStyle=BOLD
StringAlign=RIGHT
Text="#Tag4#"
AntiAlias=1
[MeterT5]
Meter=STRING
X=100
Y=240
FontColor=FFFFFF
FontSize=8
StringStyle=BOLD
StringAlign=CENTER
Text="#Tag5#"
AntiAlias=1
[MeterT6]
Meter=STRING
X=200
Y=240
FontColor=FFFFFF
FontSize=8
StringStyle=BOLD
StringAlign=CENTER
Text="#Tag6#"
AntiAlias=1
Code: Select all
function Initialize()
iCX=tonumber(SKIN:GetVariable("CenterX"))
iCY=tonumber(SKIN:GetVariable("CenterY"))
iR=tonumber(SKIN:GetVariable("Radius"))
msC={}
iC={}
iRA={}
iX={}
iY={}
iW={}
iA={}
for i=1,6 do
msC[i]=SKIN:GetMeasure("MeasureCalc"..i)
iRA[i]=(i-1)*math.pi/3
SKIN:Bang("!SetOption MeterR"..i.." TransformationMatrix "..math.cos(iRA[i])..";"..-math.sin(iRA[i])..";"..math.sin(iRA[i])..";"..math.cos(iRA[i])..";"..iCX*(1-math.cos(iRA[i]))-iCY*math.sin(iRA[i])..";"..iCY*(1-math.cos(iRA[i]))+iCX*math.sin(iRA[i]))
end
end
function Update()
for i=1,6 do
iC[i]=msC[i]:GetValue()
iX[i]=iCX+iC[i]*iR*math.cos(iRA[i])
iY[i]=iCY-iC[i]*iR*math.sin(iRA[i])
end
for i=1,6 do
iW[i]=((iX[i%6+1]-iX[i])^2+(iY[i%6+1]-iY[i])^2)^0.5
if (iX[i%6+1]-iX[i])<0 then
iA[i]=math.atan((iY[i]-iY[i%6+1])/(iX[i%6+1]-iX[i]))+math.pi
else
iA[i]=math.atan((iY[i]-iY[i%6+1])/(iX[i%6+1]-iX[i]))
end
SKIN:Bang("!MoveMeter "..iX[i].." "..iY[i].." MeterL"..i)
SKIN:Bang("!SetOption MeterL"..i.." W "..iW[i])
SKIN:Bang("!SetOption MeterL"..i.." TransformationMatrix "..math.cos(iA[i])..";"..-math.sin(iA[i])..";"..math.sin(iA[i])..";"..math.cos(iA[i])..";"..iX[i]*(1-math.cos(iA[i]))-iY[i]*math.sin(iA[i])..";"..iY[i]*(1-math.cos(iA[i]))+iX[i]*math.sin(iA[i]))
end
end
1.Add your own measures and use "MeasureCalc1"-"MeasureCalc6" to process them to values range 0.0-1.0
2.Change your chart's position, size, tags, colors in [Variables]
3.If you are good at LUA and math, you can even change the number of parameters and angles between each two parameters