mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-09 20:39:37 +01:00
Update TextureRegion editor when NinePatchRect/StyleBoxTexture changes
Updates the editor when the region rect or margins change.
This commit is contained in:
parent
f0f2a9d960
commit
0ed75059cc
@ -953,6 +953,12 @@ void TextureRegionEditor::_changed_callback(Object *p_changed, const char *p_pro
|
||||
if (p_prop == StringName("atlas") || p_prop == StringName("texture") || p_prop == StringName("region")) {
|
||||
_edit_region();
|
||||
}
|
||||
if (Object::cast_to<NinePatchRect>(p_changed) && (p_prop == StringName("region_rect") || p_prop == StringName("patch_margin_left") || p_prop == StringName("patch_margin_right") || p_prop == StringName("patch_margin_top") || p_prop == StringName("patch_margin_bottom"))) {
|
||||
_edit_region();
|
||||
}
|
||||
if (Object::cast_to<StyleBoxTexture>(p_changed) && (p_prop == StringName("content_margin_left") || p_prop == StringName("content_margin_right") || p_prop == StringName("content_margin_top") || p_prop == StringName("content_margin_bottom"))) {
|
||||
_edit_region();
|
||||
}
|
||||
}
|
||||
|
||||
void TextureRegionEditor::_edit_region() {
|
||||
|
Loading…
Reference in New Issue
Block a user