aboutsummaryrefslogtreecommitdiff
path: root/editor/editor_settings.cpp
diff options
context:
space:
mode:
authorFabio Alessandrelli2017-05-09 13:57:07 +0200
committerFabio Alessandrelli2017-05-09 15:05:47 +0200
commit3b123367a1202e62f31d24e54c8280a97f00aa97 (patch)
treeadf68a7fde5329cd2eff19d39ef3e6fa47af4f11 /editor/editor_settings.cpp
parent98eb58a93cb34f42e42e6ee4f9f74fc15d4e9d85 (diff)
downloadgodot-3b123367a1202e62f31d24e54c8280a97f00aa97.tar.gz
godot-3b123367a1202e62f31d24e54c8280a97f00aa97.tar.zst
godot-3b123367a1202e62f31d24e54c8280a97f00aa97.zip
Display remote_host/port in network->debug settings
Diffstat (limited to '')
-rw-r--r--editor/editor_settings.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index f70f34af4..b69bf59fe 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -407,7 +407,8 @@ void EditorSettings::setup_network() {
IP::get_singleton()->get_local_addresses(&local_ip);
String lip;
String hint;
- String current = has("network/debug_host") ? get("network/debug_host") : "";
+ String current = has("network/debug/remote_host") ? get("network/debug/remote_host") : "";
+ int port = has("network/debug/remote_port") ? (int)get("network/debug/remote_port") : 6007;
for (List<IP_Address>::Element *E = local_ip.front(); E; E = E->next()) {
@@ -422,8 +423,11 @@ void EditorSettings::setup_network() {
hint += ip;
}
- set("network/debug_host", lip);
- add_property_hint(PropertyInfo(Variant::STRING, "network/debug_host", PROPERTY_HINT_ENUM, hint));
+ set("network/debug/remote_host", lip);
+ add_property_hint(PropertyInfo(Variant::STRING, "network/debug/remote_host", PROPERTY_HINT_ENUM, hint));
+
+ set("network/debug/remote_port", port);
+ add_property_hint(PropertyInfo(Variant::INT, "network/debug/remote_port", PROPERTY_HINT_RANGE, "1,65535,1"));
}
void EditorSettings::save() {