Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
c4b7c7d8
Commit
c4b7c7d8
authored
Oct 17, 2016
by
Rémi Verschelde
Committed by
GitHub
Oct 17, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6796 from mateka/issue-3486
Possibility to write node path by hand in exported NodePath variable (#3486)
parents
bdce7eef
cf4f3815
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
property_editor.cpp
tools/editor/property_editor.cpp
+14
-2
No files found.
tools/editor/property_editor.cpp
View file @
c4b7c7d8
...
@@ -3613,9 +3613,10 @@ void PropertyEditor::update_tree() {
...
@@ -3613,9 +3613,10 @@ void PropertyEditor::update_tree() {
}
break
;
}
break
;
case
Variant
:
:
NODE_PATH
:
{
case
Variant
:
:
NODE_PATH
:
{
item
->
set_cell_mode
(
1
,
TreeItem
::
CELL_MODE_CUSTOM
);
item
->
set_cell_mode
(
1
,
TreeItem
::
CELL_MODE_STRING
);
item
->
set_editable
(
1
,
!
read_only
);
item
->
set_editable
(
1
,
!
read_only
);
item
->
set_text
(
1
,
obj
->
get
(
p
.
name
));
item
->
set_text
(
1
,
obj
->
get
(
p
.
name
));
item
->
add_button
(
1
,
get_icon
(
"Collapse"
,
"EditorIcons"
));
}
break
;
}
break
;
case
Variant
:
:
OBJECT
:
{
case
Variant
:
:
OBJECT
:
{
...
@@ -3892,6 +3893,7 @@ void PropertyEditor::_item_edited() {
...
@@ -3892,6 +3893,7 @@ void PropertyEditor::_item_edited() {
}
break
;
}
break
;
case
Variant
:
:
NODE_PATH
:
{
case
Variant
:
:
NODE_PATH
:
{
_edit_set
(
name
,
NodePath
(
item
->
get_text
(
1
)));
}
break
;
}
break
;
...
@@ -4067,7 +4069,17 @@ void PropertyEditor::_edit_button(Object *p_item, int p_column, int p_button) {
...
@@ -4067,7 +4069,17 @@ void PropertyEditor::_edit_button(Object *p_item, int p_column, int p_button) {
String
n
=
d
[
"name"
];
String
n
=
d
[
"name"
];
String
ht
=
d
[
"hint_text"
];
String
ht
=
d
[
"hint_text"
];
if
(
t
==
Variant
::
STRING
)
{
if
(
t
==
Variant
::
NODE_PATH
)
{
Variant
v
=
obj
->
get
(
n
);
custom_editor
->
edit
(
obj
,
n
,
(
Variant
::
Type
)
t
,
v
,
h
,
ht
);
Rect2
where
=
tree
->
get_item_rect
(
ti
,
1
);
where
.
pos
-=
tree
->
get_scroll
();
where
.
pos
+=
tree
->
get_global_pos
();
custom_editor
->
set_pos
(
where
.
pos
);
custom_editor
->
popup
();
}
else
if
(
t
==
Variant
::
STRING
)
{
Variant
v
=
obj
->
get
(
n
);
Variant
v
=
obj
->
get
(
n
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment