MeterStyles メータースタイル

Meters can use option values from other meters. Using the MeterStyle option, one meter may inherit options from one or more "parent" sections.メーターは他のメーターのオプション値を使用できます。MeterStyleオプションを使用すると、1つのメーターが1つ以上の「親」セクションからオプションを継承できます。

Usage使用法

If an option is given on both the parent meter and the child meter, the child's setting overrides the parent's for that meter. If multiple parents are given, separated by pipes (|), options on later parents override those on earlier parents.親メーターと子メーターの両方にオプションが指定されている場合、子の設定はそのメーターの親の設定をオーバーライドします。pipe(|)で区切られた複数の親が与えられた場合、後の親のオプションは前の親のオプションをオーバーライドします。

Inherited options are used just as if they were explicitly written in the child meter. For example, if the #CURRENTSECTION# variable is used in an inherited option, it resolves as the name of the child meter, not the parent. Similarly, if a relative position is used, such as X=5R, the meter immediately previous to the child meter is used, not the parent's.継承されたオプションは、あたかも子メーターに明示的に書かれているかのように使用されます。たとえば、#CURRENTSECTION#変数が継承されたオプションで使用されている場合、それは親ではなく子メーターの名前として解決されます。同様に、親の位置でX=5Rなく、子位置の直前の位置が使用されるなど、相対位置が使用されている場合も同様です。

The only options that cannot be inherited are:継承できない唯一のオプションは次のとおりです。

  • Meter. The meter type must be explicitly set in order to identify a section as a meter.メーター。セクションをメーターとして識別するためには、メーターの種類を明示的に設定する必要があります。

  • MeterStyle itself. This means that MeterStyles cannot be inherited through more than one generation. In other words, meters cannot have "grandparents."MeterStyle自体。つまり、MeterStylesは複数の世代にわたって継承できません。言い換えれば、メーターは「祖父母」を持つことはできません。

MeterStyle SectionsMeterStyleセクション

Meters may inherit options from sections that are not meters. A skin section of any name1 that does not have the Meter or Measure option is treated as a MeterStyle. A MeterStyle section is completely ignored by Rainmeter unless it is referenced in the MeterStyle option of a meter. Options that are not valid for the child meter are also simply ignored, which means that the parent and child can be different types.メーターはメーターではないセクションからオプションを継承するかもしれません。or オプションを持たない任意の名前1のスキンセクションは、MeterStyleとして扱われます。MeterStyleセクションは、メーターのオプションで参照されていない限り、Rainmeterによって完全に無視されます。子メーターには無効なオプションも単純に無視されます。つまり、親と子は異なるタイプにすることができます。MeterMeasureMeterStyle

1. Aside from [Rainmeter] and [Variables], which are reserved for special purposes.1. 特別な目的のために予約されている[Rainmeter]と[Variables]は別として

Example

[MyFirstParent]
Meter=String
Text="I'm a parent!"
X=10
FontColor=255,0,0
FontFace=Segoe UI
FontSize=15
AntiAlias=1
StringStyle=Bold

[MySecondParent]
StringStyle=Italic
FontColor=0,255,0

[MyChild]
Meter=String
MeterStyle=MyFirstParent | MySecondParent
FontColor=0,0,255

MyChild inherits all options from the MyFirstParent meter and the MySecondParent MeterStyle. This means it is displayed with all of the same font, color, size and other options given for those sections. The second parent's StringStyle option overrides the first parent's, which means the child meter displays italic text. Likewise, the child meter's FontColor option overrides both parents', so the text displays with a color of 0,0,255 (blue).myChildはから全てのオプションを継承しMyFirstParentのメーターとMySecondParent MeterStyle。これは、それらが同じフォント、色、サイズ、およびそれらのセクションに与えられた他のオプションのすべてで表示されることを意味します。2番目の親のStringStyleオプションは最初の親のオプションをオーバーライドします。つまり、子メーターにはイタリック体のテキストが表示されます。同様に、子メーターのFontColorオプションは両方の親のオプションをオーバーライドするため、テキストは0,0,255(青)の色で表示されます。

関連記事

スポンサーリンク

ActionTimer plugin ActionTimerプラグイン

ホームページ製作・web系アプリ系の製作案件募集中です。

上に戻る