Rise
The Vieneo Province
Loading...
Searching...
No Matches
HeadlightBox.cpp
Go to the documentation of this file.
1#include "Instrument.h"
2#include "../Bus.h"
3
4HeadlightBox::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}
Definition Bus.h:20
Sprite * fill
Definition Instrument.h:231
Sprite * box
Definition Instrument.h:230
HeadlightBox(int prmX, int prmY, float prmXScale, float prmYScale, Bus *prmBus, Logger *prmLogger, DeviceObject *prmDevice, std::vector< Font * > prmFonts)
void Render() override
Instrument(int prmX, int prmY, float prmXScale, float prmYScale, Bus *prmBus, Logger *prmLogger, DeviceObject *prmDevice, std::vector< Font * > prmFonts)
Definition Instrument.h:36
Logger * logger
Definition Instrument.h:23
DeviceObject * pDevice
Definition Instrument.h:21
UINT defaultFont
Definition Instrument.h:24
void AddToCallStack(const char *msg)
Definition Logger.cpp:355
Sprite(Logger *prmLogger, DeviceObject *prmpDevice, std::string prmPathAndFilename, int prmX, int prmY, float prmZ, int prmTop, int prmLeft, int prmWidth, int prmHeight, DWORD prmColor, float scaleX=1.0f, float scaleY=1.0f)
Definition Sprite.cpp:5
void Draw(RiseMath::Color prmColor)
Definition Sprite.cpp:75
s_network_objects playerships[MAX_SCAN]
Definition globals.cpp:112