mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
40 lines
680 B
C
40 lines
680 B
C
|
#pragma once
|
||
|
#include "zstring.h"
|
||
|
#include "tarray.h"
|
||
|
|
||
|
class FFont;
|
||
|
|
||
|
struct FNotifyText
|
||
|
{
|
||
|
int TimeOut;
|
||
|
int Ticker;
|
||
|
int PrintLevel;
|
||
|
FString Text;
|
||
|
};
|
||
|
|
||
|
class FNotifyBufferBase
|
||
|
{
|
||
|
public:
|
||
|
virtual ~FNotifyBufferBase() = default;
|
||
|
virtual void AddString(int printlevel, FString source) = 0;
|
||
|
virtual void Shift(int maxlines);
|
||
|
virtual void Clear();
|
||
|
virtual void Tick();
|
||
|
virtual void Draw() = 0;
|
||
|
|
||
|
protected:
|
||
|
TArray<FNotifyText> Text;
|
||
|
int Top = 0;
|
||
|
int TopGoal = 0;
|
||
|
int LineHeight = 0;
|
||
|
enum { NEWLINE, APPENDLINE, REPLACELINE } AddType = NEWLINE;
|
||
|
|
||
|
void AddString(int printlevel, FFont *printFont, const FString &source, int formatwidth, float keeptime, int maxlines);
|
||
|
|
||
|
};
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|