ASW Lib
A.D.S. Games SDL Wrapper Library. A library targeted at Allegro4 users who want to switch to SDL3 and use modern c++.
Loading...
Searching...
No Matches
navigation.h
Go to the documentation of this file.
1
8
9#ifndef ASW_MODULES_UI_NAVIGATION_H
10#define ASW_MODULES_UI_NAVIGATION_H
11
12#include <string>
13#include <string_view>
14
15namespace asw::ui {
16
33struct Navigation {
35 std::string up;
36
38 std::string down;
39
41 std::string left;
42
44 std::string right;
45
48 std::string next;
49
51 std::string prev;
52
54 std::string activate;
55
57 std::string back;
58};
59
72Navigation bind_default_navigation(std::string_view prefix = "ui_");
73
74} // namespace asw::ui
75
76#endif // ASW_MODULES_UI_NAVIGATION_H
Navigation bind_default_navigation(std::string_view prefix="ui_")
Bind keyboard and controller actions for UI navigation and return their names. Calling it again repla...
Action names the UI reads for focus navigation, see asw/modules/action.h.
Definition navigation.h:33
std::string down
Move focus down.
Definition navigation.h:38
std::string back
Go back, sent to the focused widget and then Root::on_back.
Definition navigation.h:57
std::string right
Move focus right.
Definition navigation.h:44
std::string prev
Move focus to the previous widget.
Definition navigation.h:51
std::string up
Move focus up.
Definition navigation.h:35
std::string activate
Press the focused widget.
Definition navigation.h:54
std::string next
Move focus to the next widget. Holding Shift makes it go back, so Shift+Tab still works when Tab is b...
Definition navigation.h:48
std::string left
Move focus left.
Definition navigation.h:41