public void LoadGraphics(GraphicsDevice device) { _bg.BeginLoad(c => { _gui = c.Load<Window>(@"Data\GUI\Options"); RegisterInput(); if (_gui.Controls.ContainsKey("back")) _gui.Controls["back"].Tapped += (s, v) => { if (PrevScreen != null) Manager.TransitionTo(PrevScreen); }; _renderer = new RenderEngine(); _gui.RegisterVisuals(_renderer); _renderer.LoadGraphics(c, device); _sb = new SpriteBatch(device); IsLoaded = true; }); }
Public Sub LoadGraphics(device As GraphicsDevice) _bg.BeginLoad(Function(c) Do _gui = c.Load(Of Window)("Data\GUI\Options") RegisterInput() If _gui.Controls.ContainsKey("back") Then _gui.Controls("back").Tapped += Function(s, v) Do If PrevScreen IsNot Nothing Then Manager.TransitionTo(PrevScreen) End If End Function End If _renderer = New RenderEngine() _gui.RegisterVisuals(_renderer) _renderer.LoadGraphics(c, device) _sb = New SpriteBatch(device) IsLoaded = True End Function) End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)