mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
git-svn-id: https://svn.eduke32.com/eduke32@811 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
9ea5b3febf
commit
586ad8bab4
2 changed files with 20 additions and 3 deletions
|
@ -161,7 +161,9 @@ keydef keynames[]=
|
|||
{"BACKSPACE", sc_BackSpace},
|
||||
{"TAB", sc_Tab},
|
||||
{"LEFTALT", sc_LeftAlt},
|
||||
{"RIGHTALT", sc_RightAlt},
|
||||
{"LEFTCONTROL", sc_LeftControl},
|
||||
{"RIGHTCONTROL",sc_RightControl},
|
||||
{"CAPSLOCK", sc_CapsLock},
|
||||
{"LEFTSHIFT", sc_LeftShift},
|
||||
{"RIGHTSHIFT", sc_RightShift},
|
||||
|
@ -244,6 +246,12 @@ keydef keynames[]=
|
|||
{"X", sc_X},
|
||||
{"Y", sc_Y},
|
||||
{"Z", sc_Z},
|
||||
|
||||
{"UPARROW", sc_UpArrow},
|
||||
{"DOWNARROW", sc_DownArrow},
|
||||
{"LEFTARROW", sc_LeftArrow},
|
||||
{"RIGHTARROW", sc_RightArrow},
|
||||
|
||||
{0,0}
|
||||
};
|
||||
|
||||
|
|
|
@ -970,6 +970,7 @@ static int osdcmd_bind(const osdfuncparm_t *parm)
|
|||
for (i=0;keynames[i].name;i++)OSD_Printf("%s\n",keynames[i].name);
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
if (parm->numparms==0)
|
||||
{
|
||||
OSD_Printf("Keybindings:\n");
|
||||
|
@ -978,12 +979,17 @@ static int osdcmd_bind(const osdfuncparm_t *parm)
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
if (parm->numparms < 2) return OSDCMD_SHOWHELP;
|
||||
for (i=0;keynames[i].name;i++)
|
||||
if (!Bstrcasecmp(parm->parms[0],keynames[i].name))
|
||||
break;
|
||||
if (!keynames[i].name) return OSDCMD_SHOWHELP;
|
||||
|
||||
if (parm->numparms < 2)
|
||||
{
|
||||
OSD_Printf("%-11s = %s\n",keynames[i].name, boundkeys[keynames[i].id].name);
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
j = 1;
|
||||
if (parm->numparms >= 2 && !Bstrcasecmp(parm->parms[j],"repeat"))
|
||||
{
|
||||
|
@ -999,7 +1005,7 @@ static int osdcmd_bind(const osdfuncparm_t *parm)
|
|||
|
||||
static int osdcmd_unbind(const osdfuncparm_t *parm)
|
||||
{
|
||||
int i, j;
|
||||
int i;
|
||||
|
||||
if (parm->numparms==1&&!Bstrcasecmp(parm->parms[0],"all"))
|
||||
{
|
||||
|
@ -1079,8 +1085,11 @@ int registerosdcommands(void)
|
|||
OSD_RegisterFunction("unbind","unbind <key>: unbinds a key. Type \"unbind all\" to unbind all keys.", osdcmd_unbind);
|
||||
for (i=0;i<NUMGAMEFUNCTIONS;i++)
|
||||
{
|
||||
char *t;
|
||||
Bsprintf(tempbuf,"gamefunc_%s",gamefunctions[i]);
|
||||
OSD_RegisterFunction(Bstrdup(tempbuf),"game button",osdcmd_button);
|
||||
t = Bstrdup(tempbuf);
|
||||
Bstrcat(tempbuf,": game button");
|
||||
OSD_RegisterFunction(t,Bstrdup(tempbuf),osdcmd_button);
|
||||
}
|
||||
//baselayer_onvideomodechange = onvideomodechange;
|
||||
|
||||
|
|
Loading…
Reference in a new issue