Add new editor and default theme (WIP)

This commit is contained in:
Daniel J. Ramirez 2017-01-22 22:40:43 -06:00 committed by Rémi Verschelde
parent 5993a5fac9
commit f045efe007
354 changed files with 8681 additions and 950 deletions

View file

@ -1035,7 +1035,7 @@ void AnimationKeyEditor::_track_pos_draw() {
//draw position
int pixel = (timeline_pos - h_scroll->get_value()) * zoom_scale;
pixel += name_limit;
track_pos->draw_line(ofs + Point2(pixel, 0), ofs + Point2(pixel, size.height), Color(1, 0.3, 0.3, 0.8));
track_pos->draw_line(ofs + Point2(pixel, 0), ofs + Point2(pixel, size.height), get_color("animation_editor_track_pos", "Editor"));
}
}
@ -1089,9 +1089,8 @@ void AnimationKeyEditor::_track_editor_draw() {
int sep = get_constant("vseparation", "Tree");
int hsep = get_constant("hseparation", "Tree");
Color color = get_color("font_color", "Tree");
Color sepcolor = get_color("guide_color", "Tree");
Color timecolor = get_color("prop_subsection", "Editor");
timecolor = Color::html("ff4a414f");
Color sepcolor = get_color("guide_color", "Editor");
Color timecolor = get_color("animation_editor_time", "Editor");
Color hover_color = Color(1, 1, 1, 0.05);
Color select_color = Color(1, 1, 1, 0.1);
Color invalid_path_color = Color(1, 0.6, 0.4, 0.5);
@ -1155,8 +1154,9 @@ void AnimationKeyEditor::_track_editor_draw() {
int settings_limit = size.width - right_separator_ofs;
int name_limit = settings_limit * name_column_ratio;
te->draw_line(ofs + Point2(name_limit, 0), ofs + Point2(name_limit, size.height), color);
te->draw_line(ofs + Point2(settings_limit, 0), ofs + Point2(settings_limit, size.height), color);
Color line_color = get_color("animation_editor_line", "Editor");
te->draw_line(ofs + Point2(name_limit, 0), ofs + Point2(name_limit, size.height), line_color);
te->draw_line(ofs + Point2(settings_limit, 0), ofs + Point2(settings_limit, size.height), line_color);
te->draw_texture(hsize_icon, ofs + Point2(name_limit - hsize_icon->get_width() - hsep, (h - hsize_icon->get_height()) / 2));
te->draw_line(ofs + Point2(0, h), ofs + Point2(size.width, h), color);
@ -1483,7 +1483,7 @@ void AnimationKeyEditor::_track_editor_draw() {
switch (click.click) {
case ClickOver::CLICK_SELECT_KEYS: {
te->draw_rect(Rect2(click.at, click.to - click.at), Color(0.7, 0.7, 1.0, 0.5));
te->draw_rect(Rect2(click.at, click.to - click.at), get_color("animation_editor_selection_rect", "Editor"));
} break;
case ClickOver::CLICK_MOVE_KEYS: {
@ -3753,6 +3753,7 @@ AnimationKeyEditor::AnimationKeyEditor() {
//add_child(menu);
zoomicon = memnew(TextureRect);
zoomicon->set_stretch_mode(TextureRect::STRETCH_KEEP_CENTERED);
hb->add_child(zoomicon);
zoomicon->set_tooltip(TTR("Animation zoom."));

View file

@ -622,6 +622,7 @@ CreateDialog::CreateDialog() {
search_box->set_h_size_flags(SIZE_EXPAND_FILL);
search_hb->add_child(search_box);
favorite = memnew(Button);
favorite->set_flat(true);
favorite->set_toggle_mode(true);
search_hb->add_child(favorite);
favorite->connect("pressed", this, "_favorite_toggled");

View file

@ -45,6 +45,10 @@ void EditorAudioBus::_notification(int p_what) {
vu_r->set_progress_texture(get_icon("BusVuFull", "EditorIcons"));
scale->set_texture(get_icon("BusVuDb", "EditorIcons"));
solo->set_icon(get_icon("AudioBusSolo", "EditorIcons"));
mute->set_icon(get_icon("AudioBusMute", "EditorIcons"));
bypass->set_icon(get_icon("AudioBusBypass", "EditorIcons"));
disabled_vu = get_icon("BusVuFrozen", "EditorIcons");
prev_active = true;
@ -627,23 +631,23 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses) {
vb->add_child(hbc);
hbc->add_spacer();
solo = memnew(ToolButton);
solo->set_text("S");
solo->set_tooltip(TTR("Toggle Solo"));
solo->set_toggle_mode(true);
solo->set_modulate(Color(0.8, 1.2, 0.8));
// solo->set_modulate(Color(0.8, 1.2, 0.8));
solo->set_focus_mode(FOCUS_NONE);
solo->connect("pressed", this, "_solo_toggled");
hbc->add_child(solo);
mute = memnew(ToolButton);
mute->set_text("M");
mute->set_toggle_mode(true);
mute->set_modulate(Color(1.2, 0.8, 0.8));
mute->set_focus_mode(FOCUS_NONE);
mute->connect("pressed", this, "_mute_toggled");
mute->set_toggle_mode(true);
// mute->set_modulate(Color(1.2, 0.8, 0.8));
mute->set_focus_mode(FOCUS_NONE);
mute->set_tooltip(TTR("Toggle Mute"));
hbc->add_child(mute);
bypass = memnew(ToolButton);
bypass->set_text("B");
bypass->set_tooltip(TTR("Toggle Bypass"));
bypass->set_toggle_mode(true);
bypass->set_modulate(Color(1.1, 1.1, 0.8));
// bypass->set_modulate(Color(1.1, 1.1, 0.8));
bypass->set_focus_mode(FOCUS_NONE);
bypass->connect("pressed", this, "_bypass_toggled");
hbc->add_child(bypass);
@ -763,7 +767,7 @@ void EditorAudioBuses::_update_buses() {
EditorAudioBus *audio_bus = memnew(EditorAudioBus(this));
if (i == 0) {
audio_bus->set_self_modulate(Color(1, 0.9, 0.9));
audio_bus->set_self_modulate(Color(0.7, 0.7, 0.7));
}
bus_hb->add_child(audio_bus);
audio_bus->connect("delete_request", this, "_delete_bus", varray(audio_bus), CONNECT_DEFERRED);

View file

@ -2697,7 +2697,7 @@ void EditorNode::add_editor_plugin(EditorPlugin *p_editor) {
ToolButton *tb = memnew(ToolButton);
tb->set_toggle_mode(true);
tb->connect("pressed", singleton, "_editor_select", varray(singleton->main_editor_buttons.size()));
tb->set_text(p_editor->get_name());
tb->set_icon(singleton->gui_base->get_icon(p_editor->get_name(), "EditorIcons"));
singleton->main_editor_buttons.push_back(tb);
singleton->main_editor_button_vb->add_child(tb);
singleton->editor_table.push_back(p_editor);
@ -5080,19 +5080,21 @@ EditorNode::EditorNode() {
*/
scene_tabs = memnew(Tabs);
scene_tabs->add_tab("unsaved");
scene_tabs->set_tab_align(Tabs::ALIGN_CENTER);
scene_tabs->set_tab_align(Tabs::ALIGN_LEFT);
scene_tabs->set_tab_close_display_policy((bool(EDITOR_DEF("interface/always_show_close_button_in_scene_tabs", false)) ? Tabs::CLOSE_BUTTON_SHOW_ALWAYS : Tabs::CLOSE_BUTTON_SHOW_ACTIVE_ONLY));
scene_tabs->connect("tab_changed", this, "_scene_tab_changed");
scene_tabs->connect("right_button_pressed", this, "_scene_tab_script_edited");
scene_tabs->connect("tab_close", this, "_scene_tab_closed");
// MarginContainer *st_mc = memnew( MarginContainer );
// st_mc->add_child(scene_tabs);
srt->add_child(scene_tabs);
scene_root_parent = memnew(PanelContainer);
scene_root_parent->set_custom_minimum_size(Size2(0, 80) * EDSCALE);
//Ref<StyleBox> sp = scene_root_parent->get_stylebox("panel","TabContainer");
//scene_root_parent->add_style_override("panel",sp);
// Ref<StyleBox> sp = scene_root_parent->get_stylebox("panel_full","PanelContainer");
// scene_root_parent->add_style_override("panel",sp);
/*scene_root_parent->set_anchor( MARGIN_RIGHT, Control::ANCHOR_END );
scene_root_parent->set_anchor( MARGIN_BOTTOM, Control::ANCHOR_END );
@ -5121,7 +5123,7 @@ EditorNode::EditorNode() {
scene_root_parent->add_child(viewport);
PanelContainer *top_region = memnew(PanelContainer);
top_region->add_style_override("panel", gui_base->get_stylebox("hover", "Button"));
top_region->add_style_override("panel", memnew(StyleBoxEmpty));
HBoxContainer *left_menu_hb = memnew(HBoxContainer);
top_region->add_child(left_menu_hb);
menu_hb->add_child(top_region);
@ -5204,7 +5206,7 @@ EditorNode::EditorNode() {
}
PanelContainer *editor_region = memnew(PanelContainer);
editor_region->add_style_override("panel", gui_base->get_stylebox("hover", "Button"));
editor_region->add_style_override("panel", memnew(StyleBoxEmpty));
main_editor_button_vb = memnew(HBoxContainer);
editor_region->add_child(main_editor_button_vb);
menu_hb->add_child(editor_region);
@ -5271,6 +5273,8 @@ EditorNode::EditorNode() {
//s1->set_size(Point2(10,15));
play_cc = memnew(CenterContainer);
// play_cc->add_style_override("bg",gui_base->get_stylebox("panel","PanelContainer"));
play_cc->set_mouse_filter(Control::MOUSE_FILTER_IGNORE);
gui_base->add_child(play_cc);
play_cc->set_area_as_parent_rect();
@ -5278,7 +5282,7 @@ EditorNode::EditorNode() {
play_cc->set_margin(MARGIN_TOP, 5);
top_region = memnew(PanelContainer);
top_region->add_style_override("panel", gui_base->get_stylebox("hover", "Button"));
top_region->add_style_override("panel", gui_base->get_stylebox("panel", "ButtonGroup"));
play_cc->add_child(top_region);
HBoxContainer *play_hb = memnew(HBoxContainer);
@ -5398,7 +5402,9 @@ EditorNode::EditorNode() {
}
PanelContainer *vu_cont = memnew(PanelContainer);
vu_cont->add_style_override("panel", gui_base->get_stylebox("hover", "Button"));
vu_cont->add_style_override("panel", memnew(StyleBoxEmpty));
// CenterContainer *vu_cont = memnew( CenterContainer );
menu_hb->add_child(vu_cont);
audio_vu = memnew(TextureProgress);
@ -5419,7 +5425,7 @@ EditorNode::EditorNode() {
}
top_region = memnew(PanelContainer);
top_region->add_style_override("panel", gui_base->get_stylebox("hover", "Button"));
top_region->add_style_override("panel", memnew(StyleBoxEmpty));
HBoxContainer *right_menu_hb = memnew(HBoxContainer);
top_region->add_child(right_menu_hb);
menu_hb->add_child(top_region);
@ -5585,7 +5591,7 @@ EditorNode::EditorNode() {
search_button = memnew(ToolButton);
search_button->set_toggle_mode(true);
search_button->set_pressed(false);
search_button->set_icon(gui_base->get_icon("Zoom", "EditorIcons"));
search_button->set_icon(gui_base->get_icon("Search", "EditorIcons"));
prop_editor_hb->add_child(search_button);
search_button->connect("toggled", this, "_toggle_search_bar");

View file

@ -566,7 +566,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
set("editors/grid_map/pick_distance", 5000.0);
set("editors/3d/grid_color", Color(0, 1, 0, 0.2));
set("editors/3d/grid_color", Color(1, 1, 1, 0.2));
hints["editors/3d/grid_color"] = PropertyInfo(Variant::COLOR, "editors/3d/grid_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
set("editors/3d/default_fov", 45.0);

View file

@ -49,11 +49,11 @@ Ref<Theme> create_editor_theme() {
}
focus_sbt->set_draw_center(false);
theme->set_stylebox("EditorFocus", "EditorStyles", focus_sbt);
theme->set_color("prop_category", "Editor", Color::hex(0x3f3a44ff));
theme->set_color("prop_section", "Editor", Color::hex(0x35313aff));
theme->set_color("prop_subsection", "Editor", Color::hex(0x312e37ff));
theme->set_color("fg_selected", "Editor", Color::html("ffbd8e8e"));
theme->set_color("fg_error", "Editor", Color::html("ffbd8e8e"));
// theme->set_color("prop_category","Editor",Color::hex(0x3f3a44ff));
// theme->set_color("prop_section","Editor",Color::hex(0x35313aff));
// theme->set_color("prop_subsection","Editor",Color::hex(0x312e37ff));
// theme->set_color("fg_selected","Editor",Color::html("ffbd8e8e"));
// theme->set_color("fg_error","Editor",Color::html("ffbd8e8e"));
return theme;
}

View file

@ -150,10 +150,11 @@ void FileSystemDock::_notification(int p_what) {
}
button_display_mode->connect("pressed", this, "_change_file_display");
//file_options->set_icon( get_icon("Tools","EditorIcons"));
files->connect("item_activated", this, "_select_file");
button_hist_next->connect("pressed", this, "_fw_history");
button_hist_prev->connect("pressed", this, "_bw_history");
search_icon->set_texture(get_icon("Zoom", "EditorIcons"));
search_icon->set_texture(get_icon("Search", "EditorIcons"));
button_hist_next->set_icon(get_icon("Forward", "EditorIcons"));
button_hist_prev->set_icon(get_icon("Back", "EditorIcons"));
@ -1659,8 +1660,6 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) {
button_reload->set_tooltip(TTR("Re-Scan Filesystem"));
button_reload->hide();
//toolbar_hbc->add_spacer();
button_favorite = memnew(Button);
button_favorite->set_flat(true);
button_favorite->set_toggle_mode(true);

Binary file not shown.

After

Width:  |  Height:  |  Size: 366 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 571 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 B

After

Width:  |  Height:  |  Size: 173 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 471 B

After

Width:  |  Height:  |  Size: 421 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 471 B

After

Width:  |  Height:  |  Size: 421 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 333 B

After

Width:  |  Height:  |  Size: 354 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 308 B

After

Width:  |  Height:  |  Size: 349 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 293 B

After

Width:  |  Height:  |  Size: 382 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 367 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 368 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 565 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 527 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 479 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 769 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 323 B

After

Width:  |  Height:  |  Size: 410 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 267 B

After

Width:  |  Height:  |  Size: 264 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 171 B

After

Width:  |  Height:  |  Size: 422 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 356 B

After

Width:  |  Height:  |  Size: 358 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 728 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1,018 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 396 B

After

Width:  |  Height:  |  Size: 311 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 B

After

Width:  |  Height:  |  Size: 346 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 196 B

After

Width:  |  Height:  |  Size: 242 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 326 B

After

Width:  |  Height:  |  Size: 410 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 698 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 255 B

After

Width:  |  Height:  |  Size: 565 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 257 B

After

Width:  |  Height:  |  Size: 575 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 282 B

After

Width:  |  Height:  |  Size: 549 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 B

After

Width:  |  Height:  |  Size: 560 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 376 B

After

Width:  |  Height:  |  Size: 191 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 353 B

After

Width:  |  Height:  |  Size: 255 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 380 B

After

Width:  |  Height:  |  Size: 244 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 388 B

After

Width:  |  Height:  |  Size: 261 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 795 B

After

Width:  |  Height:  |  Size: 739 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 523 B

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 472 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 391 B

After

Width:  |  Height:  |  Size: 472 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 602 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 247 B

After

Width:  |  Height:  |  Size: 361 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 240 B

After

Width:  |  Height:  |  Size: 406 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 357 B

After

Width:  |  Height:  |  Size: 553 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 346 B

After

Width:  |  Height:  |  Size: 505 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 196 B

After

Width:  |  Height:  |  Size: 242 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 657 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 762 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 704 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 247 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 B

After

Width:  |  Height:  |  Size: 366 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 315 B

After

Width:  |  Height:  |  Size: 320 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 B

After

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 762 B

After

Width:  |  Height:  |  Size: 718 B

BIN
editor/icons/icon_2_d.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 B

BIN
editor/icons/icon_3_d.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 B

After

Width:  |  Height:  |  Size: 151 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 279 B

After

Width:  |  Height:  |  Size: 291 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 279 B

After

Width:  |  Height:  |  Size: 291 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 211 B

After

Width:  |  Height:  |  Size: 269 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 215 B

After

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 223 B

After

Width:  |  Height:  |  Size: 259 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 319 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 292 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 379 B

After

Width:  |  Height:  |  Size: 300 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 443 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 223 B

After

Width:  |  Height:  |  Size: 290 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 180 B

After

Width:  |  Height:  |  Size: 179 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 B

After

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 938 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 267 B

After

Width:  |  Height:  |  Size: 868 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 894 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 248 B

After

Width:  |  Height:  |  Size: 241 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 391 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 659 B

After

Width:  |  Height:  |  Size: 492 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 232 B

After

Width:  |  Height:  |  Size: 202 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 B

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 B

After

Width:  |  Height:  |  Size: 203 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 224 B

After

Width:  |  Height:  |  Size: 292 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 392 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 B

After

Width:  |  Height:  |  Size: 355 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 181 B

After

Width:  |  Height:  |  Size: 358 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 178 B

After

Width:  |  Height:  |  Size: 347 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 B

After

Width:  |  Height:  |  Size: 352 B

Some files were not shown because too many files have changed in this diff Show more