Override input?
Considering using your framework...
Is there a way to override input so that I could do something like use a 1st person shooter's crosshair as if it were the mouse?
Is there a way to override input so that I could do something like use a 1st person shooter's crosshair as if it were the mouse?
Re: Override input?
Hi!
Not sure to understand you. Do you want to change the mouse cursor image? In that case, yes it can be done.
Not sure to understand you. Do you want to change the mouse cursor image? In that case, yes it can be done.
Re: Override input?
Sorry for being a little vague.
I want to have a XAML UI rendered to a texture in game, but I want to provide my own mouse coordinates, so that for example in a first person shooter, the player could aim at and shoot a button. There is no cursor except the crosshair, which is fixed. I'm sure I could figure out the visuals, I'm interested in rewiring the input.
I want to have a XAML UI rendered to a texture in game, but I want to provide my own mouse coordinates, so that for example in a first person shooter, the player could aim at and shoot a button. There is no cursor except the crosshair, which is fixed. I'm sure I could figure out the visuals, I'm interested in rewiring the input.
-
-
sfernandez
Site Admin
- Posts: 2908
- Joined:
Re: Override input?
Hi krampster,
If you take a look at Plugins/NoesisGUI/Scripts/Core/NoesisUIRenderer.cs, that class is the one in charge of translating input events to NoesisGUI keyboard/mouse/touch events.
You can disable default input management by unchecking the "Enable Keyboard/Mouse/Touch" toggles in NoesisGUIPanel component.
Then you can make public the Noesis_MouseMove, Noesis_MouseDown, Noesis_MouseUp methods, to call them from the scripts where you calculate the crosshair-texture ray intersection.
If you need a deeper explanation I can help.
If you take a look at Plugins/NoesisGUI/Scripts/Core/NoesisUIRenderer.cs, that class is the one in charge of translating input events to NoesisGUI keyboard/mouse/touch events.
You can disable default input management by unchecking the "Enable Keyboard/Mouse/Touch" toggles in NoesisGUIPanel component.
Then you can make public the Noesis_MouseMove, Noesis_MouseDown, Noesis_MouseUp methods, to call them from the scripts where you calculate the crosshair-texture ray intersection.
If you need a deeper explanation I can help.
Who is online
Users browsing this forum: Google [Bot] and 5 guests