It is currently September 29th, 2024, 7:36 am

Global Setting For Displayed Text

General topics related to Rainmeter.
User avatar
MourningStar
Posts: 300
Joined: June 12th, 2016, 2:40 am

Global Setting For Displayed Text

Post by MourningStar »

The following line give me shadow text :

StringEffect=SHADOW

1. Instead of having to place this in multiple locations of a skin, can I tell it simply shadow every instance of displayed text (global setting)? - thx
User avatar
balala
Rainmeter Sage
Posts: 16602
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Global Setting For Displayed Text

Post by balala »

Yes, you can. You'll have to use the MeterStyle. So, create the following section:

Code: Select all

[MyMeterStyle]
StringEffect=SHADOW
Then add to each string meter the MeterStyle=MyMeterStyle option. Obviously, you can use not just the StringEffect option, but any one (like FontFace, FontSize, StringStyle, StringAlign, etc). Especially if you have more options, this will save a lot of lines.
User avatar
MourningStar
Posts: 300
Joined: June 12th, 2016, 2:40 am

Re: Global Setting For Displayed Text

Post by MourningStar »

I am confused. I entered the text provided, immediately after a line in the skin's .inc file thus :

:-----------------------Text------------------------
[MyMeterStyle]
StringEffect=SHADOW


... and there is no change.
User avatar
balala
Rainmeter Sage
Posts: 16602
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Global Setting For Displayed Text

Post by balala »

MourningStar wrote:I am confused. I entered the text provided, immediately after a line in the skin's .inc file thus :

:-----------------------Text------------------------
[MyMeterStyle]
StringEffect=SHADOW


... and there is no change.
There don't even can be, because that's not enough, you'll also have to add to each string meter where you want to use the shadow, a MeterStyle=MyMeterStyle option. Eg the following meter will have shadow:

Code: Select all

[MeterString]
Meter=STRING
MeterStyle=MyMeterStyle
X=0
Y=0
Padding=15,5,15,5
FontColor=220,220,220
FontEffectColor=0,0,0
FontSize=10
FontFace=Calibri
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=Anything
But if you move the FontFace=Calibri option from the [MeterString] meter, to the [MyMeterStyle] section, both options will be used by the [MeterString] meter:

Code: Select all

[MyMeterStyle]
StringEffect=SHADOW
FontFace=Calibri

[MeterString]
Meter=STRING
MeterStyle=MyMeterStyle
X=0
Y=0
Padding=15,5,15,5
FontColor=220,220,220
FontEffectColor=0,0,0
FontSize=10
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=Anything
Adding the MeterStyle=MyMeterStyle option to each string meter, will make them to use the StringEffect and FontFace options.
Also be careful, in Rainmeter commenting out an option can be done with semicolon (;), not with colon (:).
User avatar
MourningStar
Posts: 300
Joined: June 12th, 2016, 2:40 am

Re: Global Setting For Displayed Text

Post by MourningStar »

OK - sorry for my not being understood. I was asking for 'Global Setting'. To me this means a ONE-time entry that will apply to ALL of skin's displayed text.
User avatar
balala
Rainmeter Sage
Posts: 16602
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Global Setting For Displayed Text

Post by balala »

By default, without adding anything to the meters? I don't think.
User avatar
jsmorley
Developer
Posts: 22783
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Global Setting For Displayed Text

Post by jsmorley »

MourningStar wrote:OK - sorry for my not being understood. I was asking for 'Global Setting'. To me this means a ONE-time entry that will apply to ALL of skin's displayed text.
No, there is not.
User avatar
MourningStar
Posts: 300
Joined: June 12th, 2016, 2:40 am

Re: Global Setting For Displayed Text

Post by MourningStar »

thank you balala & jsmorley.