Rise
The Vieneo Province
HeadlightBox.cpp
Go to the documentation of this file.
1 #include "Instrument.h"
2 #include "../Bus.h"
3 
4 HeadlightBox::HeadlightBox(int prmX, int prmY, float prmXScale, float prmYScale, Bus* prmBus, Logger* prmLogger, DeviceObject* prmDevice, std::vector<Font*> prmFonts) :
5  Instrument(prmX, prmY, prmXScale, prmYScale, prmBus, prmLogger, prmDevice, prmFonts)
6 {
7  logger->AddToCallStack("HeadlightBox::ctor");
8  defaultFont = 1;
9 
10  box = new Sprite(logger, pDevice, "Textures/Instruments/headlight-box.png", prmX, prmY, 0.1f, 0, 0, 33, 17, 0xFF0C3B5B);
11  fill = new Sprite(logger, pDevice, "Textures/Instruments/headlight-fill.png", prmX + 2, prmY + 2, 0.2f, 0, 0, 29, 7, 0xFF00FF00);
12 }
13 
15 {
16  box->Draw();
17 
18  if (playerships[0].headlight)
19  fill->Draw();
20 
21  DrawTextW(L"LGHT", 8, 10, 0.3f, DT_NOCLIP, 0xFFFFFFFF, 3);
22 }
void Render() override
Sprite * fill
Definition: Instrument.h:198
Definition: Logger.h:9
Sprite * box
Definition: Instrument.h:197
s_network_objects playerships[MAX_SCAN]
Definition: globals.cpp:174
DeviceObject * pDevice
Definition: Instrument.h:17
void Draw(D3DXCOLOR prmColor)
Definition: Sprite.cpp:66
Definition: Bus.h:16
Definition: Sprite.h:7
UINT defaultFont
Definition: Instrument.h:20
HeadlightBox(int prmX, int prmY, float prmXScale, float prmYScale, Bus *prmBus, Logger *prmLogger, DeviceObject *prmDevice, std::vector< Font *> prmFonts)
Definition: HeadlightBox.cpp:4
Logger * logger
Definition: Instrument.h:19
void AddToCallStack(const char *msg)
Definition: Logger.cpp:86