OpenClonk
C4MessageBoard.h
Go to the documentation of this file.
1
/*
2
* OpenClonk, http://www.openclonk.org
3
*
4
* Copyright (c) 1998-2000, Matthes Bender
5
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de/
6
* Copyright (c) 2013-2016, The OpenClonk Team and contributors
7
*
8
* Distributed under the terms of the ISC license; see accompanying file
9
* "COPYING" for details.
10
*
11
* "Clonk" is a registered trademark of Matthes Bender, used with permission.
12
* See accompanying file "TRADEMARK" for details.
13
*
14
* To redistribute this file separately, substitute the full license texts
15
* for the above references.
16
*/
17
18
/* Fullscreen startup log and chat type-in */
19
20
#ifndef INC_C4MessageBoard
21
#define INC_C4MessageBoard
22
23
const
int
C4MSGB_MaxMsgFading
= 6;
24
25
#include "
graphics/C4Facet.h
"
26
#include "
lib/C4LogBuf.h
"
27
28
class
C4CustomKey
;
29
class
C4MessageBoard
30
{
31
public
:
32
C4MessageBoard
();
33
~C4MessageBoard
();
34
35
C4Facet
Output
;
36
private
:
37
float
ScreenFader;
38
bool
Startup;
39
// mode 0:
40
int
Delay;
// how long the curr msg will stay
41
int
Fader;
// =0: hold curr msg until Delay == 0
42
// >0: fade curr msg in
43
int
Speed;
// fade/delay speed
44
int
iBackScroll;
// how many lines scrolled back?
45
int
iLineHgt;
// line height
46
47
std::unique_ptr<C4KeyBinding> ScrollUpBinding, ScrollDownBinding;
48
49
C4LogBuffer
LogBuffer;
// backbuffer for log
50
public
:
51
void
Init
(
C4Facet
&cgo,
bool
fStartup);
52
void
Execute
();
53
void
Draw
(
C4Facet
&cgo);
54
void
AddLog
(
const
char
*szMessage);
55
void
ClearLog
();
56
void
LogNotify
();
57
void
EnsureLastMessage
();
58
bool
ControlScrollUp
();
59
bool
ControlScrollDown
();
60
C4Player
*
GetMessagePlayer
(
const
char
*szMessage);
61
62
friend
class
C4MessageInput
;
63
};
64
65
66
#endif
C4Facet.h
C4LogBuf.h
C4MSGB_MaxMsgFading
const int C4MSGB_MaxMsgFading
Definition:
C4MessageBoard.h:23
C4CustomKey
Definition:
C4KeyboardInput.h:419
C4Facet
Definition:
C4Facet.h:115
C4LogBuffer
Definition:
C4LogBuf.h:23
C4MessageBoard
Definition:
C4MessageBoard.h:30
C4MessageBoard::GetMessagePlayer
C4Player * GetMessagePlayer(const char *szMessage)
Definition:
C4MessageBoard.cpp:228
C4MessageBoard::Execute
void Execute()
Definition:
C4MessageBoard.cpp:57
C4MessageBoard::~C4MessageBoard
~C4MessageBoard()
Definition:
C4MessageBoard.cpp:51
C4MessageBoard::Draw
void Draw(C4Facet &cgo)
Definition:
C4MessageBoard.cpp:131
C4MessageBoard::Init
void Init(C4Facet &cgo, bool fStartup)
Definition:
C4MessageBoard.cpp:108
C4MessageBoard::Output
C4Facet Output
Definition:
C4MessageBoard.h:35
C4MessageBoard::EnsureLastMessage
void EnsureLastMessage()
Definition:
C4MessageBoard.cpp:184
C4MessageBoard::AddLog
void AddLog(const char *szMessage)
Definition:
C4MessageBoard.cpp:198
C4MessageBoard::LogNotify
void LogNotify()
Definition:
C4MessageBoard.cpp:213
C4MessageBoard::ClearLog
void ClearLog()
Definition:
C4MessageBoard.cpp:208
C4MessageBoard::ControlScrollDown
bool ControlScrollDown()
Definition:
C4MessageBoard.cpp:253
C4MessageBoard::C4MessageBoard
C4MessageBoard()
Definition:
C4MessageBoard.cpp:37
C4MessageBoard::ControlScrollUp
bool ControlScrollUp()
Definition:
C4MessageBoard.cpp:246
C4MessageInput
Definition:
C4MessageInput.h:107
C4Player
Definition:
C4Player.h:49
openclonk
src
gui
C4MessageBoard.h
Generated on Fri May 16 2025 04:33:13 for OpenClonk by
1.9.1