mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-24 00:39:49 +00:00
use static cast to handle: deprecated between enumerations of different types
This commit is contained in:
parent
ad11cc8d8a
commit
1927b1c6d9
@ -40,7 +40,7 @@ namespace MWLua
|
|||||||
touchpadEvent["finger"] = sol::readonly_property(
|
touchpadEvent["finger"] = sol::readonly_property(
|
||||||
[](const SDLUtil::TouchEvent& e) -> int { return e.mFinger; });
|
[](const SDLUtil::TouchEvent& e) -> int { return e.mFinger; });
|
||||||
touchpadEvent["position"] = sol::readonly_property(
|
touchpadEvent["position"] = sol::readonly_property(
|
||||||
[](const SDLUtil::TouchEvent& e) -> osg::Vec2f { return osg::Vec2f(e.mX, e.mY);});
|
[](const SDLUtil::TouchEvent& e) -> osg::Vec2f { return {e.mX, e.mY};});
|
||||||
touchpadEvent["pressure"] = sol::readonly_property(
|
touchpadEvent["pressure"] = sol::readonly_property(
|
||||||
[](const SDLUtil::TouchEvent& e) -> float { return e.mPressure; });
|
[](const SDLUtil::TouchEvent& e) -> float { return e.mPressure; });
|
||||||
|
|
||||||
@ -177,10 +177,10 @@ namespace MWLua
|
|||||||
{"TriggerLeft", SDL_CONTROLLER_AXIS_TRIGGERLEFT},
|
{"TriggerLeft", SDL_CONTROLLER_AXIS_TRIGGERLEFT},
|
||||||
{"TriggerRight", SDL_CONTROLLER_AXIS_TRIGGERRIGHT},
|
{"TriggerRight", SDL_CONTROLLER_AXIS_TRIGGERRIGHT},
|
||||||
|
|
||||||
{"LookUpDown", SDL_CONTROLLER_AXIS_MAX + MWInput::A_LookUpDown},
|
{"LookUpDown", SDL_CONTROLLER_AXIS_MAX + static_cast<int>(MWInput::A_LookUpDown)},
|
||||||
{"LookLeftRight", SDL_CONTROLLER_AXIS_MAX + MWInput::A_LookLeftRight},
|
{"LookLeftRight", SDL_CONTROLLER_AXIS_MAX + static_cast<int>(MWInput::A_LookLeftRight)},
|
||||||
{"MoveForwardBackward", SDL_CONTROLLER_AXIS_MAX + MWInput::A_MoveForwardBackward},
|
{"MoveForwardBackward", SDL_CONTROLLER_AXIS_MAX + static_cast<int>(MWInput::A_MoveForwardBackward)},
|
||||||
{"MoveLeftRight", SDL_CONTROLLER_AXIS_MAX + MWInput::A_MoveLeftRight}
|
{"MoveLeftRight", SDL_CONTROLLER_AXIS_MAX + static_cast<int>(MWInput::A_MoveLeftRight)}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
api["KEY"] = LuaUtil::makeReadOnly(context.mLua->tableFromPairs<std::string_view, SDL_Scancode>({
|
api["KEY"] = LuaUtil::makeReadOnly(context.mLua->tableFromPairs<std::string_view, SDL_Scancode>({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user