36 lines
1.4 KiB
C++
36 lines
1.4 KiB
C++
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
|
|
#include "FallenNavigationConfig.h"
|
|
|
|
FFallenNavigationConfig::FFallenNavigationConfig()
|
|
{
|
|
KeyEventRules.Reset();
|
|
|
|
KeyEventRules.Emplace(EKeys::Left, EUINavigation::Left);
|
|
KeyEventRules.Emplace(EKeys::A, EUINavigation::Left);
|
|
KeyEventRules.Emplace(EKeys::Gamepad_DPad_Left, EUINavigation::Left);
|
|
|
|
KeyEventRules.Emplace(EKeys::Right, EUINavigation::Right);
|
|
KeyEventRules.Emplace(EKeys::D, EUINavigation::Right);
|
|
KeyEventRules.Emplace(EKeys::Gamepad_DPad_Right, EUINavigation::Right);
|
|
|
|
KeyEventRules.Emplace(EKeys::Up, EUINavigation::Up);
|
|
KeyEventRules.Emplace(EKeys::W, EUINavigation::Up);
|
|
KeyEventRules.Emplace(EKeys::Gamepad_DPad_Up, EUINavigation::Up);
|
|
|
|
KeyEventRules.Emplace(EKeys::Down, EUINavigation::Down);
|
|
KeyEventRules.Emplace(EKeys::S, EUINavigation::Down);
|
|
KeyEventRules.Emplace(EKeys::Gamepad_DPad_Down, EUINavigation::Down);
|
|
|
|
KeyActionRules.Reset();
|
|
|
|
// By default, enter and gamepad accept are all counted as accept
|
|
KeyActionRules.Emplace(EKeys::Enter, EUINavigationAction::Accept);
|
|
KeyActionRules.Emplace(EKeys::Virtual_Accept, EUINavigationAction::Accept);
|
|
|
|
// By default, escape and gamepad back count as leaving current scope
|
|
KeyActionRules.Emplace(EKeys::Escape, EUINavigationAction::Back);
|
|
KeyActionRules.Emplace(EKeys::Virtual_Back, EUINavigationAction::Back);
|
|
}
|