Merge pull request #62405 from YeldhamDev/movie_maker_stuff
Clean and fix the Movie Maker button
This commit is contained in:
commit
d479eba7b4
3 changed files with 12 additions and 29 deletions
|
@ -2332,6 +2332,13 @@ void EditorNode::_run(bool p_current, const String &p_custom) {
|
|||
return;
|
||||
}
|
||||
|
||||
play_button->set_pressed(false);
|
||||
play_button->set_icon(gui_base->get_theme_icon(SNAME("MainPlay"), SNAME("EditorIcons")));
|
||||
play_scene_button->set_pressed(false);
|
||||
play_scene_button->set_icon(gui_base->get_theme_icon(SNAME("PlayScene"), SNAME("EditorIcons")));
|
||||
play_custom_scene_button->set_pressed(false);
|
||||
play_custom_scene_button->set_icon(gui_base->get_theme_icon(SNAME("PlayCustom"), SNAME("EditorIcons")));
|
||||
|
||||
String write_movie_file;
|
||||
if (write_movie_button->is_pressed()) {
|
||||
if (p_current && get_tree()->get_edited_scene_root() && get_tree()->get_edited_scene_root()->has_meta("movie_file")) {
|
||||
|
@ -2346,13 +2353,6 @@ void EditorNode::_run(bool p_current, const String &p_custom) {
|
|||
}
|
||||
}
|
||||
|
||||
play_button->set_pressed(false);
|
||||
play_button->set_icon(gui_base->get_theme_icon(SNAME("MainPlay"), SNAME("EditorIcons")));
|
||||
play_scene_button->set_pressed(false);
|
||||
play_scene_button->set_icon(gui_base->get_theme_icon(SNAME("PlayScene"), SNAME("EditorIcons")));
|
||||
play_custom_scene_button->set_pressed(false);
|
||||
play_custom_scene_button->set_icon(gui_base->get_theme_icon(SNAME("PlayCustom"), SNAME("EditorIcons")));
|
||||
|
||||
String run_filename;
|
||||
|
||||
if (p_current || (editor_data.get_edited_scene_root() && !p_custom.is_empty() && p_custom == editor_data.get_edited_scene_root()->get_scene_file_path())) {
|
||||
|
@ -2792,9 +2792,6 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
|
|||
case RUN_SETTINGS: {
|
||||
project_settings_editor->popup_project_settings();
|
||||
} break;
|
||||
case RUN_WRITE_MOVIE: {
|
||||
_update_write_movie_icon();
|
||||
} break;
|
||||
case FILE_INSTALL_ANDROID_SOURCE: {
|
||||
if (p_confirmed) {
|
||||
export_template_manager->install_android_template();
|
||||
|
@ -4956,14 +4953,6 @@ String EditorNode::get_run_playing_scene() const {
|
|||
return run_filename;
|
||||
}
|
||||
|
||||
void EditorNode::_update_write_movie_icon() {
|
||||
if (write_movie_button->is_pressed()) {
|
||||
write_movie_button->set_icon(gui_base->get_theme_icon(SNAME("MainMovieWriteEnabled"), SNAME("EditorIcons")));
|
||||
} else {
|
||||
write_movie_button->set_icon(gui_base->get_theme_icon(SNAME("MainMovieWrite"), SNAME("EditorIcons")));
|
||||
}
|
||||
}
|
||||
|
||||
void EditorNode::_immediate_dialog_confirmed() {
|
||||
immediate_dialog_confirmed = true;
|
||||
}
|
||||
|
@ -6732,15 +6721,12 @@ EditorNode::EditorNode() {
|
|||
write_movie_button->set_pressed(false);
|
||||
write_movie_button->set_icon(gui_base->get_theme_icon(SNAME("MainMovieWrite"), SNAME("EditorIcons")));
|
||||
write_movie_button->set_focus_mode(Control::FOCUS_NONE);
|
||||
write_movie_button->connect("pressed", callable_mp(this, &EditorNode::_menu_option), make_binds(RUN_WRITE_MOVIE));
|
||||
write_movie_button->set_tooltip(TTR("Enable Movie Maker mode.\nThe project will run at stable FPS and the visual and audio output will be recorded to a video file."));
|
||||
// Restore these values to something more useful so it ignores the theme
|
||||
write_movie_button->add_theme_color_override("icon_normal_color", Color(1, 1, 1, 0.4));
|
||||
write_movie_button->add_theme_color_override("icon_pressed_color", Color(1, 1, 1, 1));
|
||||
write_movie_button->add_theme_color_override("icon_hover_color", Color(1.2, 1.2, 1.2, 0.4));
|
||||
write_movie_button->add_theme_color_override("icon_hover_pressed_color", Color(1.2, 1.2, 1.2, 1));
|
||||
write_movie_button->add_theme_color_override("icon_focus_color", Color(1, 1, 1, 1));
|
||||
write_movie_button->add_theme_color_override("icon_disabled_color", Color(1, 1, 1, 0.4));
|
||||
|
||||
// This button behaves differently, so color it as such.
|
||||
write_movie_button->add_theme_color_override("icon_normal_color", Color(1, 1, 1, 0.7));
|
||||
write_movie_button->add_theme_color_override("icon_pressed_color", gui_base->get_theme_color(SNAME("error_color"), SNAME("Editor")));
|
||||
write_movie_button->add_theme_color_override("icon_hover_color", Color(1, 1, 1, 0.9));
|
||||
|
||||
HBoxContainer *right_menu_hb = memnew(HBoxContainer);
|
||||
menu_hb->add_child(right_menu_hb);
|
||||
|
|
|
@ -173,7 +173,6 @@ private:
|
|||
RUN_PLAY_CUSTOM_SCENE,
|
||||
RUN_SETTINGS,
|
||||
RUN_USER_DATA_FOLDER,
|
||||
RUN_WRITE_MOVIE,
|
||||
RELOAD_CURRENT_PROJECT,
|
||||
RUN_PROJECT_MANAGER,
|
||||
RUN_VCS_METADATA,
|
||||
|
@ -669,7 +668,6 @@ private:
|
|||
void _pick_main_scene_custom_action(const String &p_custom_action_name);
|
||||
|
||||
void _immediate_dialog_confirmed();
|
||||
void _update_write_movie_icon();
|
||||
void _select_default_main_screen_plugin();
|
||||
|
||||
void _bottom_panel_switch(bool p_enable, int p_idx);
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
<svg height="16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M8 2a6 6 0 0 0-6 6 6 6 0 0 0 6 6 6 6 0 0 0 4-1.535V14h.002a2 2 0 0 0 .266 1A2 2 0 0 0 14 16h1v-2h-.5a.5.5 0 0 1-.5-.5V8a6 6 0 0 0-6-6zm0 1a1 1 0 0 1 1 1 1 1 0 0 1-1 1 1 1 0 0 1-1-1 1 1 0 0 1 1-1zm3.441 2a1 1 0 0 1 .89.5 1 1 0 0 1-.366 1.365 1 1 0 0 1-1.367-.365 1 1 0 0 1 .367-1.365A1 1 0 0 1 11.44 5zm-6.953.002a1 1 0 0 1 .547.133A1 1 0 0 1 5.402 6.5a1 1 0 0 1-1.367.365A1 1 0 0 1 3.67 5.5a1 1 0 0 1 .818-.498zM4.512 9a1 1 0 0 1 .89.5 1 1 0 0 1-.367 1.365A1 1 0 0 1 3.67 10.5a1 1 0 0 1 .365-1.365A1 1 0 0 1 4.512 9zm6.904.002a1 1 0 0 1 .549.133 1 1 0 0 1 .365 1.365 1 1 0 0 1-1.365.365 1 1 0 0 1-.367-1.365 1 1 0 0 1 .818-.498zM8 11a1 1 0 0 1 1 1 1 1 0 0 1-1 1 1 1 0 0 1-1-1 1 1 0 0 1 1-1z" fill="#e0e0e0" style="fill:#ee5353;fill-opacity:1"/></svg>
|
Before Width: | Height: | Size: 823 B |
Loading…
Reference in a new issue