Skip to content

Commit e3e7a9e

Browse files
committed
Don't open the scoreboard when pressing "TAB" if the command line is open
Add `iscmdlineopen` command
1 parent 662c451 commit e3e7a9e

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

config/ui/hud/gamehud.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ newui "gamehud" [
7878
// SCOREBOARD DISPLAY GROUP //
7979
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
8080

81-
if (iskeyheld "TAB") [
81+
if (&& [iskeyheld "TAB"] [! $iscmdlineopen]) [
8282
if (uivisible "scoreboard") [] [ showui "scoreboard" ]
8383
uivlist $uiPad:5XL [
8484
uialign 0 -1

source/engine/console.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,7 @@ int iskeyheld(char *key)
599599
return SDL_GetKeyboardState(nullptr)[scancode];
600600
}
601601
ICOMMAND(iskeyheld, "s", (char* key), intret(iskeyheld(key)));
602+
ICOMMAND(iscmdlineopen, "", (), intret(commandmillis >= 0 ? 1 : 0));
602603

603604
bool consoleinput(const char *str, int len)
604605
{

0 commit comments

Comments
 (0)