mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
Removed the Window.Events property in SFML.Net
FS#124 - Fix KeyEvent.Alt/Control/Shift members not working, in SFML.Net git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/trunk@1180 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
8e90f147e4
commit
a430319c43
@ -234,13 +234,13 @@ namespace SFML
|
||||
public KeyCode Code;
|
||||
|
||||
/// <summary>Is the Alt modifier pressed?</summary>
|
||||
public bool Alt;
|
||||
public int Alt;
|
||||
|
||||
/// <summary>Is the Control modifier pressed?</summary>
|
||||
public bool Control;
|
||||
public int Control;
|
||||
|
||||
/// <summary>Is the Shift modifier pressed?</summary>
|
||||
public bool Shift;
|
||||
public int Shift;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
@ -20,9 +20,9 @@ namespace SFML
|
||||
public KeyEventArgs(KeyEvent e)
|
||||
{
|
||||
Code = e.Code;
|
||||
Alt = e.Alt;
|
||||
Control = e.Control;
|
||||
Shift = e.Shift;
|
||||
Alt = e.Alt != 0;
|
||||
Control = e.Control != 0;
|
||||
Shift = e.Shift != 0;
|
||||
}
|
||||
|
||||
/// <summary>Code of the key (see KeyCode enum)</summary>
|
||||
|
@ -103,25 +103,6 @@ namespace SFML
|
||||
myInput = new Input(sfWindow_GetInput(This));
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// <summary>
|
||||
/// Return the list of window's events which happened since last call
|
||||
/// </summary>
|
||||
/// <returns>Array of events</returns>
|
||||
////////////////////////////////////////////////////////////
|
||||
public Event[] Events
|
||||
{
|
||||
get
|
||||
{
|
||||
Event Evt;
|
||||
List<Event> Evts = new List<Event>();
|
||||
while (GetEvent(out Evt))
|
||||
Evts.Add(Evt);
|
||||
|
||||
return Evts.ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// <summary>
|
||||
/// Input manager of the window
|
||||
@ -365,7 +346,8 @@ namespace SFML
|
||||
////////////////////////////////////////////////////////////
|
||||
public void DispatchEvents()
|
||||
{
|
||||
foreach (Event e in Events)
|
||||
Event e;
|
||||
while (GetEvent(out e))
|
||||
{
|
||||
switch (e.Type)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user