PyCEGUI can't use GUIContext.getMouseCursor()

Issue #996 resolved
Former user created an issue

Automatic migration. Original reporter: "CABAListic"

Currently it's not possible to retrieve the MouseCursor object via PyCEGUI.System.getSingleton().getDefaultGUIContext().getMouseCursor(), which makes it impossible to set the mouse cursor image. The problem is that the Py++ bindings try to return by value, but the mouse cursor is not copyable. The bug was first reported about a year ago in the forums:

I don't know how to properly fix this in the Py++ generator, but what is needed is that in GUIContext.pypp.cpp:660 the bp::return_value_policy<bp::copy_const_reference>() needs to change. I changed it to bp::return_internal_reference<>() which appears to work for me.

Reproducibility: always

Comments (2)

  1. Martin Preisler

    Sorry for missing this, it should be a relatively easy fix in the bindings generator code. There may be more instances of this issue.

    I hope to have this fixed this week.

  2. Log in to comment