mirror of
https://github.com/OpenMW/openmw.git
synced 2025-11-29 22:04:35 +00:00
Capture this explicitly
This commit is contained in:
parent
4f8b418c23
commit
baefea94e8
3 changed files with 8 additions and 8 deletions
|
|
@ -46,7 +46,7 @@ namespace LuaUi
|
|||
|
||||
void LuaTextEdit::textChange(MyGUI::EditBox*)
|
||||
{
|
||||
protectedCall([=](LuaUtil::LuaView& view) {
|
||||
protectedCall([this](LuaUtil::LuaView& view) {
|
||||
triggerEvent("textChanged", sol::make_object(view.sol(), mEditBox->getCaption().asUTF8()));
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -367,7 +367,7 @@ namespace LuaUi
|
|||
|
||||
void WidgetExtension::keyPress(MyGUI::Widget*, MyGUI::KeyCode code, MyGUI::Char ch)
|
||||
{
|
||||
protectedCall([=](LuaUtil::LuaView& view) {
|
||||
protectedCall([=, this](LuaUtil::LuaView& view) {
|
||||
if (code == MyGUI::KeyCode::None)
|
||||
{
|
||||
propagateEvent("textInput", [&](auto w) {
|
||||
|
|
@ -383,21 +383,21 @@ namespace LuaUi
|
|||
|
||||
void WidgetExtension::keyRelease(MyGUI::Widget*, MyGUI::KeyCode code)
|
||||
{
|
||||
protectedCall([=](LuaUtil::LuaView& view) {
|
||||
protectedCall([=, this](LuaUtil::LuaView& view) {
|
||||
propagateEvent("keyRelease", [&](auto w) { return w->keyEvent(view, code); });
|
||||
});
|
||||
}
|
||||
|
||||
void WidgetExtension::mouseMove(MyGUI::Widget*, int left, int top)
|
||||
{
|
||||
protectedCall([=](LuaUtil::LuaView& view) {
|
||||
protectedCall([=, this](LuaUtil::LuaView& view) {
|
||||
propagateEvent("mouseMove", [&](auto w) { return w->mouseEvent(view, left, top); });
|
||||
});
|
||||
}
|
||||
|
||||
void WidgetExtension::mouseDrag(MyGUI::Widget*, int left, int top, MyGUI::MouseButton button)
|
||||
{
|
||||
protectedCall([=](LuaUtil::LuaView& view) {
|
||||
protectedCall([=, this](LuaUtil::LuaView& view) {
|
||||
propagateEvent("mouseMove", [&](auto w) { return w->mouseEvent(view, left, top, button); });
|
||||
});
|
||||
}
|
||||
|
|
@ -414,14 +414,14 @@ namespace LuaUi
|
|||
|
||||
void WidgetExtension::mousePress(MyGUI::Widget*, int left, int top, MyGUI::MouseButton button)
|
||||
{
|
||||
protectedCall([=](LuaUtil::LuaView& view) {
|
||||
protectedCall([=, this](LuaUtil::LuaView& view) {
|
||||
propagateEvent("mousePress", [&](auto w) { return w->mouseEvent(view, left, top, button); });
|
||||
});
|
||||
}
|
||||
|
||||
void WidgetExtension::mouseRelease(MyGUI::Widget*, int left, int top, MyGUI::MouseButton button)
|
||||
{
|
||||
protectedCall([=](LuaUtil::LuaView& view) {
|
||||
protectedCall([=, this](LuaUtil::LuaView& view) {
|
||||
propagateEvent("mouseRelease", [&](auto w) { return w->mouseEvent(view, left, top, button); });
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ namespace LuaUi
|
|||
mPreviousMouse.left = left;
|
||||
mPreviousMouse.top = top;
|
||||
|
||||
protectedCall([=](LuaUtil::LuaView& view) {
|
||||
protectedCall([this](LuaUtil::LuaView& view) {
|
||||
sol::table table = view.newTable();
|
||||
table["position"] = osg::Vec2f(mCoord.left, mCoord.top);
|
||||
table["size"] = osg::Vec2f(mCoord.width, mCoord.height);
|
||||
|
|
|
|||
Loading…
Reference in a new issue