Working multiple window support, including editor
This commit is contained in:
parent
f51fdc6eef
commit
4758057f20
105 changed files with 1956 additions and 1742 deletions
|
|
@ -37,20 +37,23 @@
|
|||
#include "core/version.h"
|
||||
#include "core/version_hash.gen.h"
|
||||
|
||||
void EditorAbout::_theme_changed() {
|
||||
|
||||
Control *base = EditorNode::get_singleton()->get_gui_base();
|
||||
Ref<Font> font = base->get_font("source", "EditorFonts");
|
||||
_tpl_text->add_font_override("normal_font", font);
|
||||
_tpl_text->add_constant_override("line_separation", 6 * EDSCALE);
|
||||
_license_text->add_font_override("normal_font", font);
|
||||
_license_text->add_constant_override("line_separation", 6 * EDSCALE);
|
||||
_logo->set_texture(base->get_icon("Logo", "EditorIcons"));
|
||||
}
|
||||
|
||||
void EditorAbout::_notification(int p_what) {
|
||||
|
||||
switch (p_what) {
|
||||
|
||||
case NOTIFICATION_ENTER_TREE:
|
||||
case NOTIFICATION_THEME_CHANGED: {
|
||||
|
||||
Control *base = EditorNode::get_singleton()->get_gui_base();
|
||||
Ref<Font> font = base->get_font("source", "EditorFonts");
|
||||
_tpl_text->add_font_override("normal_font", font);
|
||||
_tpl_text->add_constant_override("line_separation", 6 * EDSCALE);
|
||||
_license_text->add_font_override("normal_font", font);
|
||||
_license_text->add_constant_override("line_separation", 6 * EDSCALE);
|
||||
_logo->set_texture(base->get_icon("Logo", "EditorIcons"));
|
||||
case NOTIFICATION_ENTER_TREE: {
|
||||
_theme_changed();
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
|
@ -115,9 +118,9 @@ EditorAbout::EditorAbout() {
|
|||
|
||||
set_title(TTR("Thanks from the Godot community!"));
|
||||
set_hide_on_ok(true);
|
||||
set_resizable(true);
|
||||
|
||||
VBoxContainer *vbc = memnew(VBoxContainer);
|
||||
vbc->connect("theme_changed", callable_mp(this, &EditorAbout::_theme_changed));
|
||||
HBoxContainer *hbc = memnew(HBoxContainer);
|
||||
hbc->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
hbc->set_alignment(BoxContainer::ALIGN_CENTER);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue