Aegis2D
Modular C++26 2D game engine for networked games
Loading...
Searching...
No Matches
aegis2d::ui::Navigation Struct Reference

What the player asked of the focus during a frame. More...

#include <aegis2d/ui/widget_tree.hpp>

Public Attributes

bool next = false
 Focus the next widget (Tab, right shoulder).
 
bool previous = false
 Focus the previous widget (Shift+Tab, left shoulder).
 
std::optional< Direction > direction {}
 Focus the nearest widget in a direction.
 
std::optional< Vec2 > pointer {}
 Where the mouse points, in logical pixels, when it moved or clicked.
 
bool click = false
 The main mouse button went down at the pointer.
 
bool activate = false
 Use the focused widget (Enter, Space, South), pressed during the frame.
 
bool held = false
 The activate key or button, or the main mouse button, is held down.
 

Detailed Description

What the player asked of the focus during a frame.

Read from the input by NavigationInput::read(), or built by hand in tests.

Member Data Documentation

◆ activate

bool aegis2d::ui::Navigation::activate = false

Use the focused widget (Enter, Space, South), pressed during the frame.

◆ click

bool aegis2d::ui::Navigation::click = false

The main mouse button went down at the pointer.

◆ direction

std::optional<Direction> aegis2d::ui::Navigation::direction {}

Focus the nearest widget in a direction.

◆ held

bool aegis2d::ui::Navigation::held = false

The activate key or button, or the main mouse button, is held down.

◆ next

bool aegis2d::ui::Navigation::next = false

Focus the next widget (Tab, right shoulder).

◆ pointer

std::optional<Vec2> aegis2d::ui::Navigation::pointer {}

Where the mouse points, in logical pixels, when it moved or clicked.

◆ previous

bool aegis2d::ui::Navigation::previous = false

Focus the previous widget (Shift+Tab, left shoulder).


The documentation for this struct was generated from the following file: