book_4_sparkGenerated
code_blocksInput

Description

The Game field of the PanelInputType enumeration is used to redirect input handling to the game's input system. This allows for input events to be processed in the context of the game, rather than the user interface. This is particularly useful when you want the game logic to handle input directly, bypassing any UI-specific input processing.

Usage

Use the PanelInputType.Game when you need the input to be managed by the game's input system. This is typically used in scenarios where game-specific input handling is required, such as controlling a character or interacting with the game world.

Example

// Example of setting a panel's input type to Game
Panel myPanel = new Panel();
myPanel.InputType = PanelInputType.Game;

// This will ensure that input events are handled by the game's input system
// rather than the UI system.