diff options
| author | Juan Linietsky | 2018-05-17 18:02:16 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2018-05-17 18:03:05 -0300 |
| commit | 4b5227ff7755aa19aa57452c49e9466252fcb4a0 (patch) | |
| tree | 2adcced443c368d5d2ad2c71e2fae631af1e2411 /scene/resources | |
| parent | 3183375135e7e9d7bdab2b318dd74f672ebda27d (diff) | |
| download | godot-4b5227ff7755aa19aa57452c49e9466252fcb4a0.tar.gz godot-4b5227ff7755aa19aa57452c49e9466252fcb4a0.tar.zst godot-4b5227ff7755aa19aa57452c49e9466252fcb4a0.zip | |
Diffstat (limited to 'scene/resources')
| -rw-r--r-- | scene/resources/style_box.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scene/resources/style_box.cpp b/scene/resources/style_box.cpp index 7da65ac98..ebad00b06 100644 --- a/scene/resources/style_box.cpp +++ b/scene/resources/style_box.cpp @@ -136,8 +136,17 @@ Ref<Texture> StyleBoxTexture::get_normal_map() const { void StyleBoxTexture::set_margin_size(Margin p_margin, float p_size) { + ERR_FAIL_INDEX(p_margin, 4); + margin[p_margin] = p_size; emit_changed(); + static const char *margin_prop[4] = { + "content_margin_left", + "content_margin_top", + "content_margin_right", + "content_margin_bottom", + }; + _change_notify(margin_prop[p_margin]); } float StyleBoxTexture::get_margin_size(Margin p_margin) const { |
