1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-02 16:48:55 +00:00

Tweak high-end mark in the visual shader editor's node creation dialog

- Use Forward+/Mobile terminology as support actually depends on the
  rendering method used, not the rendering driver.
- Use a standard warning color as this is no longer indicated as
  Vulkan-specific.
- Fix color on light theme (the text was being modulated instead
  of having its color overridden).
This commit is contained in:
Hugo Locurcio
2025-02-27 01:41:07 +01:00
parent 68410acc61
commit 8a22dba956
4 changed files with 5 additions and 17 deletions

View File

@@ -184,8 +184,8 @@
<method name="_is_highend" qualifiers="virtual const">
<return type="bool" />
<description>
Override this method to enable high-end mark in the Visual Shader Editor's members dialog.
Defining this method is [b]optional[/b]. If not overridden, it's [code]false[/code].
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.
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).
</description>
</method>
<method name="get_option_index" qualifiers="const">

View File

@@ -5283,7 +5283,7 @@ void VisualShaderEditor::_notification(int p_what) {
case NOTIFICATION_THEME_CHANGED: {
site_search->set_button_icon(get_editor_theme_icon(SNAME("ExternalLink")));
highend_label->set_modulate(get_theme_color(SNAME("highend_color"), EditorStringName(Editor)));
highend_label->add_theme_color_override(SceneStringName(font_color), get_theme_color(SNAME("warning_color"), EditorStringName(Editor)));
param_filter->set_right_icon(Control::get_editor_theme_icon(SNAME("Search")));
node_filter->set_right_icon(Control::get_editor_theme_icon(SNAME("Search")));
@@ -6927,9 +6927,9 @@ VisualShaderEditor::VisualShaderEditor() {
highend_label->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
desc_hbox->add_child(highend_label);
highend_label->set_visible(false);
highend_label->set_text("Vulkan");
highend_label->set_text(TTRC("Forward+/Mobile"));
highend_label->set_mouse_filter(Control::MOUSE_FILTER_STOP);
highend_label->set_tooltip_text(TTR("High-end node"));
highend_label->set_tooltip_text(TTR("Only supported in the Forward+ and Mobile rendering methods, not Compatibility."));
node_desc = memnew(RichTextLabel);
members_vb->add_child(node_desc);

View File

@@ -180,12 +180,6 @@ void ThemeClassic::populate_shared_styles(const Ref<EditorTheme> &p_theme, Edito
p_theme->set_color("forward_plus_color", EditorStringName(Editor), Color::hex(0x5d8c3fff));
p_theme->set_color("mobile_color", EditorStringName(Editor), Color::hex(0xa5557dff));
p_theme->set_color("gl_compatibility_color", EditorStringName(Editor), Color::hex(0x5586a4ff));
if (p_config.dark_theme) {
p_theme->set_color("highend_color", EditorStringName(Editor), Color(1.0, 0.0, 0.0));
} else {
p_theme->set_color("highend_color", EditorStringName(Editor), Color::hex(0xad1128ff));
}
}
// Constants.

View File

@@ -203,12 +203,6 @@ void ThemeModern::populate_shared_styles(const Ref<EditorTheme> &p_theme, Editor
p_theme->set_color("forward_plus_color", EditorStringName(Editor), Color::hex(0x5d8c3fff));
p_theme->set_color("mobile_color", EditorStringName(Editor), Color::hex(0xa5557dff));
p_theme->set_color("gl_compatibility_color", EditorStringName(Editor), Color::hex(0x5586a4ff));
if (p_config.dark_theme) {
p_theme->set_color("highend_color", EditorStringName(Editor), Color(1.0, 0.0, 0.0));
} else {
p_theme->set_color("highend_color", EditorStringName(Editor), Color::hex(0xad1128ff));
}
}
// Constants.