Rise
The Vieneo Province
Instrument Class Referenceabstract

#include <Instrument.h>

Inherited by AlertMessageStack, Altimeter, AttitudeIndicator, CargoManagement, CarRadio, Compass, Diagnostics, ElevatorTrim, EngineBar, EngineBox, Flaps, FMA, HeadlightBox, HeadlightIcon, IndicatedAirSpeed, Intermedia, LandingGear, LandingStrut, LineInput, MovingMap, Orbit, RadioAltimeter, Scanner, StreetView, TCASOverlay, and Wind.

Collaboration diagram for Instrument:
[legend]

Public Member Functions

 Instrument (int prmX, int prmY, float prmXScale, float prmYScale, Bus *prmBus, Logger *prmLogger, DeviceObject *prmDevice, std::vector< Font *> prmFonts)
 
void DrawText (const WCHAR *str, int relativeX, int relativeY, float prmZ, int flags, D3DXCOLOR color, int font=-1, std::string elementName="", int width=0, int height=0)
 
virtual void Render ()=0
 
virtual void FrameMove (float fElapsed)
 
virtual bool HandleKeyPress (short key, bool shift)
 
virtual void OnPageChanged ()
 

Protected Attributes

int x = 0
 
int y = 0
 
float xScale = 1.0f
 
float yScale = 1.0f
 
DeviceObjectpDevice = nullptr
 
Busbus = nullptr
 
Loggerlogger = nullptr
 
UINT defaultFont = 0
 
int uiRow = 0
 
bool showMenu = false
 
int uiMenuColumn = -1
 

Private Attributes

std::vector< Font * > fonts
 

Detailed Description

Definition at line 8 of file Instrument.h.

Constructor & Destructor Documentation

◆ Instrument()

Instrument::Instrument ( int  prmX,
int  prmY,
float  prmXScale,
float  prmYScale,
Bus prmBus,
Logger prmLogger,
DeviceObject prmDevice,
std::vector< Font *>  prmFonts 
)
inline

Definition at line 28 of file Instrument.h.

Here is the call graph for this function:

Member Function Documentation

◆ DrawText()

void Instrument::DrawText ( const WCHAR *  str,
int  relativeX,
int  relativeY,
float  prmZ,
int  flags,
D3DXCOLOR  color,
int  font = -1,
std::string  elementName = "",
int  width = 0,
int  height = 0 
)
inline
Todo:
could be used for tutorial mode

Definition at line 41 of file Instrument.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FrameMove()

virtual void Instrument::FrameMove ( float  fElapsed)
inlinevirtual

◆ HandleKeyPress()

virtual bool Instrument::HandleKeyPress ( short  key,
bool  shift 
)
inlinevirtual

Reimplemented in Scanner, Intermedia, and CargoManagement.

Definition at line 85 of file Instrument.h.

◆ OnPageChanged()

virtual void Instrument::OnPageChanged ( )
inlinevirtual

Definition at line 90 of file Instrument.h.

◆ Render()

Member Data Documentation

◆ bus

Bus* Instrument::bus = nullptr
protected

Definition at line 18 of file Instrument.h.

◆ defaultFont

UINT Instrument::defaultFont = 0
protected

Definition at line 20 of file Instrument.h.

◆ fonts

std::vector<Font*> Instrument::fonts
private

Definition at line 10 of file Instrument.h.

◆ logger

Logger* Instrument::logger = nullptr
protected

Definition at line 19 of file Instrument.h.

◆ pDevice

DeviceObject* Instrument::pDevice = nullptr
protected

Definition at line 17 of file Instrument.h.

◆ showMenu

bool Instrument::showMenu = false
protected

Definition at line 24 of file Instrument.h.

◆ uiMenuColumn

int Instrument::uiMenuColumn = -1
protected

Definition at line 25 of file Instrument.h.

◆ uiRow

int Instrument::uiRow = 0
protected
Todo:
I think these are only used in the cargo manifest so far!?

Definition at line 23 of file Instrument.h.

◆ x

int Instrument::x = 0
protected

Definition at line 13 of file Instrument.h.

◆ xScale

float Instrument::xScale = 1.0f
protected

Definition at line 15 of file Instrument.h.

◆ y

int Instrument::y = 0
protected

Definition at line 14 of file Instrument.h.

◆ yScale

float Instrument::yScale = 1.0f
protected

Definition at line 16 of file Instrument.h.


The documentation for this class was generated from the following file: