mirror of
https://github.com/godotengine/godot.git
synced 2025-11-02 06:31:13 +00:00
Added status bar and toggle scripts panel button to EditorHelp/VScripts
This commit is contained in:
parent
3705ad7d8f
commit
1dda47c280
11 changed files with 88 additions and 18 deletions
|
|
@ -1657,11 +1657,8 @@ void CodeTextEditor::_set_show_warnings_panel(bool p_show) {
|
|||
}
|
||||
|
||||
void CodeTextEditor::_toggle_scripts_pressed() {
|
||||
if (is_layout_rtl()) {
|
||||
toggle_scripts_button->set_icon(ScriptEditor::get_singleton()->toggle_scripts_panel() ? get_theme_icon(SNAME("Forward"), SNAME("EditorIcons")) : get_theme_icon(SNAME("Back"), SNAME("EditorIcons")));
|
||||
} else {
|
||||
toggle_scripts_button->set_icon(ScriptEditor::get_singleton()->toggle_scripts_panel() ? get_theme_icon(SNAME("Back"), SNAME("EditorIcons")) : get_theme_icon(SNAME("Forward"), SNAME("EditorIcons")));
|
||||
}
|
||||
ScriptEditor::get_singleton()->toggle_scripts_panel();
|
||||
update_toggle_scripts_button();
|
||||
}
|
||||
|
||||
void CodeTextEditor::_error_pressed(const Ref<InputEvent> &p_event) {
|
||||
|
|
@ -1791,11 +1788,11 @@ void CodeTextEditor::show_toggle_scripts_button() {
|
|||
|
||||
void CodeTextEditor::update_toggle_scripts_button() {
|
||||
if (is_layout_rtl()) {
|
||||
toggle_scripts_button->set_icon(ScriptEditor::get_singleton()->is_scripts_panel_toggled() ? get_theme_icon(SNAME("Forward"), SNAME("EditorIcons")) : get_theme_icon(SNAME("Back"), SNAME("EditorIcons")));
|
||||
toggle_scripts_button->set_icon(get_theme_icon(ScriptEditor::get_singleton()->is_scripts_panel_toggled() ? SNAME("Forward") : SNAME("Back"), SNAME("EditorIcons")));
|
||||
} else {
|
||||
toggle_scripts_button->set_icon(ScriptEditor::get_singleton()->is_scripts_panel_toggled() ? get_theme_icon(SNAME("Back"), SNAME("EditorIcons")) : get_theme_icon(SNAME("Forward"), SNAME("EditorIcons")));
|
||||
toggle_scripts_button->set_icon(get_theme_icon(ScriptEditor::get_singleton()->is_scripts_panel_toggled() ? SNAME("Back") : SNAME("Forward"), SNAME("EditorIcons")));
|
||||
}
|
||||
toggle_scripts_button->set_tooltip(TTR("Toggle Scripts Panel") + " (" + ED_GET_SHORTCUT("script_editor/toggle_scripts_panel")->get_as_text() + ")");
|
||||
toggle_scripts_button->set_tooltip(vformat("%s (%s)", TTR("Toggle Scripts Panel"), ED_GET_SHORTCUT("script_editor/toggle_scripts_panel")->get_as_text()));
|
||||
}
|
||||
|
||||
CodeTextEditor::CodeTextEditor() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue