protected override void Initialize() { ScreenWidth = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width; ScreenHeight = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height; //ScreenWidth = GraphicsDevice.DisplayMode.Width; //ScreenHeight = GraphicsDevice.DisplayMode.Height; Graphics.PreferredBackBufferWidth = (int)(ScreenWidth / 1.5); Graphics.PreferredBackBufferHeight = (int)(ScreenHeight / 1.5); WindowWidth = Graphics.PreferredBackBufferWidth; WindowHeight = Graphics.PreferredBackBufferHeight; _loto = new Loto(this); _b = new Button(this, new Vector2(WindowWidth - 125, WindowHeight - 50), 200, 50, "Recommencer", Replay); _inputs = new Inputs(this); base.Initialize(); }
public Case(Loto l, int num, int x, int y) { _loto = l; Numero = num; X = x; Y = y; int w = _loto.Game.WindowHeight - 30; while (w % 9 != 0) { w++; } int h = w / 9; Position = new Vector2(x * h - 5 * h + _loto.Game.WindowWidth / 2f + x, 10 + y * h + y); Width = w / 9; Height = w / 9; }
public LotoEkran() { InitializeComponent(); loto = new Loto(); }
public void Replay() { _loto = new Loto(this); _loto.LoadContent(Content); }