improved field modification functions added to texture atlas data and ninepatch data classes.
This commit is contained in:
parent
b705b2a457
commit
cf964cfe76
@ -8,8 +8,16 @@ namespace RecrownedAthenaeum.Pipeline.NinePatch
|
||||
{
|
||||
public class NinePatchData
|
||||
{
|
||||
public string name;
|
||||
public string bounds;
|
||||
public string textureName;
|
||||
public int a, b, c, d;
|
||||
|
||||
public NinePatchData(string textureName, int a, int b, int c, int d)
|
||||
{
|
||||
this.textureName = textureName;
|
||||
this.a = a;
|
||||
this.b = b;
|
||||
this.c = c;
|
||||
this.d = d;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -20,6 +20,24 @@ namespace RecrownedAthenaeum.Pipeline.TextureAtlas
|
||||
public string name;
|
||||
public Rectangle location;
|
||||
public NinePatchData ninePatchData;
|
||||
|
||||
public void SetPosition(int x, int y)
|
||||
{
|
||||
location.X = x;
|
||||
location.Y = y;
|
||||
}
|
||||
|
||||
public void SetSize(int width, int height)
|
||||
{
|
||||
location.Width = width;
|
||||
location.Height = height;
|
||||
}
|
||||
|
||||
public void SetBounds(int x, int y, int width, int height)
|
||||
{
|
||||
SetPosition(x, y);
|
||||
SetSize(width, height);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user