Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
chat.qh File Reference
#include "../panel.qh"
Include dependency graph for chat.qh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

float HUD_Panel_Chat_InputEvent (float bInputType, float nPrimary, float nSecondary)

Variables

bool autocvar__con_chat_maximized
bool autocvar_con_chat
bool autocvar_con_chatrect
float autocvar_con_chatsize
float autocvar_con_chatwidth
float autocvar_con_notify
float autocvar_con_notifysize
bool autocvar_hud_panel_chat

Function Documentation

◆ HUD_Panel_Chat_InputEvent()

float HUD_Panel_Chat_InputEvent ( float bInputType,
float nPrimary,
float nSecondary )

Definition at line 14 of file chat.qc.

15{
17 return false;
18
19 if (bInputType == 3)
20 {
21 mousepos.x = nPrimary;
22 mousepos.y = nSecondary;
23 return true;
24 }
25
26 if (bInputType == 2)
27 return false;
28
29 // at this point bInputType can only be 0 or 1 (key pressed or released)
30 bool key_pressed = bInputType == 0;
31
32 if (nPrimary == K_MWHEELUP)
33 {
34 if (!key_pressed)
35 return true;
36 chat_maximized_scroll_ofs += 5 * cvar("con_chatsize");
37 return true;
38 }
39 else if (nPrimary == K_MWHEELDOWN)
40 {
41 if (!key_pressed)
42 return true;
43 chat_maximized_scroll_ofs -= 5 * cvar("con_chatsize");
46 return true;
47 }
48 else if (nPrimary == K_PGUP)
49 {
50 if (!key_pressed)
51 return true;
53 return true;
54 }
55 else if (nPrimary == K_PGDN)
56 {
57 if (!key_pressed)
58 return true;
62 return true;
63 }
64
65 return false;
66}
float chat_maximized_scroll_ofs
Definition chat.qc:12
bool autocvar__con_chat_maximized
Definition chat.qh:6
vector mousepos
Definition hud.qh:103
float K_PGDN
Definition keycodes.qc:39
float K_MWHEELDOWN
Definition keycodes.qc:133
float K_PGUP
Definition keycodes.qc:40
float K_MWHEELUP
Definition keycodes.qc:132
noref float vid_conheight
Definition draw.qh:9
float cvar(string name)

References autocvar__con_chat_maximized, chat_maximized_scroll_ofs, cvar(), K_MWHEELDOWN, K_MWHEELUP, K_PGDN, K_PGUP, mousepos, and vid_conheight.

Referenced by CSQC_InputEvent().

Variable Documentation

◆ autocvar__con_chat_maximized

bool autocvar__con_chat_maximized

Definition at line 6 of file chat.qh.

Referenced by HUD_Chat(), HUD_Main(), and HUD_Panel_Chat_InputEvent().

◆ autocvar_con_chat

bool autocvar_con_chat

Definition at line 7 of file chat.qh.

Referenced by HUD_Chat().

◆ autocvar_con_chatrect

bool autocvar_con_chatrect

Definition at line 12 of file chat.qh.

Referenced by HUD_Chat().

◆ autocvar_con_chatsize

float autocvar_con_chatsize

Definition at line 8 of file chat.qh.

Referenced by HUD_Chat(), and HUD_Panel_SetPosSize().

◆ autocvar_con_chatwidth

float autocvar_con_chatwidth

Definition at line 15 of file chat.qh.

Referenced by HUD_Chat().

◆ autocvar_con_notify

float autocvar_con_notify

Definition at line 9 of file chat.qh.

Referenced by Scoreboard_Draw().

◆ autocvar_con_notifysize

float autocvar_con_notifysize

Definition at line 10 of file chat.qh.

Referenced by Scoreboard_Draw().

◆ autocvar_hud_panel_chat

bool autocvar_hud_panel_chat

Definition at line 4 of file chat.qh.

Referenced by HUD_Chat().