MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / _notification

Method _notification

editor/gui/progress_dialog.cpp:139–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137ProgressDialog *ProgressDialog::singleton = nullptr;
138
139void ProgressDialog::_notification(int p_what) {
140 switch (p_what) {
141 case NOTIFICATION_THEME_CHANGED: {
142 Ref<StyleBox> style = main->get_theme_stylebox(SceneStringName(panel), SNAME("PopupMenu"));
143 main_border_size = style->get_minimum_size();
144 main->set_offset(SIDE_LEFT, style->get_margin(SIDE_LEFT));
145 main->set_offset(SIDE_RIGHT, -style->get_margin(SIDE_RIGHT));
146 main->set_offset(SIDE_TOP, style->get_margin(SIDE_TOP));
147 main->set_offset(SIDE_BOTTOM, -style->get_margin(SIDE_BOTTOM));
148
149 center_panel->add_theme_style_override(SceneStringName(panel), get_theme_stylebox(SceneStringName(panel), "PopupPanel"));
150 } break;
151 }
152}
153
154void ProgressDialog::_update_ui() {
155 // Run main loop for two frames.

Callers

nothing calls this directly

Calls 5

get_theme_styleboxMethod · 0.45
get_minimum_sizeMethod · 0.45
set_offsetMethod · 0.45
get_marginMethod · 0.45

Tested by

no test coverage detected