Meters メーター

A meter is an object that defines a visual element that is displayed in a skin. Meters are one of the two major kinds of objects in a skin, along with measures.メーターはで表示される視覚要素定義するオブジェクトであるスキンを。メーターは、測定値とともに、スキン内の2つの主要な種類のオブジェクトのうちの1つです。

Usage使用法

A meter does not have a "value" in the way that measures do. Some meters are used to display or respond to informational values in two ways:測定値のように、メーターには「値」はありません。いくつかのメーターは、2つの方法で情報値を表示または応答するために使用されます。

  • A meter can be bound to a measure. In this way, the meter will automatically display the value in a way that is appropriate for the type of meter. For example, a string meter would display the string value of a measure as a block of text, while a bar meter would display the same measure's number value as a percentage of its maximum value. Some meter types must be bound to a specific measure; on others, binding is optional.メーターはメジャーにバインドできます。このように、メーターはメーターの種類に適した方法で自動的に値を表示します。たとえば、文字列メーターは小節の文字列値をテキストのブロックとして表示しますが、バーメーターは同じ小節の数値を最大値のパーセンテージとして表示します。一部のメータータイプは特定の数値データにバインドする必要があります。他のものでは、バインディングはオプションです。

  • A meter can use variables in any option. This includes section variables, which provide an alternative way of using measure values. Dynamic variables are allowed in all options on all meters (other than the Meter option).メーターは任意のオプションで変数を使用できます。これには、測定値を使用する別の方法を提供するセクション変数が含まれています。動的変数は、(Meterオプション以外の)すべてのメーターのすべてのオプションで使用できます。

Not all meters are used to display information. Some are used to create static elements, such as background images, frames and labels. Specific options and requirements for each meter type are detailed in their individual articles.すべてのメーターが情報の表示に使用されているわけではありません。背景画像、フレーム、ラベルなどの静的要素を作成するために使用されるものもあります。各メータータイプの特定のオプションと要件は、それぞれの記事に詳述されています。

Formatフォーマット

A meter is written as a section in the skin. All meters use the Meter option to define the section as a specific type of meter. Most other meter options depend on the type, but there are some general options that are valid in many or all meters.メーターはスキンの部分として書かれています。すべてのメーターは、Meterセクションを特定のタイプのメーターとして定義するためのオプションを使用します。他のほとんどのメーターオプションはその種類によって異なりますが、多くのメーターまたはすべてのメーターで有効な一般的なオプションがいくつかあります

Below is an example of a complete working meter:下記は完成した作業メーターの例です。

[MyMeter]
Meter=String
Text=Hello, world!

Positionsポジション

A meter has a certain position, which is given by its X and Y options, and dimensions, which are given by its W and H options. This means that every meter is actually bounded by a rectangular block of pixels, even though it may have a transparent background and therefore appear to be "free-floating."メーターには、XとYのオプションで指定される特定の位置とWとHのオプションで指定される寸法があります。これは、透明な背景があり、したがって「自由に動く」ように見える場合でも、すべてのメーターが実際には長方形のピクセルブロックで囲まれていることを意味します。

Meters are positioned within the skin window. This means that when the skin is moved, its meters move with it. It also means that meter positions are given relative to the top-left corner of the skin, rather than the desktop. For example, a meter with the option X=15 starts 15 pixels from the left edge of the skin.メーターはスキンウィンドウ内に配置されます。つまり、スキンを動かすと、メーターも一緒に動きます。また、メーターの位置はデスクトップではなく、スキンの左上隅を基準にして指定されています。たとえば、オプション付きのメーターX=15は、スキンの左端から15ピクセルの位置から始まります。

The dimensions of the skin window are determined by the positions and dimensions of all meters when the skin is loaded. If the skin has DynamicWindowSize enabled, the window will be "pushed" outward if meters are moved rightward or downward or expand in width or height. However, meters that move leftward beyond X=0, or upward beyond Y=0, will appear either "cut off" or completely invisible. There is no technical limit to the size of the skin window, but, practically speaking, skins should be made to fit within the current desktop work area.寸法スキンウィンドウはスキンがロードされると、すべての計器の位置および寸法によって決定されます。スキンでDynamicWindowSizeが有効になっている場合、メーターが右または下に移動するか幅または高さが拡大すると、ウィンドウは外側に「プッシュ」されます。しかし、左方向にX=0、または上方向に移動するメーターはY=0、「カットオフ」またはまったく見えないように見えます。スキンウィンドウのサイズに技術的な制限はありませんが、実際には、スキンは現在のデスクトップの作業領域内に収まるようにする必要があります

Left: a skin with a single meter that appears to be "free-floating." Right: the same skin with colored backgrounds added, showing how the meter (purple) is actually positioned inside the skin window (green) and "pushes" the window boundaries to the lower-right.左: "自由に浮遊する"ように見える単一のメーターを持つスキン。右:色付きの背景が追加された同じスキン。メーター(紫)がスキンウィンドウ(緑)の内側に実際に配置され、ウィンドウ境界を右下に「プッシュ」する方法を示します。

Order注文

The order of meters in the skin code is important in two ways:スキンコード内のメーターの順序は、2つの点で重要です。

  • "Z" position. Meters are drawn in order. Later meters appear "on top of" or "in front of" earlier meters. This means that, for example, a background image that appears behind all other meters must be the first meter that appears in the skin code.「Z」位置 メーターは順番に描かれています。後のメーターは、前のメーターの「上」または「前」に表示されます。つまり、たとえば、他のすべてのメーターの後ろに表示される背景画像は、スキンコードの最初に表示されるメーターにする必要があります。

  • Relative positions. A meter's X or Y position may be set "relative" to the position of the previous meter. This is useful for groups of meters that follow a common pattern, such as lists, tabs or menu items.相対位置 メータXまたは位置は、前のメータの位置に対して「相対的」Y設定することができる。これは、リスト、タブ、メニュー項目など、共通のパターンに従うメーターのグループに役立ちます。

MeterStylesメータースタイル

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

For more, see MeterStyles.詳しくは、MeterStylesを参照してください。

関連記事

スポンサーリンク

WordPressのインストール

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

上に戻る