OpenMoHAA 0.82.0
Loading...
Searching...
No Matches
cl_ui.h
1/*
2===========================================================================
3Copyright (C) 2023-2024 the OpenMoHAA team
4
5This file is part of OpenMoHAA source code.
6
7OpenMoHAA source code is free software; you can redistribute it
8and/or modify it under the terms of the GNU General Public License as
9published by the Free Software Foundation; either version 2 of the License,
10or (at your option) any later version.
11
12OpenMoHAA source code is distributed in the hope that it will be
13useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with OpenMoHAA source code; if not, write to the Free Software
19Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20===========================================================================
21*/
22
23#pragma once
24
25#include "../uilib/ui_extern.h"
26#include "../uilib/uiwidget.h"
27
28typedef struct {
29 UIReggedMaterial *loading;
31
32//
33// cvars
34//
35extern cvar_t *ui_health_start;
36extern cvar_t *ui_health_end;
37extern cvar_t *sound_overlay;
38extern cvar_t *cl_movieaudio;
39
40//
41// initialization
42//
43void CL_FillUIDef(void);
44void CL_InitializeUI(void);
45void CL_ShutdownUI(void);
46
47//
48// general ui stuff
49//
50extern inventory_t client_inv;
51extern bind_t client_bind;
52extern cvar_t *cl_greenfps;
53extern qboolean server_loading;
54extern const UColor UWhiteChatMessageColor;
55extern const UColor URedChatMessageColor;
56extern const UColor UGreenChatMessageColor;
57
58const char *CvarGetForUI(const char *name, const char *defval);
59void UI_ClearState(void);
60void CL_BeginRegistration(void);
61void CL_EndRegistration(void);
62float UI_GetObjectivesTop(void);
63void UI_GetHighResolutionScale(vec2_t scale);
64
65//
66// menu
67//
68extern Menu *ui_pLoadingMenu;
69
70void UI_ShowMenu(const char *name, qboolean bForce);
71void UI_HideMenu(const char *name, qboolean bForce);
72void UI_ForceMenuOff(bool force);
73void UI_PushMenu(const char *name);
74void UI_ForceMenu(const char *name);
75qboolean UI_BindActive(void);
76void UI_SetReturnMenuToCurrent(void);
77void UI_ActivateView3D(void);
78void UI_MenuEscape(const char *name);
79void UI_CreateScoreboard(void);
80qboolean UI_MenuActive(void);
81qboolean UI_MenuUp(void);
82void UI_FocusMenuIfExists(void);
83void UI_DrawConnect(void);
84void UI_CreateDialog(
85 const char *title,
86 char *cvarname,
87 const char *command,
88 const char *cancelCommand,
89 int width,
90 int height,
91 const char *shader,
92 const char *okshader,
93 const char *cancelshader
94 );
95void UI_ToggleDMConsole(int iMode);
96void UI_ShowScoreboard_f(const char *pszMenuName);
97void UI_HideScoreboard_f(void);
98void UI_SetScoreBoardItem(
99 int iItemNumber,
100 const char *pszData1,
101 const char *pszData2,
102 const char *pszData3,
103 const char *pszData4,
104 const char *pszData5,
105 const char *pszData6,
106 const char *pszData7,
107 const char *pszData8,
108 const vec4_t pTextColor,
109 const vec4_t pBackColor,
110 qboolean bIsHeader
111);
112void UI_DeleteScoreBoardItems(int iMaxIndex);
113
114//
115// ressources
116//
117void UI_BeginLoad(const char *pszMapName);
118void UI_EndLoad(void);
119void UI_AbortLoad(void);
120int CL_FontStringWidth(fontheader_t* pFont, const char* pszString, int iMaxLen);
121void UI_BeginLoadResource(void);
122void UI_EndLoadResource(void);
123void UI_EndLoadResource(const char *name);
124qboolean UI_IsResourceLoaded(const char *name);
125void UI_RegisterLoadResource(const char *name);
126void UI_ClearResource(void);
127void UI_LoadResource(const char *name);
128
129//
130// windows
131//
132void UI_DeactiveFloatingWindows(void);
133
134//
135// console
136//
137void UI_OpenConsole(void);
138qboolean UI_ConsoleIsVisible(void);
139qboolean UI_ConsoleIsOpen(void);
140void UI_CloseConsole(void);
141void UI_ToggleConsole(void);
142void UI_OpenDMConsole(int iMode);
143void UI_CloseDMConsole(void);
144void UI_ToggleDMConsole(int iMode);
145void UI_OpenDeveloperConsole(void);
146void UI_CloseDeveloperConsole(void);
147void UI_PrintConsole(const char *msg);
148
149//
150// callbacks
151//
152void UI_Update(void);
153void UI_ServerLoaded(void);
154void UI_ResolutionChange(void);
155void UI_KeyEvent(int key, unsigned int time);
156void UI_CharEvent(int ch);
Definition uimenu.h:28
Definition ucolor.h:25
Definition uiwidget.h:35
Definition cl_uibind.h:49
Definition cl_inv.h:114
Definition cl_ui.h:28