Skip to content

FocusMode

Eduard Gushchin edited this page Jul 1, 2026 · 3 revisions

Home | API by Category | Complete API Index | API Compatibility

Field Value
Full name Electron2D.FocusMode
Namespace Electron2D
Kind enum
Category UI and Text

Overview

Identifies how a Electron2D.Control can receive keyboard, gamepad or mouse focus.

Syntax

public enum Electron2D.FocusMode : System.IComparable, System.IConvertible, System.IFormattable, System.ISpanFormattable

Godot 4.7 C# profile compatibility

Profile: Electron2D 0.1.0 2D
Status: Supported / Parity verified
Out of profile: no
Godot reference: Control.FocusMode

Focus mode values for disabled, click-only and direct/all focus in the UI input baseline.

Remarks

Focus is owned by the root Electron2D.Viewport that contains the control. Only one control can be focused in that viewport at a time.

This enumeration controls whether Electron2D.Control.GrabFocus can focus a control and whether mouse press events focus the control before Electron2D.Control._GuiInput(Electron2D.InputEvent) is called.

Thread Safety

Enumeration values are immutable and may be read from any thread.

Since

This enum is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Control.FocusMode
  • Electron2D.Control.GrabFocus

Members

Member Kind Summary
All Enum value The control can receive focus from direct focus calls and pointer input.
Click Enum value The control can receive focus from mouse or touch presses.
None Enum value The control cannot receive focus.

Member Details

All

Kind: Enum value

public const Electron2D.FocusMode All

Summary

The control can receive focus from direct focus calls and pointer input.

Remarks

Keyboard/gamepad focus navigation is introduced by later UI tasks, but this mode already allows direct Electron2D.Control.GrabFocus calls and click focus in the input dispatch baseline.

Thread Safety

Enumeration values are immutable and may be read from any thread.

Since

This field is available since Electron2D 0.1.0 Preview.

Click

Kind: Enum value

public const Electron2D.FocusMode Click

Summary

The control can receive focus from mouse or touch presses.

Remarks

This mode is intended for controls that should become focused when clicked but should not be selected by keyboard navigation in the preview baseline.

Thread Safety

Enumeration values are immutable and may be read from any thread.

Since

This field is available since Electron2D 0.1.0 Preview.

None

Kind: Enum value

public const Electron2D.FocusMode None

Summary

The control cannot receive focus.

Remarks

Electron2D.Control.GrabFocus ignores controls in this mode, and mouse presses do not focus them.

Thread Safety

Enumeration values are immutable and may be read from any thread.

Since

This field is available since Electron2D 0.1.0 Preview.

Clone this wiki locally