summaryrefslogtreecommitdiffstats
path: root/modules/navigation/nav_link.cpp
diff options
context:
space:
mode:
authorsmix8 <52464204+smix8@users.noreply.github.com>2023-07-06 23:01:19 +0200
committersmix8 <52464204+smix8@users.noreply.github.com>2023-07-26 01:20:15 +0200
commit69fad39cf5437b45bac2039d864605b2b63b9950 (patch)
treebe6153824e69c6ae1f8391d266a802f58630263a /modules/navigation/nav_link.cpp
parent202e4b2c1e7f8b25738b93d0e4d5066453d3edf3 (diff)
downloadredot-engine-69fad39cf5437b45bac2039d864605b2b63b9950.tar.gz
Add NavigationServer API to enable regions and links
Adds NavigationServer API to enable regions and links.
Diffstat (limited to 'modules/navigation/nav_link.cpp')
-rw-r--r--modules/navigation/nav_link.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/navigation/nav_link.cpp b/modules/navigation/nav_link.cpp
index d712987a46..c693cc91c8 100644
--- a/modules/navigation/nav_link.cpp
+++ b/modules/navigation/nav_link.cpp
@@ -49,6 +49,16 @@ void NavLink::set_map(NavMap *p_map) {
}
}
+void NavLink::set_enabled(bool p_enabled) {
+ if (enabled == p_enabled) {
+ return;
+ }
+ enabled = p_enabled;
+
+ // TODO: This should not require a full rebuild as the link has not really changed.
+ link_dirty = true;
+};
+
void NavLink::set_bidirectional(bool p_bidirectional) {
if (bidirectional == p_bidirectional) {
return;