x.MouseDown += new AxiosEvents.AxiosHandler(x_MouseDown);␍␊ |
AddGameObject(x);␍␊ |
b = new AxiosButton();␍␊ |
//b.Position = new Vector2(3f, 3f);␍␊ |
b.Position = new Vector2(3f, 3f);␍␊ |
b.ClickTexture = _blocktextures[0, 0];␍␊ |
b.NormalTexture = _blocktextures[0, 1];␍␊ |
b.HoverTexture = _blocktextures[0, 2];␍␊ |
//b.Position = new Vector2(10, 10);␍␊ |
b.MouseDown += new AxiosEvents.AxiosHandler(b_MouseDown);␍␊ |
b.Origin = new Vector2(b.ClickTexture.Width / 2, b.ClickTexture.Height / 2);␍␊ |
AddGameObject(b);␍␊ |
|
r1 = new Rectangle((int)obj1.X, (int)obj1.Y, b.Width, b.Height);␍␊ |
r2 = new Rectangle((int)obj2.X, (int)obj2.Y, b.Width, b.Height);␍␊ |
r3 = new Rectangle((int)b.Position.X, (int)(b.Position.Y), (int)Math.Floor(ConvertUnits.ToSimUnits(b.Width)), (int)Math.Ceiling(ConvertUnits.ToSimUnits(b.Height)));␍␊ |
r4 = new AxiosRectangle(b.Position.X, b.Position.Y, ConvertUnits.ToSimUnits(b.Width), (ConvertUnits.ToSimUnits(b.Height)));␍␊ |
r4 = new AxiosRectangle(ConvertUnits.ToSimUnits(b.Position.X), ConvertUnits.ToSimUnits(b.Position.Y), ConvertUnits.ToSimUnits(b.Width), (ConvertUnits.ToSimUnits(b.Height)));␍␊ |
}␍␊ |
␍␊ |
void x_MouseDown(object sender, AxiosGameScreen gameScreen, InputState input)␍␊ |
|
ScreenManager.SpriteBatch.DrawString(sf, "MP1 - " + mp1.ToString(), new Vector2(-200, -300), Color.Black);␍␊ |
ScreenManager.SpriteBatch.DrawString(sf, "MP2 - " + mp2.ToString(), new Vector2(-200, -280), Color.Black);␍␊ |
ScreenManager.SpriteBatch.DrawString(sf, "MP3 - " + mp3.ToString(), new Vector2(-200, -260), Color.Black);␍␊ |
ScreenManager.SpriteBatch.DrawString(sf, "r5 - " + r5.ToString(), new Vector2(-200, -240), Color.Black);␍␊ |
ScreenManager.SpriteBatch.DrawString(sf, "MP4 - " + r5.ToString(), new Vector2(-200, -240), Color.Black);␍␊ |
␍␊ |
ScreenManager.SpriteBatch.DrawString(sf, "obj1 - " + obj1.ToString(), new Vector2(-200, -220), Color.Black);␍␊ |
ScreenManager.SpriteBatch.DrawString(sf, "obj2 - " + obj2.ToString(), new Vector2(-200, -200), Color.Black);␍␊ |