Property handle rotated controls in 2D editor, fixes #3613
This commit is contained in:
parent
f5433dc60d
commit
9109e41a20
2 changed files with 8 additions and 3 deletions
|
@ -85,9 +85,14 @@ Size2 Control::edit_get_minimum_size() const {
|
|||
void Control::edit_set_rect(const Rect2& p_edit_rect) {
|
||||
|
||||
|
||||
Rect2 new_rect=get_rect();
|
||||
Matrix32 postxf;
|
||||
postxf.set_rotation_and_scale(data.rotation,data.scale);
|
||||
Vector2 new_pos = postxf.xform(p_edit_rect.pos);
|
||||
|
||||
new_rect.pos+=p_edit_rect.pos.snapped(Vector2(1,1));
|
||||
Vector2 pos = get_pos()+new_pos;
|
||||
|
||||
Rect2 new_rect=get_rect();
|
||||
new_rect.pos=pos.snapped(Vector2(1,1));
|
||||
new_rect.size=p_edit_rect.size.snapped(Vector2(1,1));
|
||||
|
||||
set_pos(new_rect.pos);
|
||||
|
|
|
@ -151,8 +151,8 @@ void Sample::set_loop_format(LoopFormat p_format) {
|
|||
if (sample.is_valid())
|
||||
AudioServer::get_singleton()->sample_set_loop_format(sample,(AudioServer::SampleLoopFormat)p_format);
|
||||
loop_format=p_format;
|
||||
|
||||
}
|
||||
|
||||
Sample::LoopFormat Sample::get_loop_format() const {
|
||||
|
||||
return loop_format;
|
||||
|
|
Loading…
Reference in a new issue