-
Notifications
You must be signed in to change notification settings - Fork 0
/
message.txt
109 lines (95 loc) · 2.85 KB
/
message.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
function DisplayMessages(Canvas C)
{
local int i, j, XPos, YPos,MessageCount;
local float XL, YL, XXL, YYL;
local Color Blk;
local font CF;
Blk.A = 192;
CF = C.Font;
C.FontScaleX = 1.0;
C.FontScaleY = 1.0;
for( i = 0; i < ConsoleMessageCount; i++ )
{
if ( TextMessages[i].Text == "" )
break;
else if( TextMessages[i].MessageLife < Level.TimeSeconds )
{
TextMessages[i].Text = "";
if( i < ConsoleMessageCount - 1 )
{
for( j=i; j<ConsoleMessageCount-1; j++ )
TextMessages[j] = TextMessages[j+1];
}
TextMessages[j].Text = "";
break;
}
else
MessageCount++;
}
// MsgTopY
YPos = (ConsoleMessagePosY * HudCanvasScale * C.SizeY) + (((1.0 - HudCanvasScale) / 2.0) * C.SizeY);
if ( PlayerOwner == none || PlayerOwner.PlayerReplicationInfo == none || !PlayerOwner.PlayerReplicationInfo.bWaitingPlayer )
{
XPos = (ConsoleMessagePosX * HudCanvasScale * C.SizeX) + (((1.0 - HudCanvasScale) / 2.0) * C.SizeX);
}
else
{
XPos = (0.005 * HudCanvasScale * C.SizeX) + (((1.0 - HudCanvasScale) / 2.0) * C.SizeX);
}
C.FontScaleX = (C.ClipY / 1080.0) * ChatFontScale;
C.FontScaleY = (C.ClipY / 1080.0) * ChatFontScale;
// ChatMessage
C.Font = KF2Font;
C.DrawColor = LevelActionFontColor;
C.TextSize ("A", XL, YL);
// MsgTopY
YPos -= YL * MessageCount+1; // DP_LowerLeft
// MsgTopY
YPos -= YL; // Room for typing prompt
// YPos = MsgTopY;
for( i=0; i<MessageCount; i++ )
{
if ( TextMessages[i].Text == "" )
break;
// FIRST PASS - SHADOW
C.DrawColor = Blk;
YPos += 1;
XPos += 1;
C.SetPos( XPos, YPos );
YYL = 0;
XXL = 0;
if( TextMessages[i].PRI!=None )
{
XL = class'SRScoreBoard'.Static.DrawCountryName(C,TextMessages[i].PRI,XPos,YPos);
C.SetPos( XPos+XL, YPos );
}
if( SmileyMsgs.Length!=0 )
{
DrawSmileyText(TextMessages[i].Text,C,,YYL);
}
else
{
C.DrawText(TextMessages[i].Text,false);
}
// SECOND PASS
XPos --;
YPos --;
C.SetPos( XPos, YPos );
C.DrawColor = TextMessages[i].TextColor;
YYL = 0;
XXL = 0;
if( TextMessages[i].PRI!=None )
{
XL = class'SRScoreBoard'.Static.DrawCountryName(C,TextMessages[i].PRI,XPos,YPos);
C.SetPos( XPos+XL, YPos );
}
if( SmileyMsgs.Length!=0 )
DrawSmileyText(TextMessages[i].Text,C,,YYL);
else
C.DrawText(TextMessages[i].Text,false);
YPos += (YL+YYL);
}
C.FontScaleX = 1.0;
C.FontScaleY = 1.0;
C.Font = CF;
}