DoUrVerse Repository
Projects
Pull Requests
Issues
Builds
Packages
DoUrVerse
Code
Files
Commits
Branches
Tags
Code Comments
Code Compare
Pull Requests
Issues
List
Boards
Iterations
Builds
Statistics
Code
Child Projects
Projects
DoUrVerse
Commits
b730954a
ctrl
k
Sign In
Fixed slider issue #
DUV-27
Simon Hoxer Bønding
committed
10 months ago
b730954a
1 parent
7b48ebd2
DoUrVerse/ViewModels/ActionMappingViewModel.cs
■
■ ■ ■ ■
■
skipped 188 lines
189
189
instance = DeviceInstance.CreateDefault(deviceInput.Source.Type, 1);
190
190
}
191
191
192
-
//Rebind the action inside the profile
193
-
string input = (type == DeviceInputEventType.Axis) ? deviceInput.Axis.ToString().ToLower() : deviceInput.SCButton;
194
-
195
192
//Abort if result was escape
196
-
if (deviceInput.Source.Type == DeviceType.Keyboard &&
input
== "escape")
193
+
if (deviceInput.Source.Type == DeviceType.Keyboard &&
deviceInput
.
SCButton
== "escape")
197
194
{
198
195
return;
199
196
}
skipped 107 lines
All occurrences
DoUrVerse/ViewModels/RebindControlViewModel.cs
■
■ ■ ■ ■ ■
skipped 154 lines
155
155
{
156
156
case InterfaceType.Joystick:
157
157
iconResource = "Assets/joystick-icon.png";
158
-
text = _config.KeyboardBindingToName(deviceInput.Name);
159
158
break;
160
159
case InterfaceType.Keyboard:
161
160
iconResource = "Assets/keyboard-icon.png";
skipped 84 lines
All occurrences
DoUrVerseLib/Device/DeviceInputListener.cs
■ ■ ■ ■ ■
■
skipped 90 lines
91
91
{
92
92
lock (_lock)
93
93
{
94
-
if (listenHandler == null || args.Type != listenInputType || args.Source == null)
94
+
if (listenInputType == DeviceInputEventType.Axis
95
+
&& args.Type != DeviceInputEventType.Axis
96
+
&& args.Type != DeviceInputEventType.Rotation)
97
+
{
98
+
return;
99
+
}
100
+
else if (listenInputType == DeviceInputEventType.Button
101
+
&& args.Type != DeviceInputEventType.Button)
102
+
{
103
+
return;
104
+
}
105
+
106
+
107
+
if (listenHandler == null || args.Source == null)
95
108
{
96
109
return;
97
110
}
skipped 37 lines
135
148
dispatch(input);
136
149
}
137
150
}
138
-
else if (args.Type == DeviceInputEventType.Axis)
151
+
else if (args.Type == DeviceInputEventType.Axis
|
|
args
.
Type
=
=
DeviceInputEventType
.
Rotation
)
139
152
{
140
153
//Calculate pct of how much user is moving stick
141
154
ushort value = (ushort)args.Value;
155
+
142
156
if (value < axisLowBound || value > axisHighBound)
143
157
{
144
158
input.Axis = args.Axis;
159
+
145
160
input.Strokes = getStrokes(args);
146
161
dispatch(input);
147
162
}
skipped 116 lines
All occurrences
DoUrVerseLib/Device/InputStroke.cs
■ ■ ■ ■ ■ ■
skipped 42 lines
43
43
}
44
44
break;
45
45
}
46
+
else if (EventType == DeviceInputEventType.Rotation)
47
+
{
48
+
if (InputAxis == DeviceInputAxis.X)
49
+
{
50
+
StrokeValue = "rotx";
51
+
}
52
+
else if (InputAxis == DeviceInputAxis.Y)
53
+
{
54
+
StrokeValue = "roty";
55
+
}
56
+
else if (InputAxis == DeviceInputAxis.Z)
57
+
{
58
+
StrokeValue = "rotz";
59
+
}
60
+
break;
61
+
}
46
62
else
47
63
{
48
64
StrokeValue = "button" + (value + 1); break;
skipped 56 lines
All occurrences
DoUrVerseLib/Device/Windows/DxJoystick.cs
■
■
■ ■ ■ ■
skipped 15 lines
16
16
public override SharpDX.DirectInput.Device SharpDxDevice => joystick ?? throw new("Missing joystick device");
17
17
public override DeviceType Type => DeviceType.Joystick;
18
18
19
-
short assumedRestSpot = 0;
19
+
public override bool IsAlive => thread.IsAlive;
20
20
21
21
public DxJoystick(DirectInput input, Guid deviceGuid)
22
22
{
skipped 112 lines
All occurrences
DoUrVerse/ViewModels
ActionMappingViewModel.cs
RebindControlViewModel.cs
DoUrVerseLib/Device
DeviceInputListener.cs
InputStroke.cs
Windows/DxJoystick.cs
Please wait...
Page is in error, reload to recover