mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-11-14 14:33:53 +01:00
11 lines
244 B
Plaintext
11 lines
244 B
Plaintext
|
function sprite_add_center(path) {
|
||
|
if(!file_exists(path)) return noone;
|
||
|
|
||
|
var _s = sprite_add(path, 0, 0, 0, 0, 0);
|
||
|
|
||
|
var _sw = sprite_get_width(_s);
|
||
|
var _sh = sprite_get_height(_s);
|
||
|
sprite_set_offset(_s, _sw / 2, _sh / 2);
|
||
|
|
||
|
return _s;
|
||
|
}
|