mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-22 03:40:49 +00:00
Add bindings to select the next menu element
This commit is contained in:
parent
6491bb4910
commit
a29be8909d
@ -214,6 +214,12 @@ namespace MWLua
|
||||
input->setGamepadGuiCursorEnabled(v);
|
||||
MWBase::Environment::get().getWindowManager()->setCursorActive(v);
|
||||
};
|
||||
api["_selectNextMenuElement"] = []() {
|
||||
MWBase::Environment::get().getWindowManager()->injectKeyPress(MyGUI::KeyCode::Period, 0, false);
|
||||
};
|
||||
api["_selectPrevMenuElement"] = []() {
|
||||
MWBase::Environment::get().getWindowManager()->injectKeyPress(MyGUI::KeyCode::Slash, 0, false);
|
||||
};
|
||||
api["getMouseMoveX"] = [input]() { return input->getMouseMoveX(); };
|
||||
api["getMouseMoveY"] = [input]() { return input->getMouseMoveY(); };
|
||||
api["getAxisValue"] = [input](int axis) {
|
||||
|
@ -25,5 +25,17 @@ return {
|
||||
setGamepadCursorActive = function(state)
|
||||
input._setGamepadCursorActive(state)
|
||||
end,
|
||||
|
||||
--- Sends an event to the interface to select the next menu element
|
||||
-- @function [parent=#GamepadControls] selectNextMenuElement
|
||||
selectNextMenuElement = function(state)
|
||||
input._selectNextMenuElement()
|
||||
end,
|
||||
|
||||
--- Sends an event to the interface to select the next menu element
|
||||
-- @function [parent=#GamepadControls] selectPrevMenuElement
|
||||
selectPrevMenuElement = function(state)
|
||||
input._selectPrevMenuElement()
|
||||
end,
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user