Skip to content

Commit accfebb

Browse files
committed
Merge pull request #103340 from Calinou/editor-visualshader-tweak-highend-label
Tweak high-end mark in the visual shader editor's node creation dialog
2 parents eaa0a00 + 8a22dba commit accfebb

File tree

4 files changed

+5
-17
lines changed

4 files changed

+5
-17
lines changed

doc/classes/VisualShaderNodeCustom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,8 @@
184184
<method name="_is_highend" qualifiers="virtual const">
185185
<return type="bool" />
186186
<description>
187-
Override this method to enable high-end mark in the Visual Shader Editor's members dialog.
188-
Defining this method is [b]optional[/b]. If not overridden, it's [code]false[/code].
187+
Override this method to enable the high-end mark in the Visual Shader Editor's members dialog. This should return [code]true[/code] for nodes that only work when using the Forward+ and Mobile renderers.
188+
Defining this method is [b]optional[/b]. If not overridden, it's [code]false[/code], which indicates this node works with all renderers (including Compatibility).
189189
</description>
190190
</method>
191191
<method name="get_option_index" qualifiers="const">

editor/shader/visual_shader_editor_plugin.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5283,7 +5283,7 @@ void VisualShaderEditor::_notification(int p_what) {
52835283

52845284
case NOTIFICATION_THEME_CHANGED: {
52855285
site_search->set_button_icon(get_editor_theme_icon(SNAME("ExternalLink")));
5286-
highend_label->set_modulate(get_theme_color(SNAME("highend_color"), EditorStringName(Editor)));
5286+
highend_label->add_theme_color_override(SceneStringName(font_color), get_theme_color(SNAME("warning_color"), EditorStringName(Editor)));
52875287

52885288
param_filter->set_right_icon(Control::get_editor_theme_icon(SNAME("Search")));
52895289
node_filter->set_right_icon(Control::get_editor_theme_icon(SNAME("Search")));
@@ -6927,9 +6927,9 @@ VisualShaderEditor::VisualShaderEditor() {
69276927
highend_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
69286928
desc_hbox->add_child(highend_label);
69296929
highend_label->set_visible(false);
6930-
highend_label->set_text("Vulkan");
6930+
highend_label->set_text(TTRC("Forward+/Mobile"));
69316931
highend_label->set_mouse_filter(Control::MOUSE_FILTER_STOP);
6932-
highend_label->set_tooltip_text(TTR("High-end node"));
6932+
highend_label->set_tooltip_text(TTR("Only supported in the Forward+ and Mobile rendering methods, not Compatibility."));
69336933

69346934
node_desc = memnew(RichTextLabel);
69356935
members_vb->add_child(node_desc);

editor/themes/theme_classic.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -211,12 +211,6 @@ void ThemeClassic::populate_shared_styles(const Ref<EditorTheme> &p_theme, Edito
211211
p_theme->set_color("forward_plus_color", EditorStringName(Editor), Color::hex(0x5d8c3fff));
212212
p_theme->set_color("mobile_color", EditorStringName(Editor), Color::hex(0xa5557dff));
213213
p_theme->set_color("gl_compatibility_color", EditorStringName(Editor), Color::hex(0x5586a4ff));
214-
215-
if (p_config.dark_theme) {
216-
p_theme->set_color("highend_color", EditorStringName(Editor), Color(1.0, 0.0, 0.0));
217-
} else {
218-
p_theme->set_color("highend_color", EditorStringName(Editor), Color::hex(0xad1128ff));
219-
}
220214
}
221215

222216
// Constants.

editor/themes/theme_modern.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -234,12 +234,6 @@ void ThemeModern::populate_shared_styles(const Ref<EditorTheme> &p_theme, Editor
234234
p_theme->set_color("forward_plus_color", EditorStringName(Editor), Color::hex(0x5d8c3fff));
235235
p_theme->set_color("mobile_color", EditorStringName(Editor), Color::hex(0xa5557dff));
236236
p_theme->set_color("gl_compatibility_color", EditorStringName(Editor), Color::hex(0x5586a4ff));
237-
238-
if (p_config.dark_theme) {
239-
p_theme->set_color("highend_color", EditorStringName(Editor), Color(1.0, 0.0, 0.0));
240-
} else {
241-
p_theme->set_color("highend_color", EditorStringName(Editor), Color::hex(0xad1128ff));
242-
}
243237
}
244238

245239
// Constants.

0 commit comments

Comments
 (0)