mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +02:00
Merge pull request #9484 from hyperlogic/tablet-ui
UI navigation work with game pads
This commit is contained in:
commit
200105c856
4 changed files with 3 additions and 44 deletions
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
"name": "Standard to Action",
|
||||
"when": "Application.NavigationFocused",
|
||||
"name": "Standard to UI Navigation Action",
|
||||
"channels": [
|
||||
{ "from": "Standard.DU", "to": "Actions.UiNavVertical" },
|
||||
{ "from": "Standard.DD", "to": "Actions.UiNavVertical", "filters": "invert" },
|
||||
|
@ -9,42 +8,7 @@
|
|||
{ "from": "Standard.LB", "to": "Actions.UiNavGroup","filters": "invert" },
|
||||
{ "from": "Standard.RB", "to": "Actions.UiNavGroup" },
|
||||
{ "from": [ "Standard.A", "Standard.X" ], "to": "Actions.UiNavSelect" },
|
||||
{ "from": [ "Standard.B", "Standard.Y" ], "to": "Actions.UiNavBack" },
|
||||
{ "from": [ "Standard.RTClick", "Standard.LTClick" ], "to": "Actions.UiNavSelect" },
|
||||
{
|
||||
"from": "Standard.LX", "to": "Actions.UiNavLateral",
|
||||
"filters": [
|
||||
{ "type": "deadZone", "min": 0.95 },
|
||||
"constrainToInteger",
|
||||
{ "type": "pulse", "interval": 0.4 }
|
||||
]
|
||||
},
|
||||
{
|
||||
"from": "Standard.LY", "to": "Actions.UiNavVertical",
|
||||
"filters": [
|
||||
"invert",
|
||||
{ "type": "deadZone", "min": 0.95 },
|
||||
"constrainToInteger",
|
||||
{ "type": "pulse", "interval": 0.4 }
|
||||
]
|
||||
},
|
||||
{
|
||||
"from": "Standard.RX", "to": "Actions.UiNavLateral",
|
||||
"filters": [
|
||||
{ "type": "deadZone", "min": 0.95 },
|
||||
"constrainToInteger",
|
||||
{ "type": "pulse", "interval": 0.4 }
|
||||
]
|
||||
},
|
||||
{
|
||||
"from": "Standard.RY", "to": "Actions.UiNavVertical",
|
||||
"filters": [
|
||||
"invert",
|
||||
{ "type": "deadZone", "min": 0.95 },
|
||||
"constrainToInteger",
|
||||
{ "type": "pulse", "interval": 0.4 }
|
||||
]
|
||||
}
|
||||
{ "from": [ "Standard.B", "Standard.Y" ], "to": "Actions.UiNavBack" }
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
@ -90,7 +90,6 @@ Item {
|
|||
} else {
|
||||
breadcrumbText.text = "Menu";
|
||||
topMenu = null;
|
||||
offscreenFlags.navigationFocused = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -99,7 +98,6 @@ Item {
|
|||
topMenu = newMenu;
|
||||
topMenu.focus = true;
|
||||
topMenu.forceActiveFocus();
|
||||
offscreenFlags.navigationFocused = true;
|
||||
}
|
||||
|
||||
function clearMenus() {
|
||||
|
|
|
@ -46,11 +46,8 @@ Item {
|
|||
});
|
||||
}
|
||||
loader.item.forceActiveFocus();
|
||||
offscreenFlags.navigationFocused = true;
|
||||
}
|
||||
}
|
||||
|
||||
Component.onDestruction: { offscreenFlags.navigationFocused = false; }
|
||||
|
||||
width: 480
|
||||
height: 720
|
||||
|
|
|
@ -978,7 +978,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
|||
using namespace controller;
|
||||
auto offscreenUi = DependencyManager::get<OffscreenUi>();
|
||||
auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
|
||||
if (offscreenUi->navigationFocused()) {
|
||||
{
|
||||
auto actionEnum = static_cast<Action>(action);
|
||||
int key = Qt::Key_unknown;
|
||||
static int lastKey = Qt::Key_unknown;
|
||||
|
|
Loading…
Reference in a new issue