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
b1b49d96
Unverified
Commit
b1b49d96
authored
Jun 03, 2020
by
Rémi Verschelde
Committed by
GitHub
Jun 03, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #39009 from Calinou/improve-script-editor-warnings-text
Improve the text appearance in the script editor warnings panel
parents
0b76417d
0c0ee427
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
script_text_editor.cpp
editor/plugins/script_text_editor.cpp
+14
-9
No files found.
editor/plugins/script_text_editor.cpp
View file @
b1b49d96
...
@@ -609,6 +609,18 @@ void ScriptTextEditor::_validate_script() {
...
@@ -609,6 +609,18 @@ void ScriptTextEditor::_validate_script() {
for
(
List
<
ScriptLanguage
::
Warning
>::
Element
*
E
=
warnings
.
front
();
E
;
E
=
E
->
next
())
{
for
(
List
<
ScriptLanguage
::
Warning
>::
Element
*
E
=
warnings
.
front
();
E
;
E
=
E
->
next
())
{
ScriptLanguage
::
Warning
w
=
E
->
get
();
ScriptLanguage
::
Warning
w
=
E
->
get
();
Dictionary
ignore_meta
;
ignore_meta
[
"line"
]
=
w
.
line
;
ignore_meta
[
"code"
]
=
w
.
string_code
.
to_lower
();
warnings_panel
->
push_cell
();
warnings_panel
->
push_meta
(
ignore_meta
);
warnings_panel
->
push_color
(
warnings_panel
->
get_theme_color
(
"accent_color"
,
"Editor"
).
lerp
(
warnings_panel
->
get_theme_color
(
"mono_color"
,
"Editor"
),
0.5
));
warnings_panel
->
add_text
(
TTR
(
"[Ignore]"
));
warnings_panel
->
pop
();
// Color.
warnings_panel
->
pop
();
// Meta ignore.
warnings_panel
->
pop
();
// Cell.
warnings_panel
->
push_cell
();
warnings_panel
->
push_cell
();
warnings_panel
->
push_meta
(
w
.
line
-
1
);
warnings_panel
->
push_meta
(
w
.
line
-
1
);
warnings_panel
->
push_color
(
warnings_panel
->
get_theme_color
(
"warning_color"
,
"Editor"
));
warnings_panel
->
push_color
(
warnings_panel
->
get_theme_color
(
"warning_color"
,
"Editor"
));
...
@@ -621,15 +633,6 @@ void ScriptTextEditor::_validate_script() {
...
@@ -621,15 +633,6 @@ void ScriptTextEditor::_validate_script() {
warnings_panel
->
push_cell
();
warnings_panel
->
push_cell
();
warnings_panel
->
add_text
(
w
.
message
);
warnings_panel
->
add_text
(
w
.
message
);
warnings_panel
->
pop
();
// Cell.
warnings_panel
->
pop
();
// Cell.
Dictionary
ignore_meta
;
ignore_meta
[
"line"
]
=
w
.
line
;
ignore_meta
[
"code"
]
=
w
.
string_code
.
to_lower
();
warnings_panel
->
push_cell
();
warnings_panel
->
push_meta
(
ignore_meta
);
warnings_panel
->
add_text
(
TTR
(
"(ignore)"
));
warnings_panel
->
pop
();
// Meta ignore.
warnings_panel
->
pop
();
// Cell.
}
}
warnings_panel
->
pop
();
// Table.
warnings_panel
->
pop
();
// Table.
...
@@ -1747,6 +1750,8 @@ ScriptTextEditor::ScriptTextEditor() {
...
@@ -1747,6 +1750,8 @@ ScriptTextEditor::ScriptTextEditor() {
warnings_panel
=
memnew
(
RichTextLabel
);
warnings_panel
=
memnew
(
RichTextLabel
);
editor_box
->
add_child
(
warnings_panel
);
editor_box
->
add_child
(
warnings_panel
);
warnings_panel
->
add_theme_font_override
(
"normal_font"
,
EditorNode
::
get_singleton
()
->
get_gui_base
()
->
get_theme_font
(
"main"
,
"EditorFonts"
));
warnings_panel
->
set_custom_minimum_size
(
Size2
(
0
,
100
*
EDSCALE
));
warnings_panel
->
set_custom_minimum_size
(
Size2
(
0
,
100
*
EDSCALE
));
warnings_panel
->
set_h_size_flags
(
SIZE_EXPAND_FILL
);
warnings_panel
->
set_h_size_flags
(
SIZE_EXPAND_FILL
);
warnings_panel
->
set_meta_underline
(
true
);
warnings_panel
->
set_meta_underline
(
true
);
...
...
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