Basically, what I suggest is inverse #CURRENTSECTION#. The difference is this:
With #CURRENTSECTION# you can do such thing as placing or taking value based on another meter (or measure) like this:
Code: Select all
[MeterBatteryName]
Meter=String
X=10
Y=10
Text=Battery:
[MeterBattery]
Meter=String
MeasureName=MeasureBattery
X=([#CURRENTSECTION#Name:X]+30)
Y=([#CURRENTSECTION#Name:Y]+0)
Text=%1
With #CURRENTROOTSECTION# it will be possible.
I imagine the root name will be separated with pipe sign | and #CURRENTROOTSECTION# will look for a name that is before the pipe sign.
Example:
Code: Select all
[MeterBattery]
Meter=String
X=10
Y=10
Text=Battery:
[MeterBattery|Value]
Meter=String
MeasureName=MeasureBattery
X=([#CURRENTROOTSECTION#:X]+30)
Y=([#CURRENTROOTSECTION#:Y]+0)
Text=%1
Code: Select all
[MeterBattery]
Meter=String
X=10
Y=10
Text=Battery:
[MeterBattery|Value]
Meter=String
MeasureName=MeasureBattery
X=([#CURRENTROOTSECTION#:X]+30)
Y=([#CURRENTROOTSECTION#:Y]+0)
Text=%1
[MeterBattery|Bar]
Meter=Bar
X=([#CURRENTROOTSECTION#:X]+0)
Y=([#CURRENTROOTSECTION#:Y]+10)
Code: Select all
[MeterBattery]
Meter=String
X=10
Y=10
Text=Battery:
[MeterBattery|Value]
Meter=String
MeasureName=MeasureBattery
X=([#CURRENTROOTSECTION#:X]+30)
Y=([#CURRENTROOTSECTION#:Y]+0)
Text=%1
[MeterBattery|Bar]
Meter=Bar
X=([#CURRENTROOTSECTION#:X]+0)
Y=([#CURRENTROOTSECTION#:Y]+10)
[MeterCPU]
Meter=String
X=10
Y=30
Text=Battery:
[MeterCPU|Value]
Meter=String
MeasureName=MeasureBattery
X=([#CURRENTROOTSECTION#:X]+30)
Y=([#CURRENTROOTSECTION#:Y]+0)
Text=%1
[MeterCPU|Bar]
Meter=Bar
X=([#CURRENTROOTSECTION#:X]+0)
Y=([#CURRENTROOTSECTION#:Y]+10)
You see the pattern? Let's simplify it:
Code: Select all
[StyleValue]
X=([#CURRENTROOTSECTION#:X]+30)
Y=([#CURRENTROOTSECTION#:Y]+0)
[StyleBar]
X=([#CURRENTROOTSECTION#:X]+0)
Y=([#CURRENTROOTSECTION#:Y]+10)
[MeterBattery]
Meter=String
X=10
Y=10
Text=Battery:
[MeterBattery|Value]
Meter=String
MeasureName=MeasureBattery
MeterStyle=StyleValue
Text=%1
[MeterBattery|Bar]
Meter=Bar
MeterStyle=StyleBar
[MeterCPU]
Meter=String
X=10
Y=30
Text=Battery:
[MeterCPU|Value]
Meter=String
MeasureName=MeasureBattery
MeterStyle=StyleValue
Text=%1
[MeterCPU|Bar]
Meter=Bar
MeterStyle=StyleBar
[HR]
A bit more advanced but real life example.
Imagine this case.
You have a system skin which shows all the system information like CPU, RAM, Battery, Video memory, Cores, etc. For every category of information the construction is pretty repetitive:
- image meter = a base/container where all the elements will be placed (can be invisible if you use one background image for the whole skin)
- string meter - title (CPU, RAM, Battery, etc)
- string meter - value x%
- bar meter - visual representation of how full it is
- image meter= visual representation of a category like a small cpu icon
Code: Select all
[CPUMeasure]
Measure=CPU
[CPU]
;Canvas/Background for just one group of elements to be placed within
Meter=Image
X=10
Y=10
W=150
H=80
[CPUIcon]
Meter=Image
X=([CPU:X]+10)
Y=([CPU:Y]+15)
W=24
H=24
[CPUTitle]
Meter=String
X=([CPU:X]+35)
Y=([CPU:Y]+10)
Text=CPU
[CPUValue]
Meter=String
MeasureName=CPUMeasure
X=([CPU:X]+[CPU:W]-15)
StringAlign=Right
Text=%1 %
[CPUBar]
Meter=Bar
X=([CPU:X]+15)
Y=([CPU:Y]+[CPU:H]-[#CURRENTSECTION#:H])
W=([CPU:W]-([#CURRENTSECTION#:X]*2))
H=3
[RAMMeasure]
Measure=RAM
[RAM]
;Canvas/Background for just one group of elements to be placed within
Meter=Image
X=10
Y=90
W=150
H=80
[RAMIcon]
Meter=Image
X=([RAM:X]+10)
Y=([RAM:Y]+15)
W=24
H=24
[RAMTitle]
Meter=String
X=([RAM:X]+35)
Y=([RAM:Y]+10)
Text=CPU
[RAMValue]
Meter=String
MeasureName=CPUMeasure
X=([RAM:X]+[RAM:W]-15)
StringAlign=Right
Text=%1 %
[RAMBar]
Meter=Bar
X=([RAM:X]+15)
Y=([RAM:Y]+[RAM:H]-[#CURRENTSECTION#:H])
W=([RAM:W]-([#CURRENTSECTION#:X]*2))
H=3
AFTER:
Code: Select all
;--- METERSTYLES
[StyleRoot]
X=10
W=150
H=80
[StyleIcon]
X=([#CURRENTROOTSECTION#:X]+10)
Y=([#CURRENTROOTSECTION#:Y]+15)
W=24
H=24
[StyleTitle]
X=([#CURRENTROOTSECTION#:X]+35)
Y=([#CURRENTROOTSECTION#:Y]+10)
[StyleValue]
MeasureName=#CURRENTROOTSECTION#|Measure
X=([#CURRENTROOTSECTION#:X]+[#CURRENTROOTSECTION#:W]-15)
StringAlign=Right
Text=%1 %
[StyleBar]
X=([#CURRENTROOTSECTION#:X]+15)
Y=([#CURRENTROOTSECTION#:Y]+[#CURRENTROOTSECTION#:H]-[#CURRENTSECTION#:H])
W=([#CURRENTROOTSECTION#:W]-([#CURRENTSECTION#:X]*2))
H=3
;---METERS
;CPU
[CPU|Measure]
Measure=CPU
[CPU]
Meter=Image
MeterStyle=StyleRoot
Y=10
[CPU|Icon]
Meter=Image
MeterStyle=StyleIcon
[CPU|Title]
Meter=String
MeterStyle=StyleTitle
Text=CPU
[CPU|Value]
Meter=String
MeterStyle=StyleValue
[CPU|Bar]
Meter=Bar
MeterStyle=StyleBar
;RAM
[RAM|Measure]
Measure=RAM
[RAM]
Meter=Image
MeterStyle=StyleRoot
Y=40
[RAM|Icon]
Meter=Image
MeterStyle=StyleIcon
[RAM|Title]
Meter=String
MeterStyle=StyleTitle
Text=RAM
[RAM|Value]
Meter=String
MeterStyle=StyleValue
[RAM|Bar]
Meter=Bar
MeterStyle=StyleBar