「App:Library:Squareline:docs:docs:events」の版間の差分
提供: robot-jp wiki
ナビゲーションに移動検索に移動(同じ利用者による、間の3版が非表示) | |||
15行目: | 15行目: | ||
Firstly, you should name the event, then choose a trigger to start it. | Firstly, you should name the event, then choose a trigger to start it. | ||
− | * Event name - The name of the event | + | * '''Event name''' - The name of the event |
− | * Event Trigger - The interaction of event start | + | * '''Event Trigger''' - The interaction of event start |
− | ** Pressed - An object has been pressed | + | ** '''Pressed''' - An object has been pressed |
− | ** Clicked - An object was pressed for a short period of time, then released. Not called if scrolled | + | ** '''Clicked''' - An object was pressed for a short period of time, then released. Not called if scrolled |
− | ** Long pressed - An object has been pressed for a longer period of time | + | ** '''Long pressed''' - An object has been pressed for a longer period of time |
− | ** Long pressed repeat - Called after <code>long_press_time</code> in every <code>long_press_repeat_time</code> ms. Not called if scrolled | + | ** '''Long pressed repeat''' - Called after <code>long_press_time</code> in every <code>long_press_repeat_time</code> ms. Not called if scrolled |
− | ** Focused - An object is focused | + | ** '''Focused''' - An object is focused |
− | ** Defocused - An object is unfocused | + | ** '''Defocused''' - An object is unfocused |
− | ** Value changed - The value of the object has been changed. | + | ** '''Value changed''' - The value of the object has been changed. |
− | ** Ready - A process has finished | + | ** '''Ready''' - A process has finished |
− | ** Cancel - A process has been cancelled | + | ** '''Cancel''' - A process has been cancelled |
− | ** Screen loaded - A screen was loaded, called when all animations are finished | + | ** '''Screen loaded''' - A screen was loaded, called when all animations are finished |
− | ** Screen unloaded - A screen was unloaded, called when all animations are finished | + | ** '''Screen unloaded''' - A screen was unloaded, called when all animations are finished |
− | ** Screen load start - A screen load started, fired when the screen change delay is expired | + | ** '''Screen load start''' - A screen load started, fired when the screen change delay is expired |
− | ** Screen unload start - A screen unload started, fired immediately when lv_scr_load/lv_scr_load_anim is called | + | ** '''Screen unload start''' - A screen unload started, fired immediately when lv_scr_load/lv_scr_load_anim is called |
|'''<u>[[App:Library:Squareline:docs:dev env:inspector|インスペクタ]]</u>'''パネルの下部に、'''ADD EVENT'''ボタンがあります。 | |'''<u>[[App:Library:Squareline:docs:dev env:inspector|インスペクタ]]</u>'''パネルの下部に、'''ADD EVENT'''ボタンがあります。 | ||
まず、イベントに名前を付け、それを開始するトリガーを選択します。 | まず、イベントに名前を付け、それを開始するトリガーを選択します。 | ||
− | * イベント名 - イベントの名前 | + | * '''イベント名''' - イベントの名前 |
− | * イベントトリガー - イベントを開始するためのインタラクションです。 | + | * '''イベントトリガー''' - イベントを開始するためのインタラクションです。 |
− | * Pressed - オブジェクトが押されました。 | + | ** '''Pressed''' - オブジェクトが押されました。 |
− | * クリックされた - オブジェクトが短時間押され、その後、解放された。スクロールされた場合は呼び出されない | + | ** '''クリックされた''' - オブジェクトが短時間押され、その後、解放された。スクロールされた場合は呼び出されない |
− | * 長押し - オブジェクトが長時間押された状態。 | + | ** '''長押し''' - オブジェクトが長時間押された状態。 |
− | * 長押しリピート - <code>long_press_time</code>の後に<code>long_press_repeat_time</code>の時間ごとに呼び出されます。スクロールしている場合は呼び出されません。 | + | ** '''長押しリピート''' - <code>long_press_time</code>の後に<code>long_press_repeat_time</code>の時間ごとに呼び出されます。スクロールしている場合は呼び出されません。 |
− | * フォーカスされている - オブジェクトがフォーカスされています。 | + | ** '''フォーカスされている''' - オブジェクトがフォーカスされています。 |
− | * デフォーカス - オブジェクトが非フォーカス状態になります. | + | ** '''デフォーカス''' - オブジェクトが非フォーカス状態になります. |
− | * Value changed - オブジェクトの値が変更されました。 | + | ** '''Value changed''' - オブジェクトの値が変更されました。 |
− | * Ready - 処理が終了しました。 | + | ** '''Ready''' - 処理が終了しました。 |
− | * Cancel - 処理がキャンセルされました。 | + | ** '''Cancel''' - 処理がキャンセルされました。 |
− | * Screen loaded - 画面がロードされ、すべてのアニメーションが終了したときに呼び出されます。 | + | ** '''Screen loaded''' - 画面がロードされ、すべてのアニメーションが終了したときに呼び出されます。 |
− | * Screen unloaded - 画面がアンロードされ、すべてのアニメーションが終了したときに呼び出されます。 | + | ** '''Screen unloaded''' - 画面がアンロードされ、すべてのアニメーションが終了したときに呼び出されます。 |
− | * Screen load start - 画面のロードが開始され、画面変更の遅延が終了したときに呼び出されます。 | + | ** '''Screen load start''' - 画面のロードが開始され、画面変更の遅延が終了したときに呼び出されます。 |
− | * スクリーンアンロードスタート - スクリーンアンロードが開始され、lv_scr_load/lv_scr_load_animが呼び出されるとすぐに実行されます。 | + | ** '''スクリーンアンロードスタート''' - スクリーンアンロードが開始され、lv_scr_load/lv_scr_load_animが呼び出されるとすぐに実行されます。 |
|} | |} | ||
− | |||
== Add Action == | == Add Action == | ||
{| class="wikitable" | {| class="wikitable" | ||
− | | | + | |Having added an interaction, you should add an action to be done. |
− | | | + | |
+ | * '''Action name''' - The name of the action | ||
+ | * '''Action type''' - The type of the action | ||
+ | |インタラクションを追加したら、実行するアクションを追加する必要があります。 | ||
+ | |||
+ | * '''アクション名''' - アクションの名前 | ||
+ | * '''アクション タイプ''' - アクションのタイプ | ||
|} | |} | ||
61行目: | 66行目: | ||
== Actions == | == Actions == | ||
{| class="wikitable" | {| class="wikitable" | ||
− | | | + | |Actions are those elements of the event, which start when trigger happen. |
− | | | + | |アクションは、トリガーが発生したときに開始されるイベントの要素です。 |
|} | |} | ||
68行目: | 73行目: | ||
=== Call function === | === Call function === | ||
{| class="wikitable" | {| class="wikitable" | ||
− | | | + | |Using the Call function action, you can add a function name that the event can refer to. |
− | | | + | |
+ | This function will be created into the '''ui__events.c''' or '''ui_events.py''' file during the exporting process. | ||
+ | |関数呼び出しアクションを使用して、イベントが参照できる関数名を追加できます。 | ||
+ | |||
+ | この関数は、エクスポート プロセス中に '''ui__events.c''' または '''ui_events.py''' ファイルに作成されます。 | ||
|} | |} | ||
75行目: | 84行目: | ||
=== Change Screen === | === Change Screen === | ||
{| class="wikitable" | {| class="wikitable" | ||
− | | | + | |You can change among screens with this action. |
− | | | + | |
+ | * '''Screen to''' - The screen you would like to change to | ||
+ | * '''Fade mode''' - The animation during changing the screen | ||
+ | * '''Speed''' - The speed of changing the screen | ||
+ | * '''Delay''' - The delay of changing the screen | ||
+ | |このアクションで画面を切り替えることができます。 | ||
+ | |||
+ | * '''Screen to''' - 変更したい画面 | ||
+ | * '''フェードモード''' - 画面切り替え時のアニメーション | ||
+ | * '''速度''' - 画面を変更する速度 | ||
+ | * '''遅延''' - 画面変更の遅延 | ||
|} | |} | ||
82行目: | 101行目: | ||
=== Increment Arc === | === Increment Arc === | ||
{| class="wikitable" | {| class="wikitable" | ||
− | | | + | |You can modify the value of the Arc Widget. |
− | | | + | |
+ | * '''Target''' - Target Arc Widget. | ||
+ | * '''Value''' - The value of increase / decrease | ||
+ | |アーク ウィジェットの値を変更できます。 | ||
+ | |||
+ | * '''ターゲット''' - ターゲット アーク ウィジェット。 | ||
+ | * '''値''' - 増加/減少の値 | ||
|} | |} | ||
89行目: | 114行目: | ||
=== Increment Bar === | === Increment Bar === | ||
{| class="wikitable" | {| class="wikitable" | ||
− | | | + | |You can modify the value of the Bar Widget. |
− | | | + | |
+ | * '''Target''' - Target Bar Widget | ||
+ | * '''Value''' - The value of increase / decrease | ||
+ | * '''Animate''' - The animation time of value change | ||
+ | |バー ウィジェットの値を変更できます。 | ||
+ | |||
+ | * '''ターゲット''' - ターゲット バー ウィジェット | ||
+ | * '''値''' - 増加/減少の値 | ||
+ | * '''Animate''' - 値の変化のアニメーション時間 | ||
|} | |} | ||
96行目: | 129行目: | ||
=== Increment Slider === | === Increment Slider === | ||
{| class="wikitable" | {| class="wikitable" | ||
− | | | + | |You can modify the value of the Slider Widget. |
− | | | + | |
+ | * '''Target''' - Target Slider Widget. | ||
+ | * '''Value''' - Value of increase / decrease. | ||
+ | * '''Animate''' - The animation time of value change | ||
+ | |スライダー ウィジェットの値を変更できます。 | ||
+ | |||
+ | * '''ターゲット''' - ターゲット スライダー ウィジェット。 | ||
+ | * '''値''' - 増加/減少の値。 | ||
+ | * '''Animate''' - 値の変化のアニメーション時間 | ||
|} | |} | ||
103行目: | 144行目: | ||
=== Modify Flag === | === Modify Flag === | ||
{| class="wikitable" | {| class="wikitable" | ||
− | | | + | |You can modify the flag state of a widget. |
− | | | + | |
+ | * '''Object''' - The target object | ||
+ | * '''Flags''' - The defined flag to be changed | ||
+ | * '''Action''' - The action to be used | ||
+ | ** '''Add''' - Add a flag | ||
+ | ** '''Remove''' - Remove a flag | ||
+ | ** '''Toggle''' - Use a flag from another state | ||
+ | |ウィジェットのフラグ状態を変更できます。 | ||
+ | |||
+ | * '''Object''' - ターゲット オブジェクト | ||
+ | * '''Flags''' - 変更する定義済みフラグ | ||
+ | * '''アクション''' - 使用するアクション | ||
+ | ** '''追加''' - フラグを追加します | ||
+ | ** '''削除''' - フラグを削除します | ||
+ | ** '''トグル''' - 別の州の旗を使用する | ||
|} | |} | ||
− | |||
=== Play Animation === | === Play Animation === | ||
{| class="wikitable" | {| class="wikitable" | ||
− | | | + | |You can play the animations created in the '''Animation Panel'''. |
− | | | + | |
+ | * '''Animation''' - The selected animation | ||
+ | * '''Target''' - Target widget you would like to use the animation on | ||
+ | * '''Delay''' - The delay time of the animation | ||
+ | |アニメーション パネルで作成したアニメーションを再生できます。 | ||
+ | |||
+ | * '''アニメーション''' - 選択したアニメーション | ||
+ | * '''ターゲット''' - アニメーションを使用するターゲット ウィジェット | ||
+ | * '''Delay''' - アニメーションの遅延時間 | ||
|} | |} | ||
117行目: | 179行目: | ||
=== Set Opacity === | === Set Opacity === | ||
{| class="wikitable" | {| class="wikitable" | ||
− | | | + | |The opacity of the selected widget. |
− | | | + | |
+ | * '''Target''' - The target widget. | ||
+ | * '''Value''' - The value of opacity. | ||
+ | |選択したウィジェットの不透明度。 | ||
+ | |||
+ | * '''ターゲット''' - ターゲット ウィジェット。 | ||
+ | * Value - 不透明度の値。 | ||
|} | |} | ||
124行目: | 192行目: | ||
=== Set Flag === | === Set Flag === | ||
{| class="wikitable" | {| class="wikitable" | ||
− | | | + | |Set the value for the flag state of the widget. |
− | | | + | |
+ | * '''Object''' - The target object. | ||
+ | * '''Flag''' - The flag to be used. | ||
+ | * '''Value''' - The value of the flag state. | ||
+ | |ウィジェットのフラグ状態の値を設定します。 | ||
+ | |||
+ | * '''オブジェクト''' - ターゲット オブジェクト。 | ||
+ | * '''Flag''' - 使用するフラグ。 | ||
+ | * '''Value''' - フラグ状態の値。 | ||
|} | |} | ||
131行目: | 207行目: | ||
=== Set Property === | === Set Property === | ||
{| class="wikitable" | {| class="wikitable" | ||
− | | | + | |Change the property value of the widget. |
− | | | + | |
+ | * '''Target''' - The target object. | ||
+ | * '''Property''' - The parameter to be changed. | ||
+ | * '''Value''' - The value of the property. | ||
+ | |ウィジェットのプロパティ値を変更します。 | ||
+ | |||
+ | * '''ターゲット''' - ターゲット オブジェクト。 | ||
+ | * '''プロパティ''' - 変更するパラメータ。 | ||
+ | * '''値''' - プロパティの値。 | ||
|} | |} | ||
138行目: | 222行目: | ||
=== Set text value from arc === | === Set text value from arc === | ||
{| class="wikitable" | {| class="wikitable" | ||
− | | | + | |Display the Arc Widget value on a Label Widget by using this action. |
− | | | + | |
+ | * '''Target''' - The Label widget to display the value on | ||
+ | * '''Source''' - The Arc widget value to be displayed | ||
+ | * '''Prefix''' - The text before the value on the Label widget | ||
+ | * '''Postfix''' - The text after the value on the Label widget | ||
+ | |このアクションを使用して、ラベル ウィジェットにアーク ウィジェットの値を表示します。 | ||
+ | |||
+ | * '''Target''' - 値を表示するラベル ウィジェット | ||
+ | * '''Source''' - 表示される Arc ウィジェットの値 | ||
+ | * '''プレフィックス''' - ラベル ウィジェットの値の前のテキスト | ||
+ | * '''Postfix''' - ラベル ウィジェットの値の後のテキスト | ||
|} | |} | ||
145行目: | 239行目: | ||
=== Set text value from slider === | === Set text value from slider === | ||
{| class="wikitable" | {| class="wikitable" | ||
− | | | + | |Display the Slider Widget value on a Label Widget by using this action. |
− | | | + | |
+ | * '''Target''' - The Label widget to display the value on | ||
+ | * '''Source''' - The Slider widget value to be displayed | ||
+ | * '''Prefix''' - The text before the value on the Label widget | ||
+ | * '''Postfix''' - The text after the value on the Label widget | ||
+ | |このアクションを使用して、ラベル ウィジェットにスライダー ウィジェットの値を表示します。 | ||
+ | |||
+ | * '''Target''' - 値を表示するラベル ウィジェット | ||
+ | * '''Source''' - 表示される Slider ウィジェットの値 | ||
+ | * '''プレフィックス''' - ラベル ウィジェットの値の前のテキスト | ||
+ | * '''Postfix''' - ラベル ウィジェットの値の後のテキスト | ||
|} | |} | ||
152行目: | 256行目: | ||
=== Set text value when checked === | === Set text value when checked === | ||
{| class="wikitable" | {| class="wikitable" | ||
− | | | + | |Change the text of a Label Widget depending on the checked or unchecked state of the target object. |
− | | | + | |
+ | * '''Target''' - The Label widget to display the text on | ||
+ | * '''Source''' - The state of the target widget | ||
+ | * '''On text''' - The text in checked state | ||
+ | * '''Of text''' - The text in unchecked state | ||
+ | |ターゲット オブジェクトのチェックまたは非チェック状態に応じて、ラベル ウィジェットのテキストを変更します。 | ||
+ | |||
+ | * '''Target''' - テキストを表示するラベル ウィジェット | ||
+ | * '''ソース''' - ターゲット ウィジェットの状態 | ||
+ | * '''テキスト上''' - チェックされた状態のテキスト | ||
+ | * '''Of text''' - チェックされていない状態のテキスト | ||
|} | |} | ||
2022年8月4日 (木) 11:34時点における最新版
Events and Actions
原文 | 訳 |
---|---|
Adding events, you can create different interactions to widgets, for instance change the screen, play an animation, etc. by pressing a button. | イベントを追加すると、ボタンを押して画面を変更したり、アニメーションを再生したりするなど、さまざまなインタラクションをウィジェットに作成できます。 |
Add Event
At the bottom of the Inspector Panel, you can find the ADD EVENT button.
Firstly, you should name the event, then choose a trigger to start it.
|
インスペクタパネルの下部に、ADD EVENTボタンがあります。
まず、イベントに名前を付け、それを開始するトリガーを選択します。
|
Add Action
Having added an interaction, you should add an action to be done.
|
インタラクションを追加したら、実行するアクションを追加する必要があります。
|
Actions
Actions are those elements of the event, which start when trigger happen. | アクションは、トリガーが発生したときに開始されるイベントの要素です。 |
Call function
Using the Call function action, you can add a function name that the event can refer to. This function will be created into the ui__events.c or ui_events.py file during the exporting process.
関数呼び出しアクションを使用して、イベントが参照できる関数名を追加できます。 この関数は、エクスポート プロセス中に ui__events.c または ui_events.py ファイルに作成されます。
Change Screen
You can change among screens with this action.
- Screen to - The screen you would like to change to
- Fade mode - The animation during changing the screen
- Speed - The speed of changing the screen
- Delay - The delay of changing the screen
このアクションで画面を切り替えることができます。
- Screen to - 変更したい画面
- フェードモード - 画面切り替え時のアニメーション
- 速度 - 画面を変更する速度
- 遅延 - 画面変更の遅延
Increment Arc
You can modify the value of the Arc Widget.
- Target - Target Arc Widget.
- Value - The value of increase / decrease
アーク ウィジェットの値を変更できます。
- ターゲット - ターゲット アーク ウィジェット。
- 値 - 増加/減少の値
Increment Bar
You can modify the value of the Bar Widget.
- Target - Target Bar Widget
- Value - The value of increase / decrease
- Animate - The animation time of value change
バー ウィジェットの値を変更できます。
- ターゲット - ターゲット バー ウィジェット
- 値 - 増加/減少の値
- Animate - 値の変化のアニメーション時間
Increment Slider
You can modify the value of the Slider Widget.
- Target - Target Slider Widget.
- Value - Value of increase / decrease.
- Animate - The animation time of value change
スライダー ウィジェットの値を変更できます。
- ターゲット - ターゲット スライダー ウィジェット。
- 値 - 増加/減少の値。
- Animate - 値の変化のアニメーション時間
Modify Flag
You can modify the flag state of a widget.
- Object - The target object
- Flags - The defined flag to be changed
- Action - The action to be used
- Add - Add a flag
- Remove - Remove a flag
- Toggle - Use a flag from another state
ウィジェットのフラグ状態を変更できます。
- Object - ターゲット オブジェクト
- Flags - 変更する定義済みフラグ
- アクション - 使用するアクション
- 追加 - フラグを追加します
- 削除 - フラグを削除します
- トグル - 別の州の旗を使用する
Play Animation
You can play the animations created in the Animation Panel.
- Animation - The selected animation
- Target - Target widget you would like to use the animation on
- Delay - The delay time of the animation
アニメーション パネルで作成したアニメーションを再生できます。
- アニメーション - 選択したアニメーション
- ターゲット - アニメーションを使用するターゲット ウィジェット
- Delay - アニメーションの遅延時間
Set Opacity
The opacity of the selected widget.
- Target - The target widget.
- Value - The value of opacity.
選択したウィジェットの不透明度。
- ターゲット - ターゲット ウィジェット。
- Value - 不透明度の値。
Set Flag
Set the value for the flag state of the widget.
- Object - The target object.
- Flag - The flag to be used.
- Value - The value of the flag state.
ウィジェットのフラグ状態の値を設定します。
- オブジェクト - ターゲット オブジェクト。
- Flag - 使用するフラグ。
- Value - フラグ状態の値。
Set Property
Change the property value of the widget.
- Target - The target object.
- Property - The parameter to be changed.
- Value - The value of the property.
ウィジェットのプロパティ値を変更します。
- ターゲット - ターゲット オブジェクト。
- プロパティ - 変更するパラメータ。
- 値 - プロパティの値。
Set text value from arc
Display the Arc Widget value on a Label Widget by using this action.
- Target - The Label widget to display the value on
- Source - The Arc widget value to be displayed
- Prefix - The text before the value on the Label widget
- Postfix - The text after the value on the Label widget
このアクションを使用して、ラベル ウィジェットにアーク ウィジェットの値を表示します。
- Target - 値を表示するラベル ウィジェット
- Source - 表示される Arc ウィジェットの値
- プレフィックス - ラベル ウィジェットの値の前のテキスト
- Postfix - ラベル ウィジェットの値の後のテキスト
Set text value from slider
Display the Slider Widget value on a Label Widget by using this action.
- Target - The Label widget to display the value on
- Source - The Slider widget value to be displayed
- Prefix - The text before the value on the Label widget
- Postfix - The text after the value on the Label widget
このアクションを使用して、ラベル ウィジェットにスライダー ウィジェットの値を表示します。
- Target - 値を表示するラベル ウィジェット
- Source - 表示される Slider ウィジェットの値
- プレフィックス - ラベル ウィジェットの値の前のテキスト
- Postfix - ラベル ウィジェットの値の後のテキスト
Set text value when checked
Change the text of a Label Widget depending on the checked or unchecked state of the target object.
- Target - The Label widget to display the text on
- Source - The state of the target widget
- On text - The text in checked state
- Of text - The text in unchecked state
ターゲット オブジェクトのチェックまたは非チェック状態に応じて、ラベル ウィジェットのテキストを変更します。
- Target - テキストを表示するラベル ウィジェット
- ソース - ターゲット ウィジェットの状態
- テキスト上 - チェックされた状態のテキスト
- Of text - チェックされていない状態のテキスト