Jump to content

[SOLVED] Problem with ObjectGui mouse control


photo

Recommended Posts

Problem

Strange system behavior when an objectgui widget is clicked. It causes wrong intersection operations and player control failure.

 

Reproduction steps

It's not automatic but easy to reproduce (just repeat steps 3-4 until it happens):

  1. Place attached zip content in data/samples folder.
  2. Execute guiproblem world
  3. Click on any of the labels (an engine message is shown "s:label 1" or "s:label 2")
  4. Click over the box and the label callback is invoked again. Once this happens, you can click the background and the callback will be invoked again. In addition you wouldn't be able to control player.

Thanks in advance.

teacherview.zip

Link to comment

Hi,

 

Thank you for this issue, we'll fix that!

 

The problem is that your label bounds are beyond ObjectGUI, so as a workaround try to keep your widgets bounds inside or resize screen on your ObjectGUI. In sample you can remove first digit from labels and see the results.

 

Tip: for debugging purposes it's good to enable background on your ObjectGUI node. This can be done by calling your_object_gui_instance.setBackground(1);

Link to comment
  • 9 months later...
×
×
  • Create New...