Rise
The Vieneo Province
Toggle main menu visibility
Loading...
Searching...
No Matches
LineInput.cpp
Go to the documentation of this file.
1
#include "
../Instrument.h
"
2
#include "
../../Bus.h
"
3
4
LineInput::LineInput
(
int
prmX,
int
prmY,
float
prmXScale,
float
prmYScale,
Bus
* prmBus,
Logger
* prmLogger,
DeviceObject
* prmDevice, std::vector<Font*> prmFonts, std::string prmPageName) :
5
Instrument
(prmX, prmY, prmXScale, prmYScale, prmBus, prmLogger, prmDevice, prmFonts)
6
{
7
logger
->
AddToCallStack
(
"LineInput::ctor"
);
8
defaultFont
= 1;
9
pageName
= prmPageName;
10
}
11
12
void
LineInput::Render
()
13
{
14
logger
->
AddToCallStack
(
"LineInput::Render"
);
15
if
((
pageName
==
"Intermedia"
&&
g_bTextInput
== 2) ||
// server requested info
16
(
pageName
==
"Cargo Manifest"
&&
g_bTextInput
>= 5 &&
g_bTextInput
<= 8) ||
// cash, fuel, jettison
17
(
pageName
==
"Scanner"
&&
g_bTextInput
>= 5 &&
g_bTextInput
<= 6))
// cash, fuel
18
{
19
DrawTextW(
lclPrompt
, 5, 0, 0.1f, DT_NOCLIP, 0xFF00FFFF);
20
21
DrawTextW(
lclOutgoing
, 5, 10, 0.1f, DT_NOCLIP, 0xFFFFFFFF);
22
}
23
}
24
25
void
LineInput::FrameMove
(
float
fElapsed)
26
{
27
logger
->
AddToCallStack
(
"LineInput::FrameMove"
);
28
cursorTime
+= fElapsed;
29
if
(
cursorTime
> 1.0f)
30
{
31
cursorTime
= 0.0f;
32
cursorState
= !
cursorState
;
33
}
34
35
swprintf_s(
lclPrompt
, 80, L
"%S"
,
prompt
);
36
37
if
(
cursorState
)
38
swprintf_s(
lclOutgoing
, 80, L
"%S_"
,
outgoing
);
39
else
40
swprintf_s(
lclOutgoing
, 80, L
"%S"
,
outgoing
);
41
}
Bus.h
Instrument.h
Bus
Definition
Bus.h:20
DeviceObject
Definition
DeviceObject.h:8
Instrument::Instrument
Instrument(int prmX, int prmY, float prmXScale, float prmYScale, Bus *prmBus, Logger *prmLogger, DeviceObject *prmDevice, std::vector< Font * > prmFonts)
Definition
Instrument.h:36
Instrument::logger
Logger * logger
Definition
Instrument.h:23
Instrument::defaultFont
UINT defaultFont
Definition
Instrument.h:24
LineInput::Render
void Render() override
Definition
LineInput.cpp:12
LineInput::lclOutgoing
WCHAR lclOutgoing[80]
Definition
Instrument.h:145
LineInput::cursorState
int cursorState
Definition
Instrument.h:142
LineInput::cursorTime
float cursorTime
Definition
Instrument.h:143
LineInput::lclPrompt
WCHAR lclPrompt[80]
Definition
Instrument.h:145
LineInput::FrameMove
void FrameMove(float fElapsed) override
Definition
LineInput.cpp:25
LineInput::LineInput
LineInput(int prmX, int prmY, float prmXScale, float prmYScale, Bus *prmBus, Logger *prmLogger, DeviceObject *prmDevice, std::vector< Font * > prmFonts, std::string prmPageName)
Definition
LineInput.cpp:4
LineInput::pageName
std::string pageName
Definition
Instrument.h:144
Logger
Definition
Logger.h:11
Logger::AddToCallStack
void AddToCallStack(const char *msg)
Definition
Logger.cpp:355
prompt
char prompt[80]
Definition
globals.cpp:62
g_bTextInput
char g_bTextInput
Definition
globals.cpp:61
outgoing
char outgoing[80]
Definition
globals.cpp:60
Instruments
MFD
LineInput.cpp
Generated on
for Rise by
1.18.0