aboutsummaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorDaniel J. Ramirez2017-01-22 22:40:43 -0600
committerRémi Verschelde2017-04-27 08:04:57 +0200
commitf045efe007cffb87238ee519b7f33d710814ded7 (patch)
tree9cb7b21ee73cd6a184ef2b18daff6867b98062d8 /editor/plugins
parent5993a5fac9a108297fc7909d1a38abac471d037d (diff)
downloadgodot-f045efe007cffb87238ee519b7f33d710814ded7.tar.gz
godot-f045efe007cffb87238ee519b7f33d710814ded7.tar.zst
godot-f045efe007cffb87238ee519b7f33d710814ded7.zip
Add new editor and default theme (WIP)
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/animation_player_editor_plugin.cpp20
-rw-r--r--editor/plugins/animation_player_editor_plugin.h3
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp7
-rw-r--r--editor/plugins/script_editor_plugin.cpp7
4 files changed, 20 insertions, 17 deletions
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp
index 0be7b202a..b4398427f 100644
--- a/editor/plugins/animation_player_editor_plugin.cpp
+++ b/editor/plugins/animation_player_editor_plugin.cpp
@@ -118,16 +118,7 @@ void AnimationPlayerEditor::_notification(int p_what) {
blend_editor.next->connect("item_selected", this, "_blend_editor_next_changed");
- nodename->set_icon(get_icon("AnimationPlayer", "EditorIcons"));
-
- /*
- anim_editor_load->set_normal_texture( get_icon("AnimGet","EditorIcons"));
- anim_editor_store->set_normal_texture( get_icon("AnimSet","EditorIcons"));
- anim_editor_load->set_pressed_texture( get_icon("AnimGet","EditorIcons"));
- anim_editor_store->set_pressed_texture( get_icon("AnimSet","EditorIcons"));
- anim_editor_load->set_hover_texture( get_icon("AnimGetHl","EditorIcons"));
- anim_editor_store->set_hover_texture( get_icon("AnimSetHl","EditorIcons"));
-*/
+ // nodename->set_icon(get_icon("AnimationPlayer", "EditorIcons"));
get_tree()->connect("node_removed", this, "_node_removed");
}
@@ -793,7 +784,7 @@ void AnimationPlayerEditor::_update_player() {
if (player)
nodename->set_text(player->get_name());
else
- nodename->set_text("<empty>");
+ nodename->set_text(TTR("No player selected"));
add_anim->set_disabled(player == NULL);
load_anim->set_disabled(player == NULL);
@@ -1367,9 +1358,14 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor) {
//tool_anim->get_popup()->add_item("Edit Anim Resource",TOOL_PASTE_ANIM);
hb->add_child(tool_anim);
- nodename = memnew(Button);
+ hb->add_child(memnew(VSeparator));
+ nodename_icon = memnew(TextureRect);
+ nodename_icon->set_stretch_mode(TextureRect::STRETCH_KEEP_CENTERED);
+ hb->add_child(nodename_icon);
+ nodename = memnew(Label);
hb->add_child(nodename);
pin = memnew(ToolButton);
+ pin->set_tooltip(TTR("Keep this animation selected?"));
pin->set_toggle_mode(true);
hb->add_child(pin);
diff --git a/editor/plugins/animation_player_editor_plugin.h b/editor/plugins/animation_player_editor_plugin.h
index a042da14d..d80f9dccf 100644
--- a/editor/plugins/animation_player_editor_plugin.h
+++ b/editor/plugins/animation_player_editor_plugin.h
@@ -85,7 +85,8 @@ class AnimationPlayerEditor : public VBoxContainer {
Button *remove_anim;
MenuButton *tool_anim;
ToolButton *pin;
- Button *nodename;
+ Label *nodename;
+ TextureRect *nodename_icon;
SpinBox *frame;
LineEdit *scale;
LineEdit *name;
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 1a533dce3..430a5adeb 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -3123,6 +3123,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
editor_selection->connect("selection_changed", this, "update");
hb = memnew(HBoxContainer);
+ hb->add_style_override("bg", editor->get_gui_base()->get_stylebox("panel", "PanelContainer"));
add_child(hb);
hb->set_area_as_parent_rect();
@@ -3299,6 +3300,8 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
animation_hb->hide();
key_loc_button = memnew(Button("loc"));
+ key_loc_button = memnew(Button("loc"));
+ key_loc_button->set_flat(true);
key_loc_button->set_toggle_mode(true);
key_loc_button->set_pressed(true);
key_loc_button->set_focus_mode(FOCUS_NONE);
@@ -3307,6 +3310,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
key_loc_button->connect("pressed", this, "_popup_callback", varray(ANIM_INSERT_POS));
animation_hb->add_child(key_loc_button);
key_rot_button = memnew(Button("rot"));
+ key_rot_button->set_flat(true);
key_rot_button->set_toggle_mode(true);
key_rot_button->set_pressed(true);
key_rot_button->set_focus_mode(FOCUS_NONE);
@@ -3315,13 +3319,14 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
key_rot_button->connect("pressed", this, "_popup_callback", varray(ANIM_INSERT_ROT));
animation_hb->add_child(key_rot_button);
key_scale_button = memnew(Button("scl"));
+ key_scale_button->set_flat(true);
key_scale_button->set_toggle_mode(true);
key_scale_button->set_focus_mode(FOCUS_NONE);
key_scale_button->add_color_override("font_color", Color(1, 0.6, 0.6));
key_scale_button->add_color_override("font_color_pressed", Color(0.6, 1, 0.6));
key_scale_button->connect("pressed", this, "_popup_callback", varray(ANIM_INSERT_SCALE));
animation_hb->add_child(key_scale_button);
- key_insert_button = memnew(Button);
+ key_insert_button = memnew(ToolButton);
key_insert_button->set_focus_mode(FOCUS_NONE);
key_insert_button->connect("pressed", this, "_popup_callback", varray(ANIM_INSERT_KEY));
key_insert_button->set_tooltip(TTR("Insert Keys"));
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 972ef44c1..91e3170e3 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -1296,7 +1296,8 @@ void ScriptEditor::_update_script_colors() {
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);
- 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));
+ script_list->set_item_custom_font_color(i, hot_color.linear_interpolate(cold_color, v));
}
}
}
@@ -2342,8 +2343,8 @@ ScriptEditorPlugin::ScriptEditorPlugin(EditorNode *p_node) {
EDITOR_DEF("text_editor/open_scripts/script_temperature_enabled", true);
EDITOR_DEF("text_editor/open_scripts/highlight_current_script", true);
EDITOR_DEF("text_editor/open_scripts/script_temperature_history_size", 15);
- EDITOR_DEF("text_editor/open_scripts/script_temperature_hot_color", Color(1, 0, 0, 0.3));
- EDITOR_DEF("text_editor/open_scripts/script_temperature_cold_color", Color(0, 0, 1, 0.3));
+ EDITOR_DEF("text_editor/open_scripts/script_temperature_hot_color", Color::html("ff5446"));
+ EDITOR_DEF("text_editor/open_scripts/script_temperature_cold_color", Color::html("647b93"));
EDITOR_DEF("text_editor/open_scripts/current_script_background_color", Color(0.81, 0.81, 0.14, 0.63));
EDITOR_DEF("text_editor/open_scripts/group_help_pages", true);
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT, "text_editor/open_scripts/sort_scripts_by", PROPERTY_HINT_ENUM, "Name,Path"));