You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Allow Control Rect tool to not snap to pixel
This commit is contained in:
@@ -130,8 +130,8 @@ Size2 Control::_edit_get_scale() const {
|
||||
|
||||
void Control::_edit_set_rect(const Rect2 &p_edit_rect) {
|
||||
ERR_FAIL_COND_MSG(!Engine::get_singleton()->is_editor_hint(), "This function can only be used from editor plugins.");
|
||||
set_position((get_position() + get_transform().basis_xform(p_edit_rect.position)).snappedf(1), ControlEditorToolbar::get_singleton()->is_anchors_mode_enabled());
|
||||
set_size(p_edit_rect.size.snappedf(1), ControlEditorToolbar::get_singleton()->is_anchors_mode_enabled());
|
||||
set_position((get_position() + get_transform().basis_xform(p_edit_rect.position)), ControlEditorToolbar::get_singleton()->is_anchors_mode_enabled());
|
||||
set_size(p_edit_rect.size, ControlEditorToolbar::get_singleton()->is_anchors_mode_enabled());
|
||||
}
|
||||
|
||||
void Control::_edit_set_rotation(real_t p_rotation) {
|
||||
|
||||
Reference in New Issue
Block a user