]> git.mxchange.org Git - flightgear.git/commit
allow disabling/enabling of menu entries via "enabled" property;
authormfranz <mfranz>
Tue, 6 Dec 2005 17:56:17 +0000 (17:56 +0000)
committermfranz <mfranz>
Tue, 6 Dec 2005 17:56:17 +0000 (17:56 +0000)
commitac2c1fcd433df5c61b4a6377b7bab9cbffa92b1b
tree92b836ecb153d173caec157d1f0bf07a27f60725
parent435d874e35d98e9153eabdaca7c41e009f1b5f8c
allow disabling/enabling of menu entries via "enabled" property;
Unfortunately, we don't have an easy way to access the puObjects
only by knowing the respective XML property node, because the
menu structure was built by plib from string lists. That's why
we walk the puMenuBar tree and store {property node}->{puObject*}
pairs in a map. With this infrastructure in place we can now
easily enable/disable entries, but we can also make other changes
to menu buttons as we see need. The structure of puMenuBar is
described in the pui documentation, so it's less of a hack than
it looks.  :-)
src/GUI/menubar.cxx
src/GUI/menubar.hxx