#include "xonotic/util.qh"
-#include "../common/items/all.qh"
-#include <common/weapons/all.qh>
+#include "../common/items/_mod.qh"
+#include <common/weapons/_all.qh>
#include "../common/mapinfo.qh"
#include "../common/mutators/base.qh"
cvar_set("_menu_prvm_language", prvm_language);
#ifdef WATERMARK
- LOG_INFOF("^4MQC Build information: ^1%s\n", WATERMARK);
+ LOG_INFOF("^4MQC Build information: ^1%s", WATERMARK);
#endif
// list all game dirs (TEST)
if (m_goto_buffer)
{
m_goto(m_goto_buffer);
- strunzone(m_goto_buffer);
- m_goto_buffer = string_null;
+ strfree(m_goto_buffer);
}
if (Menu_Active) m_display(); // delayed menu display
if (mouseButtonsPressed < 0)
{
mouseButtonsPressed = 0;
- LOG_TRACE("Warning: released an already released button\n");
+ LOG_TRACE("Warning: released an already released button");
}
}
if (key == K_ALT) menuShiftState &= ~S_ALT;
else
{
draw_reset_cropped();
- if (!mouseButtonsPressed && key >= K_MOUSE1 && key <= K_MOUSE3) main.mousePress(main, menuMousePos);
+ if (!mouseButtonsPressed && key >= K_MOUSE1 && key <= K_MOUSE3)
+ main.mousePress(main, menuMousePos);
if (!main.keyDown(main, key, ascii, menuShiftState))
{
// disable menu on unhandled ESC
if (mouseButtonsPressed > 10)
{
mouseButtonsPressed = 10;
- LOG_TRACE("Warning: pressed an already pressed button\n");
+ LOG_TRACE("Warning: pressed an already pressed button");
}
}
if (key == K_ALT) menuShiftState |= S_ALT;
{
// fade out if tooltip of a certain item has changed
menuTooltipState = 3;
- if (prev_tooltip) strunzone(prev_tooltip);
- prev_tooltip = strzone(it.tooltip);
+ strcpy(prev_tooltip, it.tooltip);
}
else if (menuTooltipItem && !m_testmousetooltipbox(pos))
{
menuTooltipOrigin.x = -1; // unallocated
- if (menuTooltipText) strunzone(menuTooltipText);
- menuTooltipText = strzone(gettooltip());
+ strcpy(menuTooltipText, gettooltip());
int i = 0;
float w = 0;
if (menuTooltipItem == NULL)
{
- if (menuTooltipText)
- {
- strunzone(menuTooltipText);
- menuTooltipText = string_null;
- }
+ strfree(menuTooltipText);
return;
}
else
postMenuDraw();
frametime = 0;
+ IL_ENDFRAME();
}
void m_display()
{
if (!menuInitialized)
{
- if (m_goto_buffer) strunzone(m_goto_buffer);
- m_goto_buffer = strzone(itemname);
+ strcpy(m_goto_buffer, itemname);
return;
}
if (itemname == "") // this can be called by GameCommand
if ((e) && (!e.requiresConnection || (gamestatus & (GAME_ISSERVER | GAME_CONNECTED))))
{
+ if(!Menu_Active)
+ e.hideMenuOnClose = true;
m_hide();
m_activate_window(e);
m_setpointerfocus(e);