Code: Select all
- MapWnd.h: declaration of function SystemDoubleClicked
- MapWnd.cpp:
- LeftDoubleClickedSignal of system icon(s) is connected to the SystemDoubleClicked function (while initialising MapWnd)
- SystemDoubleClicked function opens production screen
- SystemIcon.h:
- declare/fetch boost-signal LeftDoubleClickedSignal (?)
- SystemIcon.cpp:
- LDoubleClick calls LeftDoubleClickedSignal
- the SidePanel
- the PlanetPanel and
- the PlanetPanelContainer,
and all of them seem to need their own code to allow left-doubleclicking of a planet.
I gave it a try, repeating the following for every class:
- declare boost-signal:
boost::signals2::signal<void (int)> SidePanel::PlanetLeftDoubleClickedSignal;
- bind signal to function in constructor:
GG::Connect(m_planet_panel_container->PlanetLeftDoubleClickedSignal, &SidePanel::PlanetDoubleClicked, this);
- write dummy funcion that reports when it has been called:
void PlanetDoubleClicked(int planet_id) [...]
I'm not sure what I'm doing wrong, everything compiles fine, but the PlanetDoubleClicked function does not get executed. Basically I do not understand how I detect that a planet(-panel) has been doubleclicked so I can then execute a function that opens the production screen.
Help would be appreciated