Improved window and input handling.

Window now has some events.

Keyboard and mouse implemented.
This commit is contained in:
2020-05-27 20:21:28 -05:00
parent e6230c013b
commit af7c1b37f9
15 changed files with 610 additions and 86 deletions

View File

@@ -1,3 +1,6 @@
using System;
using SlatedGameToolkit.Framework;
using SlatedGameToolkit.Framework.Graphics.Window;
using SlatedGameToolkit.Framework.StateSystem;
using SlatedGameToolkit.Framework.StateSystem.States;
@@ -5,6 +8,10 @@ namespace SlatedGameToolkit.Tools.Utilities.GraphicalPlayground
{
public class MainState : IState
{
private WindowHandle window;
public WindowHandle CurrentWindow { get { return window;}}
public bool Activate()
{
return true;
@@ -17,6 +24,7 @@ namespace SlatedGameToolkit.Tools.Utilities.GraphicalPlayground
public void Dispose()
{
window.Dispose();
}
public string getName()
@@ -26,7 +34,8 @@ namespace SlatedGameToolkit.Tools.Utilities.GraphicalPlayground
public void Initialize(Manager manager)
{
window = new WindowHandle("SlatedGameToolkit Playground");
window.RaiseToTop();
}
public void Render(double delta)