What I've done so far to get the pedia closed:
- added CLOSABLE parameter to m_enc_detail_panel window constructor and
- connected m_enc_detail_panel->ClosingSignal to BuildDesignatorWnd::HidePedia():
Code: Select all
GG::Connect(m_enc_detail_panel->ClosingSignal, boost::bind(&BuildDesignatorWnd::HidePedia, this)); // Wnd is manually closed by user
Result: pedia panel has an "X" and closes when X is clicked.
Problem: The area of the invisible pedia panel doesn't let mouse clicks through. I initially had thought I would need to remove the GG:INTERACTIVE flag from the window, but looking over GG::Wnd.cpp that doesn't seem to be possible or intended? Also other windows (the "map pedia" or sitrep) do not still receive clicks after ->Hide() has been called?
What I've done so far to show the pedia again:
My plan is to add a "show pedia" entry to the right-click menues of the production queue and the production selector items (if the pedia is invisible). Adding the entries is no problem. Next I created a signal "DisplayEncyclopediaDetailPanelSignal" which is (supposed to be) evoked if "show pedia" is clicked:
Code: Select all
mutable boost::signals2::signal<void (bool)> DisplayEncyclopediaDetailPanelSignal;
Code: Select all
GG::Connect(m_build_selector->DisplayEncyclopediaDetailPanelSignal, &EncyclopediaDetailPanel::Show, this);
I'd be grateful for any help.