You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-15 13:51:40 +00:00
Added setting to change current script background color, issue 5450
This commit is contained in:
@@ -1292,6 +1292,7 @@ struct _ScriptEditorItemData {
|
|||||||
void ScriptEditor::_update_script_colors() {
|
void ScriptEditor::_update_script_colors() {
|
||||||
|
|
||||||
bool enabled = EditorSettings::get_singleton()->get("text_editor/script_temperature_enabled");
|
bool enabled = EditorSettings::get_singleton()->get("text_editor/script_temperature_enabled");
|
||||||
|
bool highlight_current = EditorSettings::get_singleton()->get("text_editor/highlight_current_script");
|
||||||
if (!enabled)
|
if (!enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -1319,9 +1320,13 @@ void ScriptEditor::_update_script_colors() {
|
|||||||
int non_zero_hist_size = ( hist_size == 0 ) ? 1 : hist_size;
|
int non_zero_hist_size = ( hist_size == 0 ) ? 1 : hist_size;
|
||||||
float v = Math::ease((edit_pass-pass)/float(non_zero_hist_size),0.4);
|
float v = Math::ease((edit_pass-pass)/float(non_zero_hist_size),0.4);
|
||||||
|
|
||||||
|
bool current = tab_container->get_current_tab() == c;
|
||||||
|
if (current && highlight_current) {
|
||||||
|
script_list->set_item_custom_bg_color(i, EditorSettings::get_singleton()->get("text_editor/current_script_background_color"));
|
||||||
|
} else {
|
||||||
script_list->set_item_custom_bg_color(i,hot_color.linear_interpolate(cold_color,v));
|
script_list->set_item_custom_bg_color(i,hot_color.linear_interpolate(cold_color,v));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScriptEditor::_update_script_names() {
|
void ScriptEditor::_update_script_names() {
|
||||||
@@ -2356,9 +2361,11 @@ ScriptEditorPlugin::ScriptEditorPlugin(EditorNode *p_node) {
|
|||||||
EDITOR_DEF("external_editor/use_external_editor",false);
|
EDITOR_DEF("external_editor/use_external_editor",false);
|
||||||
EDITOR_DEF("external_editor/exec_path","");
|
EDITOR_DEF("external_editor/exec_path","");
|
||||||
EDITOR_DEF("text_editor/script_temperature_enabled",true);
|
EDITOR_DEF("text_editor/script_temperature_enabled",true);
|
||||||
|
EDITOR_DEF("text_editor/highlight_current_script", true);
|
||||||
EDITOR_DEF("text_editor/script_temperature_history_size",15);
|
EDITOR_DEF("text_editor/script_temperature_history_size",15);
|
||||||
EDITOR_DEF("text_editor/script_temperature_hot_color",Color(1,0,0,0.3));
|
EDITOR_DEF("text_editor/script_temperature_hot_color",Color(1,0,0,0.3));
|
||||||
EDITOR_DEF("text_editor/script_temperature_cold_color",Color(0,0,1,0.3));
|
EDITOR_DEF("text_editor/script_temperature_cold_color",Color(0,0,1,0.3));
|
||||||
|
EDITOR_DEF("text_editor/current_script_background_color",Color(0.81,0.81,0.14,0.63));
|
||||||
EDITOR_DEF("text_editor/group_help_pages",true);
|
EDITOR_DEF("text_editor/group_help_pages",true);
|
||||||
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING,"external_editor/exec_path",PROPERTY_HINT_GLOBAL_FILE));
|
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING,"external_editor/exec_path",PROPERTY_HINT_GLOBAL_FILE));
|
||||||
EDITOR_DEF("external_editor/exec_flags","");
|
EDITOR_DEF("external_editor/exec_flags","");
|
||||||
|
|||||||
Reference in New Issue
Block a user