void resizeNotifyImage(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) { resizeNotifyItem(me, relOrigin, relSize, absOrigin, absSize); if(me.forcedAspect == 0) { me.imgOrigin = '0 0 0'; me.imgSize = '1 1 0'; } else { if(absSize_x > me.forcedAspect * absSize_y) { // x too large, so center x-wise me.imgSize = eY + eX * (absSize_y * me.forcedAspect / absSize_x); } else { // y too large, so center y-wise me.imgSize = eX + eY * (absSize_x / (me.forcedAspect * absSize_y)); } me.imgOrigin = '0.5 0.5 0' - 0.5 * me.imgSize; } }
void resizeNotifyGecko(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) { resizeNotifyItem(me, relOrigin, relSize, absOrigin, absSize); gecko_resize( me.texturePath, absSize_x, absSize_y ); me.textureExtent = gecko_get_texture_extent( me.texturePath ); }