return true;
}
- // allow console bind to work
- string con_keys = findkeysforcommand("toggleconsole", 0);
- int keys = tokenize(con_keys); // findkeysforcommand returns data for this
-
- bool hit_con_bind = false;
- int i;
- for (i = 0; i < keys; ++i)
- {
- if(nPrimary == stof(argv(i)))
- hit_con_bind = true;
- }
-
+ int hudShiftState_prev = hudShiftState;
+ int mouseClicked_prev = mouseClicked;
if(key_pressed) {
if(nPrimary == K_ALT) hudShiftState |= S_ALT;
if(nPrimary == K_CTRL) hudShiftState |= S_CTRL;
vector candidate_pos = '0 0 0';
const float LEVELS_NUM = 4;
float level_height = vid_conheight / LEVELS_NUM;
-LABEL(find_tab_panel)
+ LABEL(find_tab_panel)
level = floor(tab_panel_pos.y / level_height) * level_height; //starting level
candidate_pos.x = (!tab_backward) ? vid_conwidth : 0;
start_posX = tab_panel_pos.x;
k=0;
while(++k)
{
- for(i = 0; i < REGISTRY_COUNT(hud_panels); ++i)
+ for(int i = 0; i < REGISTRY_COUNT(hud_panels); ++i)
{
panel = REGISTRY_GET(hud_panels, i);
if(!(panel.panel_configflags & PANEL_CONFIG_MAIN))
if (highlightedPanel)
HUD_Panel_EnableMenu();
}
- else if(hit_con_bind || nPrimary == K_PAUSE)
+ else if(nPrimary == K_PAUSE)
return false;
+ else if (hudShiftState_prev == hudShiftState && mouseClicked_prev == mouseClicked)
+ {
+ // allow console bind to work
+ string con_keys = findkeysforcommand("toggleconsole", 0);
+ int keys = tokenize(con_keys); // findkeysforcommand returns data for this
+ for (int i = 0; i < keys; ++i)
+ {
+ if(nPrimary == stof(argv(i)))
+ return false; // hit console bind
+ }
+ }
return true;
}
// allow console bind to work
string con_keys = findkeysforcommand("toggleconsole", 0);
int keys = tokenize(con_keys); // findkeysforcommand returns data for this
- int i;
- for (i = 0; i < keys; ++i)
+ for (int i = 0; i < keys; ++i)
{
if(nPrimary == stof(argv(i)))
return false; // hit console bind