Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nDisplayInput
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
LuFG VR VIS
VR-Group
Unreal-Development
nDisplayInput
Commits
39eed323
Commit
39eed323
authored
5 years ago
by
Sebastian Pape
Browse files
Options
Downloads
Patches
Plain Diff
Reformat
parent
22965fa3
No related branches found
No related tags found
2 merge requests
!4
Develop
,
!3
Feature/rename buttons
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Source/DisplayClusterInput/Private/DisplayClusterInputDevice.cpp
+107
-88
107 additions, 88 deletions
...DisplayClusterInput/Private/DisplayClusterInputDevice.cpp
with
107 additions
and
88 deletions
Source/DisplayClusterInput/Private/DisplayClusterInputDevice.cpp
+
107
−
88
View file @
39eed323
...
...
@@ -11,7 +11,8 @@
#define LOCTEXT_NAMESPACE "DisplayClusterInput"
FDisplayClusterInputDevice
::
FDisplayClusterInputDevice
(
const
TSharedRef
<
FGenericApplicationMessageHandler
>&
InMessageHandler
)
:
MessageHandler
(
InMessageHandler
)
FDisplayClusterInputDevice
::
FDisplayClusterInputDevice
(
const
TSharedRef
<
FGenericApplicationMessageHandler
>&
InMessageHandler
)
:
MessageHandler
(
InMessageHandler
)
{
AxisIndices
=
TArray
<
const
FKey
*>
{
...
...
@@ -32,35 +33,47 @@ FDisplayClusterInputDevice::FDisplayClusterInputDevice(const TSharedRef<FGeneric
&
FDisplayClusterKeys
::
Button9
};
}
FDisplayClusterInputDevice
::~
FDisplayClusterInputDevice
()
{
}
void
FDisplayClusterInputDevice
::
PreInit
()
{
EKeys
::
AddMenuCategoryDisplayInfo
(
"DisplayCluster"
,
LOCTEXT
(
"DisplayClusterSubCategory"
,
"Display Cluster"
),
TEXT
(
"GraphEditor.PadEvent_16x"
));
EKeys
::
AddKey
(
FKeyDetails
(
FDisplayClusterKeys
::
Button0
,
LOCTEXT
(
"nDisplayButton0"
,
"nDisplay Button 0"
),
FKeyDetails
::
GamepadKey
,
"DisplayCluster"
));
EKeys
::
AddKey
(
FKeyDetails
(
FDisplayClusterKeys
::
Button1
,
LOCTEXT
(
"nDisplayButton1"
,
"nDisplay Button 1"
),
FKeyDetails
::
GamepadKey
,
"DisplayCluster"
));
EKeys
::
AddKey
(
FKeyDetails
(
FDisplayClusterKeys
::
Button2
,
LOCTEXT
(
"nDisplayButton2"
,
"nDisplay Button 2"
),
FKeyDetails
::
GamepadKey
,
"DisplayCluster"
));
EKeys
::
AddKey
(
FKeyDetails
(
FDisplayClusterKeys
::
Button3
,
LOCTEXT
(
"nDisplayButton3"
,
"nDisplay Button 3"
),
FKeyDetails
::
GamepadKey
,
"DisplayCluster"
));
EKeys
::
AddKey
(
FKeyDetails
(
FDisplayClusterKeys
::
Button4
,
LOCTEXT
(
"nDisplayButton4"
,
"nDisplay Button 4"
),
FKeyDetails
::
GamepadKey
,
"DisplayCluster"
));
EKeys
::
AddKey
(
FKeyDetails
(
FDisplayClusterKeys
::
Button5
,
LOCTEXT
(
"nDisplayButton5"
,
"nDisplay Button 5"
),
FKeyDetails
::
GamepadKey
,
"DisplayCluster"
));
EKeys
::
AddKey
(
FKeyDetails
(
FDisplayClusterKeys
::
Button6
,
LOCTEXT
(
"nDisplayButton6"
,
"nDisplay Button 6"
),
FKeyDetails
::
GamepadKey
,
"DisplayCluster"
));
EKeys
::
AddKey
(
FKeyDetails
(
FDisplayClusterKeys
::
Button7
,
LOCTEXT
(
"nDisplayButton7"
,
"nDisplay Button 7"
),
FKeyDetails
::
GamepadKey
,
"DisplayCluster"
));
EKeys
::
AddKey
(
FKeyDetails
(
FDisplayClusterKeys
::
Button8
,
LOCTEXT
(
"nDisplayButton8"
,
"nDisplay Button 8"
),
FKeyDetails
::
GamepadKey
,
"DisplayCluster"
));
EKeys
::
AddKey
(
FKeyDetails
(
FDisplayClusterKeys
::
Button9
,
LOCTEXT
(
"nDisplayButton9"
,
"nDisplay Button 9"
),
FKeyDetails
::
GamepadKey
,
"DisplayCluster"
));
EKeys
::
AddKey
(
FKeyDetails
(
FDisplayClusterKeys
::
Axis0
,
LOCTEXT
(
"nDisplayAxis0"
,
"nDisplay Axis 0"
),
FKeyDetails
::
FloatAxis
,
"DisplayCluster"
));
EKeys
::
AddKey
(
FKeyDetails
(
FDisplayClusterKeys
::
Axis1
,
LOCTEXT
(
"nDisplayAxis1"
,
"nDisplay Axis 1"
),
FKeyDetails
::
FloatAxis
,
"DisplayCluster"
));
EKeys
::
AddMenuCategoryDisplayInfo
(
"DisplayCluster"
,
LOCTEXT
(
"DisplayClusterSubCategory"
,
"Display Cluster"
),
TEXT
(
"GraphEditor.PadEvent_16x"
));
EKeys
::
AddKey
(
FKeyDetails
(
FDisplayClusterKeys
::
Button0
,
LOCTEXT
(
"nDisplayButton0"
,
"nDisplay Button 0"
),
FKeyDetails
::
GamepadKey
,
"DisplayCluster"
));
EKeys
::
AddKey
(
FKeyDetails
(
FDisplayClusterKeys
::
Button1
,
LOCTEXT
(
"nDisplayButton1"
,
"nDisplay Button 1"
),
FKeyDetails
::
GamepadKey
,
"DisplayCluster"
));
EKeys
::
AddKey
(
FKeyDetails
(
FDisplayClusterKeys
::
Button2
,
LOCTEXT
(
"nDisplayButton2"
,
"nDisplay Button 2"
),
FKeyDetails
::
GamepadKey
,
"DisplayCluster"
));
EKeys
::
AddKey
(
FKeyDetails
(
FDisplayClusterKeys
::
Button3
,
LOCTEXT
(
"nDisplayButton3"
,
"nDisplay Button 3"
),
FKeyDetails
::
GamepadKey
,
"DisplayCluster"
));
EKeys
::
AddKey
(
FKeyDetails
(
FDisplayClusterKeys
::
Button4
,
LOCTEXT
(
"nDisplayButton4"
,
"nDisplay Button 4"
),
FKeyDetails
::
GamepadKey
,
"DisplayCluster"
));
EKeys
::
AddKey
(
FKeyDetails
(
FDisplayClusterKeys
::
Button5
,
LOCTEXT
(
"nDisplayButton5"
,
"nDisplay Button 5"
),
FKeyDetails
::
GamepadKey
,
"DisplayCluster"
));
EKeys
::
AddKey
(
FKeyDetails
(
FDisplayClusterKeys
::
Button6
,
LOCTEXT
(
"nDisplayButton6"
,
"nDisplay Button 6"
),
FKeyDetails
::
GamepadKey
,
"DisplayCluster"
));
EKeys
::
AddKey
(
FKeyDetails
(
FDisplayClusterKeys
::
Button7
,
LOCTEXT
(
"nDisplayButton7"
,
"nDisplay Button 7"
),
FKeyDetails
::
GamepadKey
,
"DisplayCluster"
));
EKeys
::
AddKey
(
FKeyDetails
(
FDisplayClusterKeys
::
Button8
,
LOCTEXT
(
"nDisplayButton8"
,
"nDisplay Button 8"
),
FKeyDetails
::
GamepadKey
,
"DisplayCluster"
));
EKeys
::
AddKey
(
FKeyDetails
(
FDisplayClusterKeys
::
Button9
,
LOCTEXT
(
"nDisplayButton9"
,
"nDisplay Button 9"
),
FKeyDetails
::
GamepadKey
,
"DisplayCluster"
));
EKeys
::
AddKey
(
FKeyDetails
(
FDisplayClusterKeys
::
Axis0
,
LOCTEXT
(
"nDisplayAxis0"
,
"nDisplay Axis 0"
),
FKeyDetails
::
FloatAxis
,
"DisplayCluster"
));
EKeys
::
AddKey
(
FKeyDetails
(
FDisplayClusterKeys
::
Axis1
,
LOCTEXT
(
"nDisplayAxis1"
,
"nDisplay Axis 1"
),
FKeyDetails
::
FloatAxis
,
"DisplayCluster"
));
FInputAxisConfigEntry
AxisX
,
AxisY
;
AxisX
.
AxisKeyName
=
FDisplayClusterKeys
::
Axis0
.
GetFName
();
AxisX
.
AxisProperties
=
FInputAxisProperties
();
AxisY
.
AxisKeyName
=
FDisplayClusterKeys
::
Axis1
.
GetFName
();
AxisY
.
AxisProperties
=
FInputAxisProperties
();
AxisX
.
AxisProperties
.
bInvert
=
true
;
UInputSettings
::
GetInputSettings
()
->
AxisConfig
.
Add
(
AxisX
);
UInputSettings
::
GetInputSettings
()
->
AxisConfig
.
Add
(
AxisY
);
}
...
...
@@ -69,6 +82,7 @@ bool FDisplayClusterInputDevice::Exec (UWorld* InWorld, const TCH
{
return
false
;
}
void
FDisplayClusterInputDevice
::
SendControllerEvents
()
{
if
(
!
IDisplayCluster
::
IsAvailable
())
return
;
...
...
@@ -101,18 +115,23 @@ void FDisplayClusterInputDevice::SendControllerEvents()
}
}
}
void
FDisplayClusterInputDevice
::
SetChannelValue
(
int32
ControllerId
,
FForceFeedbackChannelType
ChannelType
,
float
Value
)
{
// Intentionally empty (no haptic support).
}
void
FDisplayClusterInputDevice
::
SetChannelValues
(
int32
ControllerId
,
const
FForceFeedbackValues
&
Values
)
{
// Intentionally empty (no haptic support).
}
void
FDisplayClusterInputDevice
::
SetMessageHandler
(
const
TSharedRef
<
FGenericApplicationMessageHandler
>&
InMessageHandler
)
void
FDisplayClusterInputDevice
::
SetMessageHandler
(
const
TSharedRef
<
FGenericApplicationMessageHandler
>&
InMessageHandler
)
{
MessageHandler
=
InMessageHandler
;
}
void
FDisplayClusterInputDevice
::
Tick
(
float
DeltaTime
)
{
// Intentionally empty (everything is handled in SendControllerEvents above).
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment