mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-26 14:38:34 +01:00
only offset DataTextureAtlas pivot if it is specified
This commit is contained in:
parent
516265bf5b
commit
e11eb459b8
1 changed files with 1 additions and 2 deletions
|
@ -71,10 +71,9 @@ namespace MLEM.Data {
|
||||||
loc.Offset(off);
|
loc.Offset(off);
|
||||||
|
|
||||||
// pivot
|
// pivot
|
||||||
var piv = !match.Groups[6].Success ? Vector2.Zero : new Vector2(
|
var piv = !match.Groups[6].Success ? Vector2.Zero : off + new Vector2(
|
||||||
float.Parse(match.Groups[6].Value, CultureInfo.InvariantCulture) - (pivotRelative ? 0 : loc.X),
|
float.Parse(match.Groups[6].Value, CultureInfo.InvariantCulture) - (pivotRelative ? 0 : loc.X),
|
||||||
float.Parse(match.Groups[7].Value, CultureInfo.InvariantCulture) - (pivotRelative ? 0 : loc.Y));
|
float.Parse(match.Groups[7].Value, CultureInfo.InvariantCulture) - (pivotRelative ? 0 : loc.Y));
|
||||||
piv += off;
|
|
||||||
|
|
||||||
var region = new TextureRegion(texture, loc) {
|
var region = new TextureRegion(texture, loc) {
|
||||||
PivotPixels = piv,
|
PivotPixels = piv,
|
||||||
|
|
Loading…
Reference in a new issue