parent
132e2f458d
commit
8d51618949
134 changed files with 1107 additions and 1110 deletions
|
|
@ -206,8 +206,8 @@ void TextureButton::_notification(int p_what) {
|
|||
Size2 scaleSize(size.width / tex_size.width, size.height / tex_size.height);
|
||||
float scale = scaleSize.width > scaleSize.height ? scaleSize.width : scaleSize.height;
|
||||
Size2 scaledTexSize = tex_size * scale;
|
||||
Point2 ofs = ((scaledTexSize - size) / scale).abs() / 2.0f;
|
||||
_texture_region = Rect2(ofs, size / scale);
|
||||
Point2 ofs2 = ((scaledTexSize - size) / scale).abs() / 2.0f;
|
||||
_texture_region = Rect2(ofs2, size / scale);
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue