1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-25 05:58:35 +01:00

Compare commits

..

No commits in common. "58a0f8915a1b937bd266f996a242e5e679314381" and "9ccb3536a0d43154c5eb77e2c0160c518a94f013" have entirely different histories.

3 changed files with 3 additions and 18 deletions

View file

@ -13,7 +13,6 @@ Additions
- Added StringBuilder overloads to GenericFont - Added StringBuilder overloads to GenericFont
- Added ColorExtensions.Multiply - Added ColorExtensions.Multiply
- Added SoundEffectInstanceHandler.Stop - Added SoundEffectInstanceHandler.Stop
- Added TextureRegion.OffsetCopy
Improvements Improvements
- Generify GenericFont's string drawing - Generify GenericFont's string drawing
@ -31,10 +30,6 @@ Improvements
Fixes Fixes
- Fixed paragraph links having incorrect hover locations when using special text alignments - Fixed paragraph links having incorrect hover locations when using special text alignments
### MLEM.Extended
Improvements
- Preserve texture region names when converting between MLEM and MG.Extended
### MLEM.Data ### MLEM.Data
Improvements Improvements
- Rethrow exceptions when no RawContentManager readers could be constructed - Rethrow exceptions when no RawContentManager readers could be constructed

View file

@ -23,7 +23,7 @@ namespace MLEM.Extended.Extensions {
/// <param name="region">The nine patch to convert</param> /// <param name="region">The nine patch to convert</param>
/// <returns>The converted nine patch</returns> /// <returns>The converted nine patch</returns>
public static TextureRegion2D ToExtended(this TextureRegion region) { public static TextureRegion2D ToExtended(this TextureRegion region) {
return new TextureRegion2D(region.Name, region.Texture, region.U, region.V, region.Width, region.Height); return new TextureRegion2D(region.Texture, region.U, region.V, region.Width, region.Height);
} }
/// <summary> /// <summary>
@ -32,7 +32,7 @@ namespace MLEM.Extended.Extensions {
/// <param name="patch">The nine patch to convert</param> /// <param name="patch">The nine patch to convert</param>
/// <returns>The converted nine patch</returns> /// <returns>The converted nine patch</returns>
public static NinePatch ToMlem(this NinePatchRegion2D patch) { public static NinePatch ToMlem(this NinePatchRegion2D patch) {
return new NinePatch(((TextureRegion2D) patch).ToMlem(), patch.LeftPadding, patch.RightPadding, patch.TopPadding, patch.BottomPadding); return new NinePatch(new TextureRegion(patch.Texture, patch.Bounds), patch.LeftPadding, patch.RightPadding, patch.TopPadding, patch.BottomPadding);
} }
/// <summary> /// <summary>
@ -41,7 +41,7 @@ namespace MLEM.Extended.Extensions {
/// <param name="region">The nine patch to convert</param> /// <param name="region">The nine patch to convert</param>
/// <returns>The converted nine patch</returns> /// <returns>The converted nine patch</returns>
public static TextureRegion ToMlem(this TextureRegion2D region) { public static TextureRegion ToMlem(this TextureRegion2D region) {
return new TextureRegion(region.Texture, region.Bounds) {Name = region.Name}; return new TextureRegion(region.Texture, region.Bounds);
} }
} }

View file

@ -118,16 +118,6 @@ namespace MLEM.Textures {
/// <param name="size">The size of this area</param> /// <param name="size">The size of this area</param>
public TextureRegion(TextureRegion region, Point uv, Point size) : this(region.Texture, region.Position + uv, size) {} public TextureRegion(TextureRegion region, Point uv, Point size) : this(region.Texture, region.Position + uv, size) {}
/// <summary>
/// Returns a new <see cref="TextureRegion"/> that has the same <see cref="Texture"/>, <see cref="Pivot"/> and <see cref="Size"/> as this texture, but the returned region's <see cref="Position"/> will be offset by <paramref name="offset"/>.
/// Note that the <see cref="Name"/> is not preserved in the copy.
/// </summary>
/// <param name="offset">The offset to apply to the <see cref="Position"/></param>
/// <returns>An offset copy of this texture region</returns>
public TextureRegion OffsetCopy(Point offset) {
return new TextureRegion(this.Texture, this.Position + offset, this.Size) {Pivot = this.Pivot};
}
} }
/// <summary> /// <summary>