فهرست منبع

Update input.md

Björn Ritzl 4 سال پیش
والد
کامیت
a12484ddf2
1فایلهای تغییر یافته به همراه21 افزوده شده و 20 حذف شده
  1. 21 20
      docs/en/manuals/input.md

+ 21 - 20
docs/en/manuals/input.md

@@ -154,26 +154,6 @@ This message instructs the engine to add input capable components (script compon
 If a game object that has already acquired input focus does so again, its component(s) will be moved to the top of the stack.
 If a game object that has already acquired input focus does so again, its component(s) will be moved to the top of the stack.
 
 
 
 
-### Input focus and Collection proxy component
-
-Each game world that is dynamically loaded through a collection proxy has its own input stack. For action dispatch to reach the loaded world's input stack, the proxy component must be on the main world's input stack. All components on a loaded world's stack are handled before dispatch continues down the main stack:
-
-![Action dispatch to proxies](images/input/proxy.png){srcset="images/input/[email protected] 2x"}
-
-::: important
-It is a common error to forget to send `acquire_input_focus` to the game object holding the collection proxy component. Skipping this step prevents input from reaching any of the components on the loaded world's input stack.
-:::
-
-
-### Release input focus
-
-To stop listening to input actions, send a `release_input_focus` message to the game object. This message will remove any of the game object's components from the input stack:
-
-```lua
--- tell the current game object (".") to release input focus.
-msg.post(".", "release_input_focus")
-```
-
 ## Input dispatch and on_input()
 ## Input dispatch and on_input()
 
 
 Input actions are dispatched according to the input stack, from the top to the bottom.
 Input actions are dispatched according to the input stack, from the top to the bottom.
@@ -208,6 +188,27 @@ end
 ```
 ```
 
 
 
 
+### Input focus and collection proxy components
+
+Each game world that is dynamically loaded through a collection proxy has its own input stack. For action dispatch to reach the loaded world's input stack, the proxy component must be on the main world's input stack. All components on a loaded world's stack are handled before dispatch continues down the main stack:
+
+![Action dispatch to proxies](images/input/proxy.png){srcset="images/input/[email protected] 2x"}
+
+::: important
+It is a common error to forget to send `acquire_input_focus` to the game object holding the collection proxy component. Skipping this step prevents input from reaching any of the components on the loaded world's input stack.
+:::
+
+
+### Releasing input
+
+To stop listening to input actions, send a `release_input_focus` message to the game object. This message will remove any of the game object's components from the input stack:
+
+```lua
+-- tell the current game object (".") to release input focus.
+msg.post(".", "release_input_focus")
+```
+
+
 ## Consuming input
 ## Consuming input
 
 
 A component's `on_input()` can actively control whether actions should be passed on further down the stack or not:
 A component's `on_input()` can actively control whether actions should be passed on further down the stack or not: