currentDisplayAttrs (EGL システム変数)

consoleLib.currentDisplayAttrs システム変数を使用すると、変数の設定後、次に表示されるテキストの表示特性を指定することができます。 テキストが表示された後、指定された属性はそれぞれの前の値に戻ります。

consoleLib.currentDisplayAttrs 変数は、consoleLib のさまざまな "display" 関数 (consoleLib.displayAtLine()consoleLib.displayAtPosition() など) で動作します。

consoleLib.currentDisplayAttrs 変数に以下のプロパティーを設定できます。 詳しくは、それぞれのプロパティーのトピックを参照してください。

型: PresentationAttributes

ドット構文を使用してプロパティーを設定できます。
consoleLib.currentDisplayAttrs.color = red;
consoleLib.currentDisplayAttrs.highlight=[underline];
あるいは、値の設定ブロックを使用して、単一の文にすべてのプロパティーを設定することもできます。
consoleLib.currentDisplayAttrs {color = red, highlight=[underline]};
指定される属性は、次の「display」関数を通じてのみ維持されます。 以下のコードでは、最初のテキスト色は赤であり、2 番目はウィンドウのデフォルト・カラー (ここでは、白と仮定) です。
consoleLib.currentDisplayAttrs {color=red};
consoleLib.displayAtPosition("Red text",4,5);
consoleLib.displayAtPosition("White text", 5,5);

フィードバック