Main MFD class. More...
#include <MyMFDMultipleVessels.hpp>
Public Member Functions | |
MyMFDMultipleVessels (DWORD w, DWORD h, VESSEL *vessel, MyPluginMultipleVessels *pluginMultipleVessels) | |
Default constructor. | |
~MyMFDMultipleVessels () | |
Destructor. | |
EnjoLib::MFDGoodies::Sound & | GetSound () |
Returns Sound class. | |
MyMFDData * | GetData () |
Returns MFDData class. | |
char * | ButtonLabel (int bt) |
Creates button label. | |
int | ButtonMenu (const MFDBUTTONMENU **menu) const |
Creates button label. | |
bool | Update (oapi::Sketchpad *skp) |
Updates MFD. | |
bool | ConsumeKeyBuffered (DWORD key) |
Defines key reaction. | |
bool | ConsumeButton (int bt, int event) |
Defines mouse reaction. | |
bool | ShouldDrawHUD () const |
Should the MFD draw on HUD now? | |
void | DrawHUD (int mode, const HUDPAINTSPEC *hps, oapi::Sketchpad *skp) |
Provides drawing context for the MFD. | |
void | SwitchButtonsPage () |
void | SelectTarget () |
void | SwitchAutopilotStandard () |
void | SwitchAutopilotSophisticated () |
void | SwitchUseSound () |
void | SwitchHUD () |
![]() | |
IMFDDrawsHUD () | |
Ctor. | |
virtual | ~IMFDDrawsHUD () |
Dtor. | |
virtual void | DrawHUD (int mode, const HUDPAINTSPEC *hps, HDC hDC) |
Only for backward compatibility (Orbiter 2006), therefore may be left unimplemented. |
Static Public Member Functions | |
static int | MsgProc (UINT msg, UINT mfd, WPARAM wparam, LPARAM lparam) |
Message parser. |
Main MFD class.
Main MFD class. Constructed each time the MFD is opened or vessel is changed. Therefore, if you need to store the values of this and other vessels, you need to use and external data structure, that stores these values. Here, it's called MFDData.
MyMFDMultipleVessels::MyMFDMultipleVessels | ( | DWORD | w, |
DWORD | h, | ||
VESSEL * | vessel, | ||
MyPluginMultipleVessels * | pluginMultipleVessels | ||
) |
Default constructor.
Constructs the MFD.
w | - MFD's width |
h | - MFD's height |
vessel | for which the MFD has been opened |
PluginMultipleVessels | contains configuration and other data neede by the MFD |
char * MyMFDMultipleVessels::ButtonLabel | ( | int | bt | ) |
Creates button label.
Refer to Orbiter SDK doc
int MyMFDMultipleVessels::ButtonMenu | ( | const MFDBUTTONMENU ** | menu | ) | const |
Creates button label.
Refer to Orbiter SDK doc
bool MyMFDMultipleVessels::ConsumeButton | ( | int | bt, |
int | event | ||
) |
Defines mouse reaction.
Refer to Orbiter SDK doc
bool MyMFDMultipleVessels::ConsumeKeyBuffered | ( | DWORD | key | ) |
Defines key reaction.
Refer to Orbiter SDK doc
MyMFDData * MyMFDMultipleVessels::GetData | ( | ) |
Returns MFDData class.
Returns a pointer to the MFDData class, needed outside the MFD's context
Sound & MyMFDMultipleVessels::GetSound | ( | ) |
Returns Sound class.
Returns a reference to the Sound class, needed outside the MFD's context
|
static |
Message parser.
Refer to Orbiter SDK doc
|
virtual |
Should the MFD draw on HUD now?
Could return false, for example when the user switched drawing on HUD through an MFD button
Implements EnjoLib::MFDGoodies::IMFDDrawsHUD.
bool MyMFDMultipleVessels::Update | ( | oapi::Sketchpad * | skp | ) |
Updates MFD.
Refer to Orbiter SDK doc