-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7aeb1fa
commit a7a1413
Showing
22 changed files
with
236 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
Hypercube.Client/Input/Events/Windowing/WindowingCharHandledEvent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
using Hypercube.Shared.EventBus.Events; | ||
|
||
namespace Hypercube.Client.Input.Events.Windowing; | ||
|
||
public readonly record struct WindowingCharHandledEvent : IEventArgs; |
6 changes: 6 additions & 0 deletions
6
Hypercube.Client/Input/Events/Windowing/WindowingKeyHandledEvent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
using Hypercube.Input; | ||
using Hypercube.Shared.EventBus.Events; | ||
|
||
namespace Hypercube.Client.Input.Events.Windowing; | ||
|
||
public readonly record struct WindowingKeyHandledEvent(KeyStateChangedArgs State) : IEventArgs; |
6 changes: 6 additions & 0 deletions
6
Hypercube.Client/Input/Events/Windowing/WindowingMouseButtonHandledEvent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
using Hypercube.Input; | ||
using Hypercube.Shared.EventBus.Events; | ||
|
||
namespace Hypercube.Client.Input.Events.Windowing; | ||
|
||
public readonly record struct WindowingMouseButtonHandledEvent(MouseButtonChangedArgs State) : IEventArgs; |
5 changes: 5 additions & 0 deletions
5
Hypercube.Client/Input/Events/Windowing/WindowingScrollHandledEvent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
using Hypercube.Shared.EventBus.Events; | ||
|
||
namespace Hypercube.Client.Input.Events.Windowing; | ||
|
||
public readonly record struct WindowingScrollHandledEvent : IEventArgs; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,14 @@ | ||
using Hypercube.Client.Graphics.Windows; | ||
using Hypercube.Input; | ||
using Hypercube.Shared.EventBus; | ||
|
||
namespace Hypercube.Client.Input.Handler; | ||
|
||
/// <summary> | ||
/// Receives requests from user input, via <see cref="IWindowManager"/>, | ||
/// and submits them for further work via events. | ||
/// </summary> | ||
public interface IInputHandler | ||
public interface IInputHandler : IEventSubscriber | ||
{ | ||
event Action<KeyStateChangedArgs>? KeyUp; | ||
event Action<KeyStateChangedArgs>? KeyDown; | ||
|
||
// TODO: Create Analyzer to allow access only for IWindowManager implementation | ||
void SendKeyState(KeyStateChangedArgs changedArgs); | ||
bool IsKeyDown(Key key); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 18 additions & 4 deletions
22
Hypercube.ImGui/Implementations/GlfwImGuiController.Input.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
</Project> |
Oops, something went wrong.