diff options
-rw-r--r-- | core/bind/core_bind.cpp | 6 | ||||
-rw-r--r-- | core/bind/core_bind.h | 6 | ||||
-rw-r--r-- | core/os/os.h | 6 | ||||
-rw-r--r-- | drivers/gles3/shaders/tonemap.glsl | 2 | ||||
-rw-r--r-- | editor/editor_settings.cpp | 1 | ||||
-rw-r--r-- | editor/editor_themes.cpp | 16 | ||||
-rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 6 | ||||
-rw-r--r-- | editor/plugins/script_text_editor.cpp | 9 | ||||
-rw-r--r-- | platform/haiku/os_haiku.h | 4 | ||||
-rw-r--r-- | platform/javascript/os_javascript.cpp | 2 | ||||
-rw-r--r-- | platform/javascript/os_javascript.h | 2 | ||||
-rw-r--r-- | platform/osx/os_osx.h | 6 | ||||
-rw-r--r-- | platform/osx/os_osx.mm | 12 | ||||
-rw-r--r-- | platform/windows/os_windows.cpp | 6 | ||||
-rw-r--r-- | platform/windows/os_windows.h | 6 | ||||
-rw-r--r-- | platform/x11/os_x11.cpp | 11 | ||||
-rw-r--r-- | platform/x11/os_x11.h | 6 | ||||
-rw-r--r-- | scene/2d/parallax_layer.cpp | 6 | ||||
-rw-r--r-- | scene/resources/style_box.cpp | 38 | ||||
-rw-r--r-- | scene/resources/style_box.h | 4 |
20 files changed, 110 insertions, 45 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index c69fe17049..5f534f63a8 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -978,9 +978,9 @@ void _OS::_bind_methods() { ClassDB::bind_method(D_METHOD("get_screen_count"), &_OS::get_screen_count); ClassDB::bind_method(D_METHOD("get_current_screen"), &_OS::get_current_screen); ClassDB::bind_method(D_METHOD("set_current_screen", "screen"), &_OS::set_current_screen); - ClassDB::bind_method(D_METHOD("get_screen_position", "screen"), &_OS::get_screen_position, DEFVAL(0)); - ClassDB::bind_method(D_METHOD("get_screen_size", "screen"), &_OS::get_screen_size, DEFVAL(0)); - ClassDB::bind_method(D_METHOD("get_screen_dpi", "screen"), &_OS::get_screen_dpi, DEFVAL(0)); + ClassDB::bind_method(D_METHOD("get_screen_position", "screen"), &_OS::get_screen_position, DEFVAL(-1)); + ClassDB::bind_method(D_METHOD("get_screen_size", "screen"), &_OS::get_screen_size, DEFVAL(-1)); + ClassDB::bind_method(D_METHOD("get_screen_dpi", "screen"), &_OS::get_screen_dpi, DEFVAL(-1)); ClassDB::bind_method(D_METHOD("get_window_position"), &_OS::get_window_position); ClassDB::bind_method(D_METHOD("set_window_position", "position"), &_OS::set_window_position); ClassDB::bind_method(D_METHOD("get_window_size"), &_OS::get_window_size); diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h index 41653c8846..fc280bd7ef 100644 --- a/core/bind/core_bind.h +++ b/core/bind/core_bind.h @@ -140,9 +140,9 @@ public: virtual int get_screen_count() const; virtual int get_current_screen() const; virtual void set_current_screen(int p_screen); - virtual Point2 get_screen_position(int p_screen = 0) const; - virtual Size2 get_screen_size(int p_screen = 0) const; - virtual int get_screen_dpi(int p_screen = 0) const; + virtual Point2 get_screen_position(int p_screen = -1) const; + virtual Size2 get_screen_size(int p_screen = -1) const; + virtual int get_screen_dpi(int p_screen = -1) const; virtual Point2 get_window_position() const; virtual void set_window_position(const Point2 &p_position); virtual Size2 get_window_size() const; diff --git a/core/os/os.h b/core/os/os.h index 4d64e4a9f0..0fcf465655 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -164,9 +164,9 @@ public: virtual int get_screen_count() const { return 1; } virtual int get_current_screen() const { return 0; } virtual void set_current_screen(int p_screen) {} - virtual Point2 get_screen_position(int p_screen = 0) const { return Point2(); } - virtual Size2 get_screen_size(int p_screen = 0) const { return get_window_size(); } - virtual int get_screen_dpi(int p_screen = 0) const { return 72; } + virtual Point2 get_screen_position(int p_screen = -1) const { return Point2(); } + virtual Size2 get_screen_size(int p_screen = -1) const { return get_window_size(); } + virtual int get_screen_dpi(int p_screen = -1) const { return 72; } virtual Point2 get_window_position() const { return Vector2(); } virtual void set_window_position(const Point2 &p_position) {} virtual Size2 get_window_size() const = 0; diff --git a/drivers/gles3/shaders/tonemap.glsl b/drivers/gles3/shaders/tonemap.glsl index 988e31d1ea..73dec4f90c 100644 --- a/drivers/gles3/shaders/tonemap.glsl +++ b/drivers/gles3/shaders/tonemap.glsl @@ -170,7 +170,7 @@ vec3 tonemap_aces(vec3 color) { return color = clamp((color*(a*color+b))/(color*(c*color+d)+e),vec3(0.0),vec3(1.0)); } -vec3 tonemap_reindhart(vec3 color,vec3 white) { +vec3 tonemap_reindhart(vec3 color,float white) { return ( color * ( 1.0 + ( color / ( white) ) ) ) / ( 1.0 + color ); } diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index 5c8e166730..358d575764 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -593,6 +593,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { hints["text_editor/theme/color_theme"] = PropertyInfo(Variant::STRING, "text_editor/theme/color_theme", PROPERTY_HINT_ENUM, "Default"); set("text_editor/theme/line_spacing", 4); + set("text_editor/theme/adapted_code_editor_background_color", true); _load_default_text_editor_theme(); diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 9f6416f4e6..4f1e6c1771 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -86,19 +86,6 @@ static Ref<StyleBoxFlat> change_border_color(Ref<StyleBoxFlat> p_style, Color p_ return style; } -static Ref<StyleBoxFlat> add_additional_border(Ref<StyleBoxFlat> p_style, int p_left, int p_top, int p_right, int p_bottom) { - Ref<StyleBoxFlat> style = p_style->duplicate(); - style->set_border_width(MARGIN_LEFT, p_left * EDSCALE + style->get_border_width(MARGIN_LEFT)); - style->set_border_width(MARGIN_RIGHT, p_right * EDSCALE + style->get_border_width(MARGIN_RIGHT)); - style->set_border_width(MARGIN_TOP, p_top * EDSCALE + style->get_border_width(MARGIN_TOP)); - style->set_border_width(MARGIN_BOTTOM, p_bottom * EDSCALE + style->get_border_width(MARGIN_BOTTOM)); - style->set_expand_margin_size(MARGIN_LEFT, p_left * EDSCALE); - style->set_expand_margin_size(MARGIN_RIGHT, p_right * EDSCALE); - style->set_expand_margin_size(MARGIN_TOP, p_top * EDSCALE); - style->set_expand_margin_size(MARGIN_BOTTOM, p_bottom * EDSCALE); - return style; -} - #define HIGHLIGHT_COLOR_LIGHT highlight_color.linear_interpolate(Color(1, 1, 1, 1), 0.3) #define HIGHLIGHT_COLOR_DARK highlight_color.linear_interpolate(Color(0, 0, 0, 1), 0.5) @@ -537,7 +524,8 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { // PopupPanel Ref<StyleBoxFlat> style_dock_select = make_flat_stylebox(base_color); style_dock_select->set_border_color_all(light_color_1); - style_dock_select = add_additional_border(style_dock_select, 2, 2, 2, 2); + style_dock_select->set_expand_margin_size_all(2); + style_dock_select->set_border_width_all(2); theme->set_stylebox("panel", "PopupPanel", style_dock_select); // SpinBox diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 6db732ba5d..e8770febd9 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -2072,7 +2072,10 @@ void ScriptEditor::_update_selected_editor_menu() { } } - EditorHelp *eh = tab_container->get_current_tab_control()->cast_to<EditorHelp>(); + EditorHelp *eh = NULL; + if (tab_container->get_current_tab_control()) + eh = tab_container->get_current_tab_control()->cast_to<EditorHelp>(); + if (eh) { script_search_menu->show(); } else { @@ -2349,7 +2352,6 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) { debug_menu = memnew(MenuButton); menu_hb->add_child(debug_menu); debug_menu->set_text(TTR("Debug")); - debug_menu->get_popup()->add_separator(); debug_menu->get_popup()->add_shortcut(ED_SHORTCUT("debugger/step_over", TTR("Step Over"), KEY_F10), DEBUG_NEXT); debug_menu->get_popup()->add_shortcut(ED_SHORTCUT("debugger/step_into", TTR("Step Into"), KEY_F11), DEBUG_STEP); debug_menu->get_popup()->add_separator(); diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index 1a3092b6e4..19de027287 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -75,9 +75,14 @@ void ScriptTextEditor::_load_theme_settings() { text_edit->clear_colors(); - /* keyword color */ + /* color from color_theme or from editor color */ + + Color background_color = EDITOR_DEF("text_editor/highlighting/background_color", Color(0, 0, 0, 0)); + if (EDITOR_DEF("text_editor/theme/adapted_code_editor_background_color", false)) + background_color = get_color("dark_color_1", "Editor"); - text_edit->add_color_override("background_color", EDITOR_DEF("text_editor/highlighting/background_color", Color(0, 0, 0, 0))); + /* keyword color */ + text_edit->add_color_override("background_color", background_color); text_edit->add_color_override("completion_background_color", EDITOR_DEF("text_editor/highlighting/completion_background_color", Color(0, 0, 0, 0))); text_edit->add_color_override("completion_selected_color", EDITOR_DEF("text_editor/highlighting/completion_selected_color", Color::html("434244"))); text_edit->add_color_override("completion_existing_color", EDITOR_DEF("text_editor/highlighting/completion_existing_color", Color::html("21dfdfdf"))); diff --git a/platform/haiku/os_haiku.h b/platform/haiku/os_haiku.h index 256c9eecf7..4440f2843d 100644 --- a/platform/haiku/os_haiku.h +++ b/platform/haiku/os_haiku.h @@ -96,8 +96,8 @@ public: virtual int get_screen_count() const; virtual int get_current_screen() const; virtual void set_current_screen(int p_screen); - virtual Point2 get_screen_position(int p_screen = 0) const; - virtual Size2 get_screen_size(int p_screen = 0) const; + virtual Point2 get_screen_position(int p_screen = -1) const; + virtual Size2 get_screen_size(int p_screen = -1) const; virtual void set_window_title(const String &p_title); virtual Size2 get_window_size() const; virtual void set_window_size(const Size2 p_size); diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp index d339baf024..f49acb04de 100644 --- a/platform/javascript/os_javascript.cpp +++ b/platform/javascript/os_javascript.cpp @@ -687,8 +687,6 @@ OS::VideoMode OS_JavaScript::get_video_mode(int p_screen) const { Size2 OS_JavaScript::get_screen_size(int p_screen) const { - ERR_FAIL_COND_V(p_screen != 0, Size2()); - EmscriptenFullscreenChangeEvent ev; EMSCRIPTEN_RESULT result = emscripten_get_fullscreen_status(&ev); ERR_FAIL_COND_V(result != EMSCRIPTEN_RESULT_SUCCESS, Size2()); diff --git a/platform/javascript/os_javascript.h b/platform/javascript/os_javascript.h index 13c500b3dc..ff484204c7 100644 --- a/platform/javascript/os_javascript.h +++ b/platform/javascript/os_javascript.h @@ -124,7 +124,7 @@ public: virtual VideoMode get_video_mode(int p_screen = 0) const; virtual void get_fullscreen_mode_list(List<VideoMode> *p_list, int p_screen = 0) const; - virtual Size2 get_screen_size(int p_screen = 0) const; + virtual Size2 get_screen_size(int p_screen = -1) const; virtual void set_window_size(const Size2); virtual Size2 get_window_size() const; diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h index 56e6802eeb..827114cd2b 100644 --- a/platform/osx/os_osx.h +++ b/platform/osx/os_osx.h @@ -187,9 +187,9 @@ public: virtual int get_screen_count() const; virtual int get_current_screen() const; virtual void set_current_screen(int p_screen); - virtual Point2 get_screen_position(int p_screen = 0) const; - virtual Size2 get_screen_size(int p_screen = 0) const; - virtual int get_screen_dpi(int p_screen = 0) const; + virtual Point2 get_screen_position(int p_screen = -1) const; + virtual Size2 get_screen_size(int p_screen = -1) const; + virtual int get_screen_dpi(int p_screen = -1) const; virtual Point2 get_window_position() const; virtual void set_window_position(const Point2 &p_position); diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index 34f1a93f3b..a0fc53d517 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -1433,6 +1433,10 @@ void OS_OSX::set_current_screen(int p_screen) { }; Point2 OS_OSX::get_screen_position(int p_screen) const { + if (p_screen == -1) { + p_screen = get_current_screen(); + } + NSArray *screenArray = [NSScreen screens]; if (p_screen < [screenArray count]) { float displayScale = 1.0; @@ -1449,6 +1453,10 @@ Point2 OS_OSX::get_screen_position(int p_screen) const { } int OS_OSX::get_screen_dpi(int p_screen) const { + if (p_screen == -1) { + p_screen = get_current_screen(); + } + NSArray *screenArray = [NSScreen screens]; if (p_screen < [screenArray count]) { float displayScale = 1.0; @@ -1469,6 +1477,10 @@ int OS_OSX::get_screen_dpi(int p_screen) const { } Size2 OS_OSX::get_screen_size(int p_screen) const { + if (p_screen == -1) { + p_screen = get_current_screen(); + } + NSArray *screenArray = [NSScreen screens]; if (p_screen < [screenArray count]) { float displayScale = 1.0; diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 2e908b82ab..db453a5f46 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -1384,7 +1384,7 @@ static BOOL CALLBACK _MonitorEnumProcPos(HMONITOR hMonitor, HDC hdcMonitor, LPRE Point2 OS_Windows::get_screen_position(int p_screen) const { - EnumPosData data = { 0, p_screen, Point2() }; + EnumPosData data = { 0, p_screen == -1 ? get_current_screen() : p_screen, Point2() }; EnumDisplayMonitors(NULL, NULL, _MonitorEnumProcPos, (LPARAM)&data); return data.pos; } @@ -1409,7 +1409,7 @@ static BOOL CALLBACK _MonitorEnumProcSize(HMONITOR hMonitor, HDC hdcMonitor, LPR Size2 OS_Windows::get_screen_size(int p_screen) const { - EnumSizeData data = { 0, p_screen, Size2() }; + EnumSizeData data = { 0, p_screen == -1 ? get_current_screen() : p_screen, Size2() }; EnumDisplayMonitors(NULL, NULL, _MonitorEnumProcSize, (LPARAM)&data); return data.size; } @@ -1433,7 +1433,7 @@ static BOOL CALLBACK _MonitorEnumProcDpi(HMONITOR hMonitor, HDC hdcMonitor, LPRE int OS_Windows::get_screen_dpi(int p_screen) const { - EnumDpiData data = { 0, p_screen, 72 }; + EnumDpiData data = { 0, p_screen == -1 ? get_current_screen() : p_screen, 72 }; EnumDisplayMonitors(NULL, NULL, _MonitorEnumProcDpi, (LPARAM)&data); return data.dpi; } diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h index e9af14f11c..deb1ae0982 100644 --- a/platform/windows/os_windows.h +++ b/platform/windows/os_windows.h @@ -194,9 +194,9 @@ public: virtual int get_screen_count() const; virtual int get_current_screen() const; virtual void set_current_screen(int p_screen); - virtual Point2 get_screen_position(int p_screen = 0) const; - virtual Size2 get_screen_size(int p_screen = 0) const; - virtual int get_screen_dpi(int p_screen = 0) const; + virtual Point2 get_screen_position(int p_screen = -1) const; + virtual Size2 get_screen_size(int p_screen = -1) const; + virtual int get_screen_dpi(int p_screen = -1) const; virtual Point2 get_window_position() const; virtual void set_window_position(const Point2 &p_position); diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index 8b4253c72c..dbc3914410 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -761,6 +761,10 @@ void OS_X11::set_current_screen(int p_screen) { } Point2 OS_X11::get_screen_position(int p_screen) const { + if (p_screen == -1) { + p_screen = get_current_screen(); + } + // Using Xinerama Extension int event_base, error_base; const Bool ext_okay = XineramaQueryExtension(x11_display, &event_base, &error_base); @@ -782,6 +786,10 @@ Point2 OS_X11::get_screen_position(int p_screen) const { } Size2 OS_X11::get_screen_size(int p_screen) const { + if (p_screen == -1) { + p_screen = get_current_screen(); + } + // Using Xinerama Extension int event_base, error_base; const Bool ext_okay = XineramaQueryExtension(x11_display, &event_base, &error_base); @@ -797,6 +805,9 @@ Size2 OS_X11::get_screen_size(int p_screen) const { } int OS_X11::get_screen_dpi(int p_screen) const { + if (p_screen == -1) { + p_screen = get_current_screen(); + } //invalid screen? ERR_FAIL_INDEX_V(p_screen, get_screen_count(), 0); diff --git a/platform/x11/os_x11.h b/platform/x11/os_x11.h index db70f8f84a..497ce1dde2 100644 --- a/platform/x11/os_x11.h +++ b/platform/x11/os_x11.h @@ -233,9 +233,9 @@ public: virtual int get_screen_count() const; virtual int get_current_screen() const; virtual void set_current_screen(int p_screen); - virtual Point2 get_screen_position(int p_screen = 0) const; - virtual Size2 get_screen_size(int p_screen = 0) const; - virtual int get_screen_dpi(int p_screen = 0) const; + virtual Point2 get_screen_position(int p_screen = -1) const; + virtual Size2 get_screen_size(int p_screen = -1) const; + virtual int get_screen_dpi(int p_screen = -1) const; virtual Point2 get_window_position() const; virtual void set_window_position(const Point2 &p_position); virtual Size2 get_window_size() const; diff --git a/scene/2d/parallax_layer.cpp b/scene/2d/parallax_layer.cpp index a5a59252a9..4b62d70648 100644 --- a/scene/2d/parallax_layer.cpp +++ b/scene/2d/parallax_layer.cpp @@ -34,6 +34,9 @@ void ParallaxLayer::set_motion_scale(const Size2 &p_scale) { + if (!get_parent()) + return; + motion_scale = p_scale; ParallaxBackground *pb = get_parent()->cast_to<ParallaxBackground>(); @@ -51,6 +54,9 @@ Size2 ParallaxLayer::get_motion_scale() const { void ParallaxLayer::set_motion_offset(const Size2 &p_offset) { + if (!get_parent()) + return; + motion_offset = p_offset; ParallaxBackground *pb = get_parent()->cast_to<ParallaxBackground>(); diff --git a/scene/resources/style_box.cpp b/scene/resources/style_box.cpp index 9309cef89f..3100aab8ad 100644 --- a/scene/resources/style_box.cpp +++ b/scene/resources/style_box.cpp @@ -191,6 +191,22 @@ void StyleBoxTexture::set_expand_margin_size(Margin p_expand_margin, float p_siz emit_changed(); } +void StyleBoxTexture::set_expand_margin_size_individual(float p_left, float p_top, float p_right, float p_bottom) { + expand_margin[MARGIN_LEFT] = p_left; + expand_margin[MARGIN_TOP] = p_top; + expand_margin[MARGIN_RIGHT] = p_right; + expand_margin[MARGIN_BOTTOM] = p_bottom; + emit_changed(); +} + +void StyleBoxTexture::set_expand_margin_size_all(float p_expand_margin_size) { + for (int i = 0; i < 4; i++) { + + expand_margin[i] = p_expand_margin_size; + } + emit_changed(); +} + float StyleBoxTexture::get_expand_margin_size(Margin p_expand_margin) const { ERR_FAIL_INDEX_V(p_expand_margin, 4, 0); @@ -257,6 +273,8 @@ void StyleBoxTexture::_bind_methods() { ClassDB::bind_method(D_METHOD("get_margin_size", "margin"), &StyleBoxTexture::get_margin_size); ClassDB::bind_method(D_METHOD("set_expand_margin_size", "margin", "size"), &StyleBoxTexture::set_expand_margin_size); + ClassDB::bind_method(D_METHOD("set_expand_margin_all", "size"), &StyleBoxFlat::set_expand_margin_size_all); + ClassDB::bind_method(D_METHOD("set_expand_margin_individual", "size_left", "size_top", "size_right", "size_bottom"), &StyleBoxFlat::set_expand_margin_size_individual); ClassDB::bind_method(D_METHOD("get_expand_margin_size", "margin"), &StyleBoxTexture::get_expand_margin_size); ClassDB::bind_method(D_METHOD("set_region_rect", "region"), &StyleBoxTexture::set_region_rect); @@ -421,7 +439,25 @@ void StyleBoxFlat::set_expand_margin_size(Margin p_expand_margin, float p_size) expand_margin[p_expand_margin] = p_size; emit_changed(); } + +void StyleBoxFlat::set_expand_margin_size_individual(float p_left, float p_top, float p_right, float p_bottom) { + expand_margin[MARGIN_LEFT] = p_left; + expand_margin[MARGIN_TOP] = p_top; + expand_margin[MARGIN_RIGHT] = p_right; + expand_margin[MARGIN_BOTTOM] = p_bottom; + emit_changed(); +} + +void StyleBoxFlat::set_expand_margin_size_all(float p_expand_margin_size) { + for (int i = 0; i < 4; i++) { + + expand_margin[i] = p_expand_margin_size; + } + emit_changed(); +} + float StyleBoxFlat::get_expand_margin_size(Margin p_expand_margin) const { + return expand_margin[p_expand_margin]; } void StyleBoxFlat::set_filled(bool p_filled) { @@ -736,6 +772,8 @@ void StyleBoxFlat::_bind_methods() { ClassDB::bind_method(D_METHOD("get_corner_radius", "corner"), &StyleBoxFlat::get_corner_radius); ClassDB::bind_method(D_METHOD("set_expand_margin", "margin", "size"), &StyleBoxFlat::set_expand_margin_size); + ClassDB::bind_method(D_METHOD("set_expand_margin_all", "size"), &StyleBoxFlat::set_expand_margin_size_all); + ClassDB::bind_method(D_METHOD("set_expand_margin_individual", "size_left", "size_top", "size_right", "size_bottom"), &StyleBoxFlat::set_expand_margin_size_individual); ClassDB::bind_method(D_METHOD("get_expand_margin", "margin"), &StyleBoxFlat::get_expand_margin_size); ClassDB::bind_method(D_METHOD("set_filled", "filled"), &StyleBoxFlat::set_filled); diff --git a/scene/resources/style_box.h b/scene/resources/style_box.h index a750fae753..30eb9543e8 100644 --- a/scene/resources/style_box.h +++ b/scene/resources/style_box.h @@ -101,6 +101,8 @@ protected: public: void set_expand_margin_size(Margin p_expand_margin, float p_size); + void set_expand_margin_size_all(float p_expand_margin_size); + void set_expand_margin_size_individual(float p_left, float p_top, float p_right, float p_bottom); float get_expand_margin_size(Margin p_expand_margin) const; void set_margin_size(Margin p_margin, float p_size); @@ -196,6 +198,8 @@ public: //EXPANDS void set_expand_margin_size(Margin p_expand_margin, float p_size); + void set_expand_margin_size_all(float p_expand_margin_size); + void set_expand_margin_size_individual(float p_left, float p_top, float p_right, float p_bottom); float get_expand_margin_size(Margin p_expand_margin) const; //FILLED |