Xonotic
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.

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().

15 {
16  if(bInputType == 3)
17  {
18  mousepos.x = nPrimary;
19  mousepos.y = nSecondary;
20  return true;
21  }
22 
23  if(bInputType == 2)
24  return false;
25 
26  // at this point bInputType can only be 0 or 1 (key pressed or released)
27  bool key_pressed = (bInputType == 0);
28 
30  return false;
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 vid_conheight
float chat_maximized_scroll_ofs
Definition: chat.qc:12
float K_PGDN
Definition: keycodes.qc:39
float K_MWHEELDOWN
Definition: keycodes.qc:133
bool autocvar__con_chat_maximized
Definition: chat.qh:6
vector mousepos
Definition: hud.qh:102
float K_PGUP
Definition: keycodes.qc:40
float K_MWHEELUP
Definition: keycodes.qc:132
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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().