History

Add virtual pad for android

Gabriel Calero committed 8 years ago

Commit 970ca5e1 parent 795a3b819 files · +619 −2Browse files

Showing the changes to interface/src/scripting/ControllerScriptingInterface.cpp (1 of 19 files). Show all

Unified · Split

interface/src/scripting/ControllerScriptingInterface.cpp+6−0
@@ -16,6 +16,7 @@ · 15 unmodified lines
16#include <plugins/PluginManager.h>16#include <plugins/PluginManager.h>
17 17
18#include "Application.h"18#include "Application.h"
19#include "VirtualPadManager.h"
19 20
20bool ControllerScriptingInterface::isKeyCaptured(QKeyEvent* event) const {21bool ControllerScriptingInterface::isKeyCaptured(QKeyEvent* event) const {
21 return isKeyCaptured(KeyEvent(*event));22 return isKeyCaptured(KeyEvent(*event));
@@ -83,6 +84,11 @@ QVariant ControllerScriptingInterface::getRecommendedHUDRect() const { · 61 unmodified lines
83 return qRectToVariant(rect);84 return qRectToVariant(rect);
84}85}
85 86
87void ControllerScriptingInterface::setVPadEnabled(const bool enable) {
88 auto& virtualPadManager = VirtualPad::Manager::instance();
89 virtualPadManager.enable(enable);
90}
91
86void ControllerScriptingInterface::emitKeyPressEvent(QKeyEvent* event) { emit keyPressEvent(KeyEvent(*event)); }92void ControllerScriptingInterface::emitKeyPressEvent(QKeyEvent* event) { emit keyPressEvent(KeyEvent(*event)); }
87void ControllerScriptingInterface::emitKeyReleaseEvent(QKeyEvent* event) { emit keyReleaseEvent(KeyEvent(*event)); }93void ControllerScriptingInterface::emitKeyReleaseEvent(QKeyEvent* event) { emit keyReleaseEvent(KeyEvent(*event)); }
88 94

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t