Skip to content

Commit a0c02b7

Browse files
committed
Dynamically position Effs Active, Evts Active, and Memory Usage
1 parent 0c963ce commit a0c02b7

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

ttyd-tools/rel/source/draw.cpp

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4666,9 +4666,15 @@ void drawEvtsActive()
46664666
uint32_t Color = 0xFFFFFFFF;
46674667
uint8_t Alpha = 0xFF;
46684668
int32_t PosX = -232;
4669-
int32_t PosY = 40;
4669+
int32_t PosY = 60;
46704670
float Scale = 0.65;
46714671

4672+
// Move the text down if the effs display is active
4673+
if (Displays[EFFS_ACTIVE])
4674+
{
4675+
PosY -= 20;
4676+
}
4677+
46724678
// Get the total amount of evts active
46734679
ttyd::evtmgr::EvtWork *EvtWrk = ttyd::evtmgr::evtGetWork();
46744680
int32_t MaxEntries = EvtWrk->entryCount;
@@ -4774,9 +4780,21 @@ void drawMemoryUsage()
47744780
uint32_t Color = 0xFFFFFFFF;
47754781
uint8_t Alpha = 0xFF;
47764782
int32_t PosX = -232;
4777-
int32_t PosY = 20;
4783+
int32_t PosY = 60;
47784784
float Scale = 0.6;
47794785

4786+
// Move the text down if the effs display is active
4787+
if (Displays[EFFS_ACTIVE])
4788+
{
4789+
PosY -= 20;
4790+
}
4791+
4792+
// Move the text down if the evts display is active
4793+
if (Displays[EVTS_ACTIVE])
4794+
{
4795+
PosY -= 20;
4796+
}
4797+
47804798
char **tempMemoryUsageBuffer = HeapInfo.MemoryUsageBuffer;
47814799
bool *DisplayHeapInfo = HeapInfo.DisplayHeapInfo;
47824800

0 commit comments

Comments
 (0)