|
Post by barliesque on Feb 24, 2005 22:25:45 GMT
HUDsizeImage(hi.HUDimage, SizeX#, SizeY#, Uniform=True)
Scales the specified HUD image to the specified absolute size (based on a resolution of 800x600, as with all of the FONText library). Set the Uniform parameter to False if you want to be able to deform the image.
Function HUDsizeImage(hi.HUDimage, SizeX#, SizeY#, Uniform=True)
Local XS# = (SizeX * 0.002) / MeshWidth(hi\Mesh) Local YS# = (SizeY * 0.002) / MeshHeight(hi\Mesh)
If Uniform Then If XS > YS Then XS = YS Else YS = XS EndIf
PositionMesh hi\mesh, -hi\x,-hi\y,0 ScaleMesh hi\mesh,XS,YS,1 PositionMesh hi\mesh, hi\x,hi\y,0 End Function
|
|
|
Post by barliesque on Feb 26, 2005 9:56:18 GMT
Oops! There was a slight error in the above function... if you called it more than once, the scale was cumulative rather than absolute, so crazy things could happen. I've ammended the above post, so it works much better now.
|
|
|
Post by mjhszxy on Jul 28, 2008 1:24:51 GMT
|
|