74 panel.panel_export(fh);
80 LOG_INFOF(_(
"^2Successfully exported to %s! (Note: It's saved in data/data/)"), filename);
84 LOG_INFOF(_(
"^1Couldn't write to %s"), filename);
101 vector myCenter, targCenter;
126 myCenter.x = myPos.x + 0.5 * mySize.x;
127 myCenter.y = myPos.y + 0.5 * mySize.y;
132 if(myCenter.x < targCenter.x && myCenter.y < targCenter.y)
139 else if(myCenter.x > targCenter.x && myCenter.y < targCenter.y)
146 else if(myCenter.x < targCenter.x && myCenter.y > targCenter.y)
153 else if(myCenter.x > targCenter.x && myCenter.y > targCenter.y)
199 float ratio = mySize.x/mySize.y;
214 if(resizeorigin.x >
panel_pos.x && resizeorigin.x < targEndPos.x && resizeorigin.y >
panel_pos.y && resizeorigin.y < targEndPos.y)
224 if (targEndPos.x <= resizeorigin.x - mySize.x)
226 if (targEndPos.y <= resizeorigin.y - mySize.y)
235 dist.x = resizeorigin.x - targEndPos.x;
236 dist.y = resizeorigin.y - targEndPos.y;
237 if (dist.y <= 0 || dist.x / dist.y > ratio)
238 mySize.x =
min(mySize.x, dist.x);
240 mySize.y =
min(mySize.y, dist.y);
244 if (resizeorigin.x >= targEndPos.x)
248 if (
panel_pos.x >= resizeorigin.x + mySize.x)
250 if (targEndPos.y <= resizeorigin.y - mySize.y)
254 dist.y = resizeorigin.y - targEndPos.y;
255 if (dist.y <= 0 || dist.x / dist.y > ratio)
256 mySize.x =
min(mySize.x, dist.x);
258 mySize.y =
min(mySize.y, dist.y);
264 if (resizeorigin.y >= targEndPos.y)
266 if (targEndPos.x <= resizeorigin.x - mySize.x)
268 if (
panel_pos.y >= resizeorigin.y + mySize.y)
271 dist.x = resizeorigin.x - targEndPos.x;
273 if (dist.y <= 0 || dist.x / dist.y > ratio)
274 mySize.x =
min(mySize.x, dist.x);
276 mySize.y =
min(mySize.y, dist.y);
280 if (resizeorigin.x >= targEndPos.x)
282 if (resizeorigin.y >= targEndPos.y)
284 if (
panel_pos.x >= resizeorigin.x + mySize.x)
286 if (
panel_pos.y >= resizeorigin.y + mySize.y)
291 if (dist.y <= 0 || dist.x / dist.y > ratio)
292 mySize.x =
min(mySize.x, dist.x);
294 mySize.y =
min(mySize.y, dist.y);
325 myPos.x = resizeorigin.x - mySize.x;
326 myPos.y = resizeorigin.y - mySize.y;
328 myPos.x = resizeorigin.x;
329 myPos.y = resizeorigin.y - mySize.y;
331 myPos.x = resizeorigin.x - mySize.x;
332 myPos.y = resizeorigin.y;
334 myPos.x = resizeorigin.x;
335 myPos.y = resizeorigin.y;
340 mySize.x = mySize.x + myPos.x;
342 mySize.y = mySize.y + myPos.y;
369 myPos.x = resizeorigin.x - mySize.x;
370 myPos.y = resizeorigin.y - mySize.y;
372 myPos.x = resizeorigin.x;
373 myPos.y = resizeorigin.y - mySize.y;
375 myPos.x = resizeorigin.x - mySize.x;
376 myPos.y = resizeorigin.y;
378 myPos.x = resizeorigin.x;
379 myPos.y = resizeorigin.y;
529 bool key_pressed = (bInputType == 0);
541 string con_keys = findkeysforcommand(
"toggleconsole", 0);
544 bool hit_con_bind =
false;
546 for (i = 0; i < keys; ++i)
628 float k, level = 0, start_posX;
629 vector candidate_pos =
'0 0 0';
630 const float LEVELS_NUM = 4;
632 LABEL(find_tab_panel)
666 starting_panel = old_tab_panel;
667 old_tab_panel =
NULL;
780 else if(hit_con_bind || nPrimary ==
K_PAUSE)
848 for(i = place; i > 0; --i)
1100 const string hlBorder =
"gfx/hud/default/border_highlighted";
1101 const string hlBorder2 =
"gfx/hud/default/border_highlighted2";
void HUD_Configure_Frame()
const int PANEL_CONFIG_CANBEOFF
vector HUD_Panel_CheckResize(vector mySize, vector resizeorigin)
bool autocvar__hud_configure
#define REGISTRY_GET(id, i)
float autocvar_con_chatsize
int panel_order[REGISTRY_MAX(hud_panels)]
float prevMouseClickedTime
float hud_dynamic_shake_factor
const int PANEL_CONFIG_MAIN
vector highlightedPanel_initial_pos
void HUD_Panel_HlBorder(float myBorder, vector color, float theAlpha)
#define HUD_Panel_UpdatePosSize()
void HUD_Panel_Arrow_Action(float nPrimary)
void HUD_Panel_EnableMenu()
vector panel_click_resizeorigin
#define REGISTRY_COUNT(id)
float autocvar_hud_configure_grid_alpha
float autocvar__menu_alpha
void HUD_Panel_Highlight(float allow_move)
bool autocvar_hud_configure_checkcollisions
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
vector highlightedPanel_initial_size
entity tab_panels[REGISTRY_MAX(hud_panels)]
void HUD_Configure_DrawGrid()
const float DRAWFLAG_NORMAL
void HUD_Configure_PostDraw()
bool autocvar_hud_configure_grid
vector(float skel, float bonenum) _skel_get_boneabs_hidden
vector hud_configure_realGridSize
#define HUD_Write_PanelCvar(cvar_suf)
void HUD_Panel_SetPosSize(vector mySize)
vector panel_click_distance
vector prevMouseClickedPos
vector hud_configure_gridSize
void HUD_Panel_ExportCfg(string cfgname)
void HUD_Configure_Exit_Force()
string hud_panelorder_prev
entity highlightedPanel_backup
float hud_configure_menu_open
void HUD_Panel_SetPos(vector pos)
void HUD_Panel_FirstInDrawQ(float id)
string autocvar__hud_panelorder
#define HUD_Write_Cvar(cvar)
int HUD_Panel_Check_Mouse_Pos(bool allow_move)
float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary)
float hud_configure_checkcollisions
void drawpic_tiled(vector pos, string pic, vector sz, vector area, vector color, float theAlpha, float drawflag)
vector HUD_Panel_CheckMove(vector myPos, vector mySize)