diff -r 5a9d1b17f22818b553aac89dfe2670cfca417958 -r 41eaa92cf131a2839b755538e85453a0bdf125f6 axios/Axios_settings.cs --- a/axios/Axios_settings.cs Sat Jun 23 17:23:39 2012 -0500 +++ b/axios/Axios_settings.cs Sun Jun 24 14:56:13 2012 -0500 @@ -105,6 +105,8 @@ * be overwritten in each screen * - Adding output to tcc console command to signal if it was disabled/enabled * - Adding DegreeToRadian/RadianToDegree double extensions + * - Fixing UI detect bug + * - Adding Width/Height/Position/RealPosition to DrawableAxiosGameObject * * */ diff -r 5a9d1b17f22818b553aac89dfe2670cfca417958 -r 41eaa92cf131a2839b755538e85453a0bdf125f6 axios/Engine/AxiosGameScreen.cs --- a/axios/Engine/AxiosGameScreen.cs Sat Jun 23 17:23:39 2012 -0500 +++ b/axios/Engine/AxiosGameScreen.cs Sun Jun 24 14:56:13 2012 -0500 @@ -340,7 +340,7 @@ uiobjpos = uiobject.Position; //objpos = this.Camera.ConvertScreenToWorld(uiobjpos); - uirect = new AxiosRectangle(uiobjpos.X, uiobjpos.Y, ConvertUnits.ToSimUnits(uiobject.Width), ConvertUnits.ToSimUnits(uiobject.Height)); + uirect = new AxiosRectangle(ConvertUnits.ToSimUnits(uiobjpos.X), ConvertUnits.ToSimUnits(uiobjpos.Y), ConvertUnits.ToSimUnits(uiobject.Width), ConvertUnits.ToSimUnits(uiobject.Height)); if (uirect.Intersect(mousrect)) { diff -r 5a9d1b17f22818b553aac89dfe2670cfca417958 -r 41eaa92cf131a2839b755538e85453a0bdf125f6 axios/Engine/DrawableAxiosGameObject.cs --- a/axios/Engine/DrawableAxiosGameObject.cs Sat Jun 23 17:23:39 2012 -0500 +++ b/axios/Engine/DrawableAxiosGameObject.cs Sun Jun 24 14:56:13 2012 -0500 @@ -10,7 +10,28 @@ { protected int _draworder; protected Texture2D Texture; - public Vector2 Position = new Vector2(); //set this to a property and adjust if adjustunits is true + + //public Vector2 Position = new Vector2(); //set this to a property and adjust if adjustunits is true + + public Vector2 _position = Vector2.Zero; + public Vector2 Position + { + get + { + return ConvertUnits.ToDisplayUnits(_position); + } + set + { + _position = value; + } + } + + public Vector2 RealPosition + { + get { return _position; } + private set { } + } + public Vector2 Origin = new Vector2(); protected bool _adjustunits = true; @@ -36,6 +57,18 @@ set { _relativetocamera = value; } } + public int Width + { + get { return this.Texture.Width; } + private set { } + } + + public int Height + { + get { return this.Texture.Height; } + private set { } + } + public override void LoadContent(AxiosGameScreen gameScreen) { base.LoadContent(gameScreen); @@ -51,9 +84,9 @@ else gameScreen.ScreenManager.SpriteBatch.Begin(); if (_adjustunits) - gameScreen.ScreenManager.SpriteBatch.Draw(Texture, ConvertUnits.ToDisplayUnits(Position), null, Color.White, _rotation, Origin, _scale, SpriteEffects.None, 0); + gameScreen.ScreenManager.SpriteBatch.Draw(Texture, ConvertUnits.ToDisplayUnits(_position), null, Color.White, _rotation, Origin, _scale, SpriteEffects.None, 0); else - gameScreen.ScreenManager.SpriteBatch.Draw(Texture, Position, null, Color.White, _rotation, Origin, _scale, SpriteEffects.None, 0); + gameScreen.ScreenManager.SpriteBatch.Draw(Texture, _position, null, Color.White, _rotation, Origin, _scale, SpriteEffects.None, 0); gameScreen.ScreenManager.SpriteBatch.End(); } diff -r 5a9d1b17f22818b553aac89dfe2670cfca417958 -r 41eaa92cf131a2839b755538e85453a0bdf125f6 axios/Engine/UI/AxiosUIObject.cs --- a/axios/Engine/UI/AxiosUIObject.cs Sat Jun 23 17:23:39 2012 -0500 +++ b/axios/Engine/UI/AxiosUIObject.cs Sun Jun 24 14:56:13 2012 -0500 @@ -4,17 +4,7 @@ { public class AxiosUIObject : DrawableAxiosGameObject { - public int Width - { - get { return this.Texture.Width; } - private set { } - } - public int Height - { - get { return this.Texture.Height; } - private set {} - } } }