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
ea07acb8
Commit
ea07acb8
authored
May 21, 2020
by
Tomasz Chabora
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Link exposed set/getters in property descriptions
parent
92394120
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
2 deletions
+21
-2
editor_help.cpp
editor/editor_help.cpp
+21
-2
No files found.
editor/editor_help.cpp
View file @
ea07acb8
...
@@ -1015,6 +1015,11 @@ void EditorHelp::_update_doc() {
...
@@ -1015,6 +1015,11 @@ void EditorHelp::_update_doc() {
class_desc
->
pop
();
// font
class_desc
->
pop
();
// font
class_desc
->
pop
();
// cell
class_desc
->
pop
();
// cell
Map
<
String
,
DocData
::
MethodDoc
>
method_map
;
for
(
int
j
=
0
;
j
<
methods
.
size
();
j
++
)
{
method_map
[
methods
[
j
].
name
]
=
methods
[
j
];
}
if
(
cd
.
properties
[
i
].
setter
!=
""
)
{
if
(
cd
.
properties
[
i
].
setter
!=
""
)
{
class_desc
->
push_cell
();
class_desc
->
push_cell
();
class_desc
->
pop
();
// cell
class_desc
->
pop
();
// cell
...
@@ -1022,7 +1027,14 @@ void EditorHelp::_update_doc() {
...
@@ -1022,7 +1027,14 @@ void EditorHelp::_update_doc() {
class_desc
->
push_cell
();
class_desc
->
push_cell
();
class_desc
->
push_font
(
doc_code_font
);
class_desc
->
push_font
(
doc_code_font
);
class_desc
->
push_color
(
text_color
);
class_desc
->
push_color
(
text_color
);
class_desc
->
add_text
(
cd
.
properties
[
i
].
setter
+
TTR
(
"(value)"
));
if
(
method_map
[
cd
.
properties
[
i
].
setter
].
arguments
.
size
()
>
1
)
{
// Setters with additional arguments are exposed in the method list, so we link them here for quick access.
class_desc
->
push_meta
(
"@method "
+
cd
.
properties
[
i
].
setter
);
class_desc
->
add_text
(
cd
.
properties
[
i
].
setter
+
TTR
(
"(value)"
));
class_desc
->
pop
();
}
else
{
class_desc
->
add_text
(
cd
.
properties
[
i
].
setter
+
TTR
(
"(value)"
));
}
class_desc
->
pop
();
// color
class_desc
->
pop
();
// color
class_desc
->
push_color
(
comment_color
);
class_desc
->
push_color
(
comment_color
);
class_desc
->
add_text
(
" setter"
);
class_desc
->
add_text
(
" setter"
);
...
@@ -1039,7 +1051,14 @@ void EditorHelp::_update_doc() {
...
@@ -1039,7 +1051,14 @@ void EditorHelp::_update_doc() {
class_desc
->
push_cell
();
class_desc
->
push_cell
();
class_desc
->
push_font
(
doc_code_font
);
class_desc
->
push_font
(
doc_code_font
);
class_desc
->
push_color
(
text_color
);
class_desc
->
push_color
(
text_color
);
class_desc
->
add_text
(
cd
.
properties
[
i
].
getter
+
"()"
);
if
(
method_map
[
cd
.
properties
[
i
].
getter
].
arguments
.
size
()
>
0
)
{
// Getters with additional arguments are exposed in the method list, so we link them here for quick access.
class_desc
->
push_meta
(
"@method "
+
cd
.
properties
[
i
].
getter
);
class_desc
->
add_text
(
cd
.
properties
[
i
].
getter
+
"()"
);
class_desc
->
pop
();
}
else
{
class_desc
->
add_text
(
cd
.
properties
[
i
].
getter
+
"()"
);
}
class_desc
->
pop
();
//color
class_desc
->
pop
();
//color
class_desc
->
push_color
(
comment_color
);
class_desc
->
push_color
(
comment_color
);
class_desc
->
add_text
(
" getter"
);
class_desc
->
add_text
(
" getter"
);
...
...
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