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
3bc7fe5f
Unverified
Commit
3bc7fe5f
authored
Feb 13, 2020
by
Yuri Roubinsky
Committed by
GitHub
Feb 13, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #36150 from Chaosus/vs_vk_label
Added high-end (Vulkan) label to some functions in visual shader
parents
c4823796
516cd821
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
7 deletions
+25
-7
editor_node.cpp
editor/editor_node.cpp
+1
-1
editor_themes.cpp
editor/editor_themes.cpp
+5
-0
visual_shader_editor_plugin.cpp
editor/plugins/visual_shader_editor_plugin.cpp
+18
-6
visual_shader_editor_plugin.h
editor/plugins/visual_shader_editor_plugin.h
+1
-0
No files found.
editor/editor_node.cpp
View file @
3bc7fe5f
...
...
@@ -5356,7 +5356,7 @@ void EditorNode::_update_video_driver_color() {
}
else
if
(
video_driver
->
get_text
()
==
"GLES3"
)
{
video_driver
->
add_color_override
(
"font_color"
,
Color
::
hex
(
0xa5557dff
));
}
else
if
(
video_driver
->
get_text
()
==
"Vulkan"
)
{
video_driver
->
add_color_override
(
"font_color"
,
Color
::
hex
(
0xad1128ff
));
video_driver
->
add_color_override
(
"font_color"
,
theme_base
->
get_color
(
"vulkan_color"
,
"Editor"
));
}
}
...
...
editor/editor_themes.cpp
View file @
3bc7fe5f
...
...
@@ -409,6 +409,11 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme
->
set_color
(
"error_color"
,
"Editor"
,
error_color
);
theme
->
set_color
(
"property_color"
,
"Editor"
,
property_color
);
if
(
!
dark_theme
)
{
theme
->
set_color
(
"vulkan_color"
,
"Editor"
,
Color
::
hex
(
0xad1128ff
));
}
else
{
theme
->
set_color
(
"vulkan_color"
,
"Editor"
,
Color
(
1.0
,
0.0
,
0.0
));
}
const
int
thumb_size
=
EDITOR_GET
(
"filesystem/file_dialog/thumbnail_size"
);
theme
->
set_constant
(
"scale"
,
"Editor"
,
EDSCALE
);
theme
->
set_constant
(
"thumb_size"
,
"Editor"
,
thumb_size
);
...
...
editor/plugins/visual_shader_editor_plugin.cpp
View file @
3bc7fe5f
...
...
@@ -284,11 +284,7 @@ void VisualShaderEditor::update_custom_nodes() {
}
String
VisualShaderEditor
::
_get_description
(
int
p_idx
)
{
if
(
add_options
[
p_idx
].
highend
)
{
return
TTR
(
"(GLES3 only)"
)
+
" "
+
add_options
[
p_idx
].
description
;
// TODO: change it to (Vulkan Only) when its ready
}
else
{
return
add_options
[
p_idx
].
description
;
}
return
add_options
[
p_idx
].
description
;
}
void
VisualShaderEditor
::
_update_options_menu
()
{
...
...
@@ -1680,6 +1676,8 @@ void VisualShaderEditor::_notification(int p_what) {
if
(
p_what
==
NOTIFICATION_ENTER_TREE
||
p_what
==
NOTIFICATION_THEME_CHANGED
)
{
highend_label
->
set_modulate
(
get_color
(
"vulkan_color"
,
"Editor"
));
error_panel
->
add_style_override
(
"panel"
,
get_stylebox
(
"bg"
,
"Tree"
));
error_label
->
add_color_override
(
"font_color"
,
get_color
(
"error_color"
,
"Editor"
));
...
...
@@ -2037,8 +2035,10 @@ void VisualShaderEditor::_member_selected() {
if
(
item
!=
NULL
&&
item
->
has_meta
(
"id"
))
{
members_dialog
->
get_ok
()
->
set_disabled
(
false
);
highend_label
->
set_visible
(
add_options
[
item
->
get_meta
(
"id"
)].
highend
);
node_desc
->
set_text
(
_get_description
(
item
->
get_meta
(
"id"
)));
}
else
{
highend_label
->
set_visible
(
false
);
members_dialog
->
get_ok
()
->
set_disabled
(
true
);
node_desc
->
set_text
(
""
);
}
...
...
@@ -2425,10 +2425,22 @@ VisualShaderEditor::VisualShaderEditor() {
members
->
connect
(
"item_selected"
,
this
,
"_member_selected"
);
members
->
connect
(
"nothing_selected"
,
this
,
"_member_unselected"
);
HBoxContainer
*
desc_hbox
=
memnew
(
HBoxContainer
);
members_vb
->
add_child
(
desc_hbox
);
Label
*
desc_label
=
memnew
(
Label
);
members_vb
->
add_child
(
desc_label
);
desc_hbox
->
add_child
(
desc_label
);
desc_label
->
set_text
(
TTR
(
"Description:"
));
desc_hbox
->
add_spacer
();
highend_label
=
memnew
(
Label
);
desc_hbox
->
add_child
(
highend_label
);
highend_label
->
set_visible
(
false
);
highend_label
->
set_text
(
"Vulkan"
);
highend_label
->
set_mouse_filter
(
Control
::
MOUSE_FILTER_STOP
);
highend_label
->
set_tooltip
(
TTR
(
"High-end node"
));
node_desc
=
memnew
(
RichTextLabel
);
members_vb
->
add_child
(
node_desc
);
node_desc
->
set_h_size_flags
(
SIZE_EXPAND_FILL
);
...
...
editor/plugins/visual_shader_editor_plugin.h
View file @
3bc7fe5f
...
...
@@ -94,6 +94,7 @@ class VisualShaderEditor : public VBoxContainer {
AcceptDialog
*
alert
;
LineEdit
*
node_filter
;
RichTextLabel
*
node_desc
;
Label
*
highend_label
;
void
_tools_menu_option
(
int
p_idx
);
void
_show_members_dialog
(
bool
at_mouse_pos
);
...
...
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