19#include "AchievementManager.h"
20#include "ActivityPubClient.h"
21#include "ArchiveItemManager.h"
22#include "CustomGameLibrary.h"
23#include "ControlBindingsManager.h"
24#include "RenderingManager.h"
25#include "FingerClient.h"
26#include "GopherClient.h"
27#include "HTTPReceiver.h"
29#include "MapLibrary.h"
30#include "MatrixClient.h"
31#include "MenuBackground.h"
32#include "MenuDataFeed.h"
33#include "MusicController.h"
34#include "OnlineServices.h"
35#include "PackageManager.h"
36#include "PlatformCommands.h"
37#include "ProfileManager.h"
38#include "RichPresence.h"
39#include "SaveGameLibrary.h"
40#include "ServerErrorHandler.h"
41#include "PlayerModelLibrary.h"
42#include "GametypeLibrary.h"
43#include "TCPHandler.h"
44#include "WorldFinder.h"
45#include "WorldSetup.h"
70#include "../shared/system/ConstantManager.h"
71#include "../shared/system/ConstantManager.qc"
73int stoi(
string inputString)
75 return (
int)stof(inputString);
81__variant(
float prnum,
string varname) externvalue = #203;
84linkToMenuProgs(
string funcName)
86 static void empty(
void)
88 print(
"Called unimplemented menu-side API call.\n");
91 void *func = externvalue(0, funcName);
94 return ((__variant)func);
102void drawrect(vector pos, vector sz,
float thickness, vector rgb,
float al, optional
float dfl)
105 drawfill(pos, [sz[0], thickness], rgb, al, dfl);
107 drawfill(pos + [0, sz[1] - thickness], [sz[0], thickness], rgb, al, dfl);
109 drawfill(pos + [0, thickness], [thickness, sz[1] - (thickness * 2)], rgb, al, dfl);
111 drawfill(pos + [sz[0] - thickness, thickness], [thickness, sz[1] - (thickness * 2)], rgb, al, dfl);
115UIPF_draw_Rect(vector pos, vector size, vector rgb,
float a)
117 drawfill(pos, size, rgb, a);
121UIPF_draw_RectOutline(vector pos, vector size,
float thickness, vector rgb,
float a)
123 drawrect(pos, size, thickness, rgb, a);
127UIPF_draw_RoundedRectOutline(vector pos, vector size, vector rgb,
float a)
129 float tileScale = 1.0f;
132 tileScale = size[1] / 32;
135 vector tileSize = g_vec_null;
136 tileSize[0] = tileSize[1] = (16 * tileScale);
138 drawpic(pos,
"gfx/ui/m_linetopleft.tga", [16,16], rgb, a, 0);
139 drawpic(pos + [size[0] - 16, 0],
"gfx/ui/m_linetopright.tga", [16,16], rgb, a, 0);
140 drawpic(pos + [0, size[1] - 16],
"gfx/ui/m_linebottomleft.tga", [16,16], rgb, a, 0);
141 drawpic(pos + [size[0] - 16, size[1] - 16],
"gfx/ui/m_linebottomright.tga", [16,16], rgb, a, 0);
144 drawpic(pos + [16, 0],
"gfx/ui/m_linetop.tga", [size[0] - 32, 16], rgb, a, 0);
145 drawpic(pos + [16, size[1] - 16],
"gfx/ui/m_linebottom.tga", [size[0] - 32, 16], rgb, a, 0);
149 drawpic(pos + [0, 16],
"gfx/ui/m_lineleft.tga", [16, size[1] - 32], rgb, a, 0);
150 drawpic(pos + [size[0] - 16, 16],
"gfx/ui/m_lineright.tga", [16, size[1] - 32], rgb, a, 0);
151 drawpic(pos + [16, 16],
"gfx/ui/m_linemid.tga", [size[0] - 32, size[1] - 32], rgb, a, 0);
156UIPF_draw_RoundedBox(vector pos, vector size, vector rgb,
float a)
158 float tileScale = 1.0f;
161 tileScale = size[1] / 32;
164 vector tileSize = g_vec_null;
165 tileSize[0] = tileSize[1] = (16 * tileScale);
167 drawpic(pos,
"gfx/ui/m_topleft.tga", tileSize, rgb, a, 0);
168 drawpic(pos + [size[0] - tileSize[0], 0],
"gfx/ui/m_topright.tga", tileSize, rgb, a, 0);
169 drawpic(pos + [0, size[1] - tileSize[1]],
"gfx/ui/m_bottomleft.tga", tileSize, rgb, a, 0);
170 drawpic(pos + [size[0] - tileSize[0], size[1] - tileSize[1]],
"gfx/ui/m_bottomright.tga", tileSize, rgb, a, 0);
173 drawpic(pos + [tileSize[0], 0],
"gfx/ui/m_top.tga", [size[0] - (tileSize[0] * 2), tileSize[1]], rgb, a, 0);
174 drawpic(pos + [tileSize[0], size[1] - tileSize[1]],
"gfx/ui/m_bottom.tga", [size[0] - (tileSize[0] * 2), tileSize[1]], rgb, a, 0);
178 drawpic(pos + [0, tileSize[1]],
"gfx/ui/m_left.tga", [tileSize[0], size[1] - (tileSize[0] * 2)], rgb, a, 0);
179 drawpic(pos + [size[0] - tileSize[0], tileSize[1]],
"gfx/ui/m_right.tga", [tileSize[0], size[1] - (tileSize[0] * 2)], rgb, a, 0);
180 drawpic(pos + [tileSize[0], tileSize[1]],
"gfx/ui/m_mid.tga", [size[0] - (tileSize[0] * 2), size[1] - (tileSize[0] * 2)], rgb, a, 0);
185UIPF_draw_Line(
float thickness, vector pos1, vector pos2, vector rgb,
float a)
187 drawline(thickness, pos1, pos2, rgb, a);
191UIPF_draw_Pic(vector pos,
string material, vector size, vector rgb,
float a,
float imageFlags)
193 drawpic(pos,
material, size, rgb, a, imageFlags);
197UIPF_draw_SubPic(vector pos, vector displaySize,
string material, vector sourcePos, vector sourceSize, vector rgb,
float a,
float imageFlags)
199 drawsubpic(pos, displaySize,
material, sourcePos, sourceSize, rgb, a, imageFlags);
204Util_CheckMouse(
int x,
int y,
int sx,
int sy)
217 if (g_vecMousePos[0] >= mins[0] && g_vecMousePos[0] <= maxs[0]) {
218 if (g_vecMousePos[1] >= mins[1] && g_vecMousePos[1] <= maxs[1]) {
227Util_CmdToKey(
string cmd)
229 float fBindKey = tokenize(findkeysforcommand(cmd));
233 for(j = 0; j < fBindKey; ++j) {
237 sBindTx = strcat(sBindTx,
", ");
239 sBindTx = strcat(sBindTx, keynumtostring(k));
var materialAPI_t material
Access atlasPicAPI_t functions using this variable.
Definition: api_func.h:569