From 47eb67a2dfaeeae2a37cd72c89bd9340c1229f02 Mon Sep 17 00:00:00 2001 From: ac_stef Date: Sat, 6 Dec 2008 18:57:52 +0000 Subject: [PATCH] 'showscores' now takes an argument instead of a keypress; hide scores, when minimap is shown git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3890 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- config/resetbinds.cfg | 4 ++-- source/src/protos.h | 2 +- source/src/scoreboard.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config/resetbinds.cfg b/config/resetbinds.cfg index c2568fd3..909a2765 100644 --- a/config/resetbinds.cfg +++ b/config/resetbinds.cfg @@ -9,7 +9,7 @@ bind MOUSE3 "weapon" bind MOUSE4 "universaldelta 1" bind MOUSE5 "universaldelta -1" bind BACKSPACE [ if $editing [ delent ] [ dropflag ] ] -bind TAB "showscores" +bind TAB [ showscores 1; onrelease [ showscores 0 ] ] bind CLEAR "" bind RETURN "" bind PAUSE "" @@ -128,7 +128,7 @@ bind LSHIFT "crouch" bind RCTRL "jump" bind LCTRL "jump" bind RALT "" -bind LALT "toggleshowmap" +bind LALT "showscores 0; toggleshowmap" bind RMETA "" bind LMETA "" bind LSUPER "" diff --git a/source/src/protos.h b/source/src/protos.h index de11136a..c9baf636 100644 --- a/source/src/protos.h +++ b/source/src/protos.h @@ -399,7 +399,7 @@ extern void votecount(int v); extern void clearvote(); // scoreboard -extern void showscores(bool on); +extern void showscores(int on); extern void renderscores(void *menu, bool init); extern const char *asciiscores(bool destjpg = false); extern void consolescores(); diff --git a/source/src/scoreboard.cpp b/source/src/scoreboard.cpp index de0259c0..beee0406 100644 --- a/source/src/scoreboard.cpp +++ b/source/src/scoreboard.cpp @@ -5,7 +5,7 @@ void *scoremenu = NULL, *teammenu = NULL, *ctfmenu = NULL; -void showscores(bool on) +void showscores(int on) { if(on) showmenu(m_flags ? "ctf score" : (m_teammode ? "team score" : "score"), false); else @@ -16,7 +16,7 @@ void showscores(bool on) } } -COMMAND(showscores, ARG_DOWN); +COMMAND(showscores, ARG_1INT); struct sline {