73 panel.panel_export(fh);
79 LOG_INFOF(_(
"^2Successfully exported to %s! (Note: It's saved in data/data/)"), filename);
83 LOG_INFOF(_(
"^1Couldn't write to %s"), filename);
100 vector myCenter, targCenter;
128 myCenter.x = myPos.x + 0.5 * mySize.x;
129 myCenter.y = myPos.y + 0.5 * mySize.y;
134 if (myCenter.x < targCenter.x && myCenter.y < targCenter.y)
141 else if (myCenter.x > targCenter.x && myCenter.y < targCenter.y)
148 else if (myCenter.x < targCenter.x && myCenter.y > targCenter.y)
155 else if (myCenter.x > targCenter.x && myCenter.y > targCenter.y)
199 float ratio = mySize.x / mySize.y;
217 if (resizeorigin.x >
panel_pos.x && resizeorigin.x < targEndPos.x && resizeorigin.y >
panel_pos.y && resizeorigin.y < targEndPos.y)
227 if (targEndPos.x <= resizeorigin.x - mySize.x)
229 if (targEndPos.y <= resizeorigin.y - mySize.y)
238 dist.x = resizeorigin.x - targEndPos.x;
239 dist.y = resizeorigin.y - targEndPos.y;
240 if (dist.y <= 0 || dist.x / dist.y > ratio)
241 mySize.x =
min(mySize.x, dist.x);
243 mySize.y =
min(mySize.y, dist.y);
247 if (resizeorigin.x >= targEndPos.x)
251 if (
panel_pos.x >= resizeorigin.x + mySize.x)
253 if (targEndPos.y <= resizeorigin.y - mySize.y)
257 dist.y = resizeorigin.y - targEndPos.y;
258 if (dist.y <= 0 || dist.x / dist.y > ratio)
259 mySize.x =
min(mySize.x, dist.x);
261 mySize.y =
min(mySize.y, dist.y);
267 if (resizeorigin.y >= targEndPos.y)
269 if (targEndPos.x <= resizeorigin.x - mySize.x)
271 if (
panel_pos.y >= resizeorigin.y + mySize.y)
274 dist.x = resizeorigin.x - targEndPos.x;
276 if (dist.y <= 0 || dist.x / dist.y > ratio)
277 mySize.x =
min(mySize.x, dist.x);
279 mySize.y =
min(mySize.y, dist.y);
283 if (resizeorigin.x >= targEndPos.x)
285 if (resizeorigin.y >= targEndPos.y)
287 if (
panel_pos.x >= resizeorigin.x + mySize.x)
289 if (
panel_pos.y >= resizeorigin.y + mySize.y)
294 if (dist.y <= 0 || dist.x / dist.y > ratio)
295 mySize.x =
min(mySize.x, dist.x);
297 mySize.y =
min(mySize.y, dist.y);
329 myPos.x = resizeorigin.x - mySize.x;
330 myPos.y = resizeorigin.y - mySize.y;
334 myPos.x = resizeorigin.x;
335 myPos.y = resizeorigin.y - mySize.y;
339 myPos.x = resizeorigin.x - mySize.x;
340 myPos.y = resizeorigin.y;
344 myPos.x = resizeorigin.x;
345 myPos.y = resizeorigin.y;
350 mySize.x = mySize.x + myPos.x;
352 mySize.y = mySize.y + myPos.y;
380 myPos.x = resizeorigin.x - mySize.x;
381 myPos.y = resizeorigin.y - mySize.y;
385 myPos.x = resizeorigin.x;
386 myPos.y = resizeorigin.y - mySize.y;
390 myPos.x = resizeorigin.x - mySize.x;
391 myPos.y = resizeorigin.y;
395 myPos.x = resizeorigin.x;
396 myPos.y = resizeorigin.y;
548 bool key_pressed = bInputType == 0;
640 float k, level = 0, start_posX;
641 vector candidate_pos =
'0 0 0';
642 const float LEVELS_NUM = 4;
644 LABEL(find_tab_panel)
678 starting_panel = old_tab_panel;
679 old_tab_panel =
NULL;
797 string con_keys = findkeysforcommand(
"toggleconsole", 0);
799 for (
int i = 0; i < keys; ++i)
858 for (i = place; i > 0; --i)
1070 for (i = 0; i < n; ++i)
1123const string hlBorder =
"gfx/hud/default/border_highlighted";
1124const string hlBorder2 =
"gfx/hud/default/border_highlighted2";
1142 for (
int i = 0; i < n; ++i)
1145 if (xpos_rel <= 0 || xpos_rel >= 1)
1151 vector col =
'1 0 0' * f +
'0 1 0' * (1 - f);
1152 float theAlpha = 0.3 + 0.1 *
sin(6 *
time);
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
void drawpic_tiled(vector pos, string pic, vector sz, vector area, vector color, float theAlpha, float drawflag)
#define drawfill(position, size, rgb, alpha, flag)
float autocvar_con_chatsize
const float DRAWFLAG_NORMAL
entity highlightedPanel_backup
vector panel_click_distance
string autocvar__hud_panelorder
float autocvar__menu_alpha
float hud_dynamic_shake_factor
int panel_order[REGISTRY_MAX(hud_panels)]
#define HUD_Panel_UpdatePosSize()
string hud_panelorder_prev
const int PANEL_CONFIG_CANBEOFF
const int PANEL_CONFIG_MAIN
vector panel_click_resizeorigin
void HUD_Panel_FirstInDrawQ(float id)
void HUD_Panel_ExportCfg(string cfgname)
void HUD_Panel_HlCenterLine(float myBorder)
int HUD_Panel_Check_Mouse_Pos(bool allow_move)
vector highlightedPanel_initial_pos
void HUD_Configure_DrawGrid()
entity tab_panels[REGISTRY_MAX(hud_panels)]
void HUD_Panel_HlBorder(float myBorder, vector color, float theAlpha)
vector HUD_Panel_CheckResize(vector mySize, vector resizeorigin)
void HUD_Panel_SetPosSize(vector mySize)
void HUD_Panel_Highlight(float allow_move)
float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary)
void HUD_Configure_PostDraw()
vector highlightedPanel_initial_size
void HUD_Panel_SetPos(vector pos)
void HUD_Panel_EnableMenu()
void HUD_Panel_Arrow_Action(float nPrimary)
vector HUD_Panel_CheckMove(vector myPos, vector mySize)
void HUD_Configure_Exit_Force()
void HUD_Configure_Frame()
vector hud_configure_gridSize
float prevMouseClickedTime
#define HUD_Write_Cvar(cvar)
float hud_configure_checkcollisions
float autocvar_hud_configure_grid_alpha
vector hud_configure_realGridSize
string autocvar_hud_configure_vertical_lines
bool autocvar__hud_configure
#define HUD_Write_PanelCvar(cvar_suf)
bool autocvar_hud_configure_checkcollisions
vector prevMouseClickedPos
float hud_configure_centerline_time
bool autocvar_hud_configure_grid
float hud_configure_menu_open
noref float vid_conheight
ERASEABLE float map_bound_ranges(float value, float src_min, float src_max, float dest_min, float dest_max)
Same as map_ranges except that values outside the source range are clamped to min or max.
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))
#define REGISTRY_COUNT(id)
#define REGISTRY_GET(id, i)
ERASEABLE string ftos_mindecimals(float number)
Converts a number to a string with the minimum number of decimals It assumes that an extreme accuracy...