Menu

#2815 Clickable HotSpots (actions) on 2D cockpit panels not working on NEXT

2020.4
New
nobody
2D panel (3)
High
2024-06-07
2023-06-26
Ron Horn
No

I was testing some aircraft maintenance work on NEXT, and it seems that ANY 2D panel on ANY aircraft is not responding to mouse clicks. The hot spots show up fine when shown (ctl-c), but do not work when clicked.

Can test with the C172P (shift-P to see the 2D panel), or the B-52F (has only 2D panels).

Discussion

  • James Turner

    James Turner - 2023-06-26

    Can you set some breakpoints in the 2D panel click handler and see if it's firing at all? FGPanel::doLocalMouseAction is where you should ultimately end up, but the logic is different for '2d panels in 3d' vs 'pure 2d panels'.

    FGPanelPickCallback in panelnode.cxx is where the scene-graph level pick should be hitting the rendered panel; again a break point there might ne interesting.

     
  • Ron Horn

    Ron Horn - 2023-06-26

    Yes. I'll be back to the computer later today and will try as you say.

     
  • Ron Horn

    Ron Horn - 2023-06-27

    OK, I set breakpoints as advised, and neither one fired:
    FGPanel::doLocalMouseAction() and FGPanelPickCallback::buttonPressed()

    I DID notice that FGRenderer::pick() was being called (in Viewer/renderer.cxx), and it passed the click on to FGGroundPickCallback::buttonPressed() (in Scenery/scenery.cxx) if there was terrain behind the point on the panel that I clicked.

    And then I got lost. :)

     
  • James Turner

    James Turner - 2023-06-27

    Okay, this is kind of expected, the clicks aren't reaching the panel, probably becuase the OSG camera they are attached to is different somehow. There are several nodes attached to the 'GUI camera' which handles 2D drawing: PUI, Canvas, the 2D panels, probably a couple more I forgot. I wonder if one of those is grabbing the click, although since you said the ground pick handler is firing, this means the click is going 'all the way through', which is weird.

     
  • xDraconian

    xDraconian - 2024-06-07
    • labels: --> 2D panel
     

Log in to post a comment.