summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2f4ef61)
raw | patch | inline | side by side (parent: 2f4ef61)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sun, 4 Aug 2019 15:20:22 +0000 (18:20 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sun, 4 Aug 2019 15:20:22 +0000 (18:20 +0300) |
src/game/g_console.pas | patch | blob | history |
diff --git a/src/game/g_console.pas b/src/game/g_console.pas
index 63454eb1cb52dbf1ad6b6014a971926559679f5b..3f3fd8ec2c998132439d1c30cfc78e3a35b701e7 100644 (file)
--- a/src/game/g_console.pas
+++ b/src/game/g_console.pas
down, up: SSArray;
end;
menu_toggled: BOOLEAN; (* hack for menu controls *)
+ ChatTop: BOOLEAN;
procedure g_Console_Switch;
var
CWidth, CHeight: Byte;
mfW, mfH: Word;
- a, b: Integer;
+ a, b, offset_y: Integer;
begin
e_TextureFontGetSize(gStdFont, CWidth, CHeight);
+ if ChatTop and gChatShow then
+ offset_y := CHeight
+ else
+ offset_y := 0;
+
for a := 0 to High(MsgArray) do
if MsgArray[a].Time > 0 then
- e_TextureFontPrintFmt(0, CHeight*a, MsgArray[a].Msg,
- gStdFont, True);
+ e_TextureFontPrintFmt(0, offset_y + CHeight * a, MsgArray[a].Msg, gStdFont, True);
if not Cons_Shown then
begin
if gChatShow then
begin
+ if ChatTop then
+ offset_y := 0
+ else
+ offset_y := gScreenHeight - CHeight - 1;
if gChatTeam then
begin
- e_TextureFontPrintEx(0, gScreenHeight - CHeight - 1, 'say team> ' + Line,
- gStdFont, 255, 255, 255, 1, True);
- e_TextureFontPrintEx((CPos + 9)*CWidth, gScreenHeight - CHeight - 1, '_',
- gStdFont, 255, 255, 255, 1, True);
+ e_TextureFontPrintEx(0, offset_y, 'say team> ' + Line, gStdFont, 255, 255, 255, 1, True);
+ e_TextureFontPrintEx((CPos + 9) * CWidth, offset_y, '_', gStdFont, 255, 255, 255, 1, True);
end
else
begin
- e_TextureFontPrintEx(0, gScreenHeight - CHeight - 1, 'say> ' + Line,
- gStdFont, 255, 255, 255, 1, True);
- e_TextureFontPrintEx((CPos + 4)*CWidth, gScreenHeight - CHeight - 1, '_',
- gStdFont, 255, 255, 255, 1, True);
- end;
+ e_TextureFontPrintEx(0, offset_y, 'say> ' + Line, gStdFont, 255, 255, 255, 1, True);
+ e_TextureFontPrintEx((CPos + 4) * CWidth, offset_y, '_', gStdFont, 255, 255, 255, 1, True);
+ end
end;
Exit;
end;
end;
initialization
+ conRegVar('chat_at_top', @ChatTop, 'draw chat at top border', 'draw chat at top border');
conRegVar('console_height', @ConsoleHeight, 0.0, 1.0, 'set console size', 'set console size');
{$IFDEF ANDROID}
+ ChatTop := True;
ConsoleHeight := 0.35
{$ELSE}
+ ChatTop := False;
ConsoleHeight := 0.5
{$ENDIF}
end.