移動先: 概要 戻り値 キーワード. 関連項目. フラグ. MEL 例.
hudButton [-allowOverlap boolean] [-block int] [-blockAlignment string] [-blockSize string] [-buttonShape string] [-buttonWidth int] [-label string] [-labelFontSize string] [-padding int] [-pressCommand script] [-releaseCommand script] [-section int] [-visible boolean]
hudButton は 「元に戻す」が不可能、「照会」が可能、「編集」が可能 です。
このコマンドは、3D ビューポート上にある 2D の非アクティブ オーバーレイ プレーンに配置されるヘッドアップ ディスプレイ(HUD)のボタン コントロールを作成します。このコマンドを使用して、ユーザ スクリプトで実際的な操作を指定できます。HUD ボタンは一般的な HUD オブジェクトから派生するため、同様のワークフローを継承します。 このコマンドの機能は headsUpDisplay コマンドによく似ていますが、layoutVisibility、nextFreeBlock、lastOccupiedBlock、exists、remove などの headsUpDisplay レイアウト コントロールは利用できません。レイアウト コントロールを利用する場合は、headsUpDisplay コマンドを使用してください。このコマンドは、HUD ボタン コントロールの作成と管理に特化しています。同様に、このコマンドで実行される操作はボタン コントロールになる HUD のみを対象としています。 作成時に必要なフラグは、section フラグと block フラグのみです。 headsUpDisplay コマンドと同様に、HUD ボタンを作成すると、ID 番号が割り当てられます。必要に応じて、この ID 番号を使用して headsUpDisplay コマンド(-rid/removeID [int IDNumber])で HUD を削除することができます。あるいは、HUD オブジェクトをそれらの位置(セクションとブロック)やそれぞれの固有名を使用して削除することもできます。int | ヘッドアップ ディスプレイ(HUD)の ID 番号。 |
string|int|int[2] | 対応する削除コマンドのヘッドアップ ディスプレイの名前、ID またはセクション、ブロック値。 |
戻り値の型は照会モードでは照会フラグが基になります。
ロング ネーム(ショート ネーム) | 引数型 | プロパティ | ||
---|---|---|---|---|
-visible(-vis)
|
boolean
|
![]() ![]() ![]() |
||
|
||||
-allowOverlap(-ao)
|
boolean
|
![]() ![]() ![]() |
||
|
||||
-section(-s)
|
int
|
![]() ![]() ![]() |
||
|
||||
-block(-b)
|
int
|
![]() ![]() ![]() |
||
|
||||
-blockSize(-bs)
|
string
|
![]() ![]() ![]() |
||
|
||||
-padding(-p)
|
int
|
![]() ![]() ![]() |
||
|
||||
-blockAlignment(-ba)
|
string
|
![]() ![]() ![]() |
||
|
||||
-label(-l)
|
string
|
![]() ![]() ![]() |
||
|
||||
-labelFontSize(-lfs)
|
string
|
![]() ![]() ![]() |
||
|
||||
-buttonWidth(-bw)
|
int
|
![]() ![]() ![]() |
||
|
||||
-buttonShape(-bsh)
|
string
|
![]() ![]() ![]() |
||
|
||||
-pressCommand(-pc)
|
script
|
![]() ![]() ![]() |
||
|
||||
-releaseCommand(-rc)
|
script
|
![]() ![]() ![]() |
||
|
![]() |
![]() |
![]() |
![]() |
// Define a "Hello!" counter procedure. This procedure will output // "Hello! [number]" // each time it is run. The number is incremented at the end of each call. // global int $gHelloCount = 0; global proc HUDButtonHello() { global int $gHelloCount; print("Hello! " + $gHelloCount + "\n"); $gHelloCount++; } // Now create our button. Only execute on mouse release. // hudButton -s 7 -b 5 -vis 1 -l "Button" -bw 80 -bsh "roundRectangle" -rc "HUDButtonHello()" HUDHelloButton;