mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-23 20:52:16 +00:00
Stuff
This commit is contained in:
parent
f5100250e4
commit
9b91bc80a8
5 changed files with 113 additions and 73 deletions
|
@ -6,7 +6,7 @@
|
||||||
--------------------Configuration: ui - Win32 Release TA--------------------
|
--------------------Configuration: ui - Win32 Release TA--------------------
|
||||||
</h3>
|
</h3>
|
||||||
<h3>Command Lines</h3>
|
<h3>Command Lines</h3>
|
||||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP183E.tmp" with contents
|
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP196A.tmp" with contents
|
||||||
[
|
[
|
||||||
/nologo /G6 /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UI_EXPORTS" /Fp"Release_TA/ta_ui.pch" /YX /Fo"Release_TA/" /Fd"Release_TA/" /FD /c
|
/nologo /G6 /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UI_EXPORTS" /Fp"Release_TA/ta_ui.pch" /YX /Fo"Release_TA/" /Fd"Release_TA/" /FD /c
|
||||||
"C:\Games\Quake3\rq3source\reaction\game\bg_misc.c"
|
"C:\Games\Quake3\rq3source\reaction\game\bg_misc.c"
|
||||||
|
@ -20,8 +20,8 @@ Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP183E.tmp" with cont
|
||||||
"C:\Games\Quake3\rq3source\reaction\ta_ui\ui_syscalls.c"
|
"C:\Games\Quake3\rq3source\reaction\ta_ui\ui_syscalls.c"
|
||||||
"C:\Games\Quake3\rq3source\reaction\ta_ui\ui_util.c"
|
"C:\Games\Quake3\rq3source\reaction\ta_ui\ui_util.c"
|
||||||
]
|
]
|
||||||
Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP183E.tmp"
|
Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP196A.tmp"
|
||||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP183F.tmp" with contents
|
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP196B.tmp" with contents
|
||||||
[
|
[
|
||||||
/nologo /base:"0x40000000" /dll /incremental:no /pdb:"Release_TA/uix86.pdb" /map:"Release_TA/uix86.map" /machine:I386 /def:".\ui.def" /out:"uix86.dll" /implib:"Release_TA/uix86.lib"
|
/nologo /base:"0x40000000" /dll /incremental:no /pdb:"Release_TA/uix86.pdb" /map:"Release_TA/uix86.map" /machine:I386 /def:".\ui.def" /out:"uix86.dll" /implib:"Release_TA/uix86.lib"
|
||||||
.\Release_TA\bg_misc.obj
|
.\Release_TA\bg_misc.obj
|
||||||
|
@ -35,7 +35,7 @@ Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP183F.tmp" with cont
|
||||||
.\Release_TA\ui_syscalls.obj
|
.\Release_TA\ui_syscalls.obj
|
||||||
.\Release_TA\ui_util.obj
|
.\Release_TA\ui_util.obj
|
||||||
]
|
]
|
||||||
Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP183F.tmp"
|
Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP196B.tmp"
|
||||||
<h3>Output Window</h3>
|
<h3>Output Window</h3>
|
||||||
Compiling...
|
Compiling...
|
||||||
bg_misc.c
|
bg_misc.c
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.10 2002/04/30 11:56:54 makro
|
||||||
|
// Stuff
|
||||||
|
//
|
||||||
// Revision 1.9 2002/04/07 17:51:49 makro
|
// Revision 1.9 2002/04/07 17:51:49 makro
|
||||||
// Abbey
|
// Abbey
|
||||||
//
|
//
|
||||||
|
@ -425,6 +428,15 @@ qboolean UI_ConsoleCommand( int realTime ) {
|
||||||
return qtrue;
|
return qtrue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Makro - tkok menu
|
||||||
|
if ( Q_stricmp (cmd, "ui_RQ3_tkok") == 0 ) {
|
||||||
|
if ( trap_Cvar_VariableValue("g_gametype") >= GT_TEAM)
|
||||||
|
_UI_SetActiveMenu(UIMENU_RQ3_TKOK);
|
||||||
|
else
|
||||||
|
Com_Printf("Not playing a team-based game.\n");
|
||||||
|
return qtrue;
|
||||||
|
}
|
||||||
|
|
||||||
//Makro - I've always wanted a command to inc/dec a cvar :)
|
//Makro - I've always wanted a command to inc/dec a cvar :)
|
||||||
if ( Q_stricmp (cmd, "inc") == 0 ) {
|
if ( Q_stricmp (cmd, "inc") == 0 ) {
|
||||||
if (trap_Argc() >= 2) {
|
if (trap_Argc() >= 2) {
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.19 2002/04/30 11:56:54 makro
|
||||||
|
// Stuff
|
||||||
|
//
|
||||||
// Revision 1.18 2002/04/22 18:40:58 makro
|
// Revision 1.18 2002/04/22 18:40:58 makro
|
||||||
// Model validation
|
// Model validation
|
||||||
//
|
//
|
||||||
|
@ -5569,6 +5572,9 @@ void _UI_Init( qboolean inGameLoad ) {
|
||||||
uiInfo.playingIntro = "";
|
uiInfo.playingIntro = "";
|
||||||
uiInfo.playingLoop = "";
|
uiInfo.playingLoop = "";
|
||||||
|
|
||||||
|
//Makro - set default bot skill to max
|
||||||
|
uiInfo.skillIndex = numSkillLevels - 1;
|
||||||
|
|
||||||
uiInfo.serverStatus.currentServerCinematic = -1;
|
uiInfo.serverStatus.currentServerCinematic = -1;
|
||||||
uiInfo.previewMovie = -1;
|
uiInfo.previewMovie = -1;
|
||||||
|
|
||||||
|
@ -5730,6 +5736,13 @@ void _UI_SetActiveMenu( uiMenuCommand_t menu ) {
|
||||||
Menus_CloseAll();
|
Menus_CloseAll();
|
||||||
Menus_ActivateByName("ingame_join");
|
Menus_ActivateByName("ingame_join");
|
||||||
return;
|
return;
|
||||||
|
case UIMENU_RQ3_TKOK:
|
||||||
|
trap_Cvar_Set( "cl_paused", "1" );
|
||||||
|
trap_Key_SetCatcher( KEYCATCH_UI );
|
||||||
|
UI_BuildPlayerList();
|
||||||
|
Menus_CloseAll();
|
||||||
|
Menus_ActivateByName("ingame_tkok");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6201,7 +6214,8 @@ static cvarTable_t cvarTable[] = {
|
||||||
{ &ui_smallFont, "ui_smallFont", "0.25", CVAR_ARCHIVE},
|
{ &ui_smallFont, "ui_smallFont", "0.25", CVAR_ARCHIVE},
|
||||||
{ &ui_bigFont, "ui_bigFont", "0.4", CVAR_ARCHIVE},
|
{ &ui_bigFont, "ui_bigFont", "0.4", CVAR_ARCHIVE},
|
||||||
{ &ui_findPlayer, "ui_findPlayer", "Sarge", CVAR_ARCHIVE},
|
{ &ui_findPlayer, "ui_findPlayer", "Sarge", CVAR_ARCHIVE},
|
||||||
{ &ui_Q3Model, "ui_q3model", "0", CVAR_ARCHIVE},
|
//Makro - adding CVAR_ROM
|
||||||
|
{ &ui_Q3Model, "ui_q3model", "1", CVAR_ARCHIVE | CVAR_ROM},
|
||||||
{ &ui_hudFiles, "cg_hudFiles", "ui/hud.txt", CVAR_ARCHIVE},
|
{ &ui_hudFiles, "cg_hudFiles", "ui/hud.txt", CVAR_ARCHIVE},
|
||||||
{ &ui_recordSPDemo, "ui_recordSPDemo", "0", CVAR_ARCHIVE},
|
{ &ui_recordSPDemo, "ui_recordSPDemo", "0", CVAR_ARCHIVE},
|
||||||
{ &ui_teamArenaFirstRun, "ui_teamArenaFirstRun", "0", CVAR_ARCHIVE},
|
{ &ui_teamArenaFirstRun, "ui_teamArenaFirstRun", "0", CVAR_ARCHIVE},
|
||||||
|
@ -6209,9 +6223,9 @@ static cvarTable_t cvarTable[] = {
|
||||||
{ &ui_realCaptureLimit, "capturelimit", "8", CVAR_SERVERINFO | CVAR_ARCHIVE | CVAR_NORESTART},
|
{ &ui_realCaptureLimit, "capturelimit", "8", CVAR_SERVERINFO | CVAR_ARCHIVE | CVAR_NORESTART},
|
||||||
{ &ui_serverStatusTimeOut, "ui_serverStatusTimeOut", "7000", CVAR_ARCHIVE},
|
{ &ui_serverStatusTimeOut, "ui_serverStatusTimeOut", "7000", CVAR_ARCHIVE},
|
||||||
//Makro - cvar for player model display
|
//Makro - cvar for player model display
|
||||||
{ &ui_RQ3_modelCommand, "ui_RQ3_modelCommand", "0", CVAR_ARCHIVE},
|
{ &ui_RQ3_modelCommand, "ui_RQ3_modelCommand", "0", 0},
|
||||||
{ &ui_RQ3_ssgCrosshair, "ui_RQ3_ssgCrosshair", "0", 0},
|
{ &ui_RQ3_ssgCrosshair, "ui_RQ3_ssgCrosshair", "0", 0},
|
||||||
{ &ui_RQ3_weapAfterJoin, "ui_RQ3_weapAfterJoin", "0", CVAR_ARCHIVE},
|
{ &ui_RQ3_weapAfterJoin, "ui_RQ3_weapAfterJoin", "1", CVAR_ARCHIVE},
|
||||||
//Makro - team counts
|
//Makro - team counts
|
||||||
{ &ui_RQ3_teamCount1, "g_RQ3_teamCount1", "0", 0},
|
{ &ui_RQ3_teamCount1, "g_RQ3_teamCount1", "0", 0},
|
||||||
{ &ui_RQ3_teamCount2, "g_RQ3_teamCount2", "0", 0},
|
{ &ui_RQ3_teamCount2, "g_RQ3_teamCount2", "0", 0},
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.5 2002/04/30 11:56:54 makro
|
||||||
|
// Stuff
|
||||||
|
//
|
||||||
// Revision 1.4 2002/03/03 21:22:58 makro
|
// Revision 1.4 2002/03/03 21:22:58 makro
|
||||||
// no message
|
// no message
|
||||||
//
|
//
|
||||||
|
@ -139,7 +142,8 @@ typedef enum {
|
||||||
//Makro - added weapon menu
|
//Makro - added weapon menu
|
||||||
UIMENU_RQ3_WEAPON,
|
UIMENU_RQ3_WEAPON,
|
||||||
//Makro - added join menu
|
//Makro - added join menu
|
||||||
UIMENU_RQ3_JOIN
|
UIMENU_RQ3_JOIN,
|
||||||
|
UIMENU_RQ3_TKOK
|
||||||
} uiMenuCommand_t;
|
} uiMenuCommand_t;
|
||||||
|
|
||||||
#define SORT_HOST 0
|
#define SORT_HOST 0
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.15 2002/04/30 11:56:54 makro
|
||||||
|
// Stuff
|
||||||
|
//
|
||||||
// Revision 1.14 2002/04/20 15:06:28 makro
|
// Revision 1.14 2002/04/20 15:06:28 makro
|
||||||
// Cool stuff :p
|
// Cool stuff :p
|
||||||
//
|
//
|
||||||
|
@ -2923,7 +2926,7 @@ static void Display_CloseCinematics() {
|
||||||
void Menus_Activate(menuDef_t *menu) {
|
void Menus_Activate(menuDef_t *menu) {
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
//Makro - better to check for this kind of stuff
|
//Makro - it's better to check for this kind of stuff
|
||||||
if (!menu) {
|
if (!menu) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2953,21 +2956,23 @@ void Menus_Activate(menuDef_t *menu) {
|
||||||
for (i=0; i<menu->itemCount; i++) {
|
for (i=0; i<menu->itemCount; i++) {
|
||||||
if (menu->items[i]->type == ITEM_TYPE_LISTBOX && menu->items[i]->special == FEEDER_Q3HEADS) {
|
if (menu->items[i]->type == ITEM_TYPE_LISTBOX && menu->items[i]->special == FEEDER_Q3HEADS) {
|
||||||
//Makro - select the right player model icon
|
//Makro - select the right player model icon
|
||||||
listBoxDef_t *listPtr;
|
listBoxDef_t *listPtr = (listBoxDef_t*)menu->items[i]->typeData;
|
||||||
int size = 2, start = 0, pos = UI_SelectedQ3Head(qtrue);
|
int size = 2, start = 0, end = 2, pos = UI_SelectedQ3Head(qtrue);
|
||||||
|
|
||||||
listPtr = (listBoxDef_t*)menu->items[i]->typeData;
|
|
||||||
if (listPtr->elementWidth) {
|
if (listPtr->elementWidth) {
|
||||||
size = (int) (menu->items[i]->window.rect.w / listPtr->elementWidth);
|
size = (int) (menu->items[i]->window.rect.w / listPtr->elementWidth);
|
||||||
if (size < 2)
|
if (size >= 2) {
|
||||||
break;
|
start = listPtr->startPos;
|
||||||
start = listPtr->startPos;
|
end = listPtr->endPos;
|
||||||
if ( start + size < pos)
|
if (start + size <= pos || pos + size <= end)
|
||||||
start = ((int) (pos / size)) * size;
|
start = ((int) (pos / size)) * size;
|
||||||
if (start + size > DC->feederCount(FEEDER_Q3HEADS))
|
if (start + size > DC->feederCount(FEEDER_Q3HEADS))
|
||||||
start = DC->feederCount(FEEDER_Q3HEADS) - size;
|
start = DC->feederCount(FEEDER_Q3HEADS) - size;
|
||||||
listPtr->startPos = start;
|
if (start < 0)
|
||||||
listPtr->endPos = start + size;
|
start = 0;
|
||||||
|
listPtr->startPos = start;
|
||||||
|
listPtr->endPos = start + size;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
listPtr->cursorPos = pos;
|
listPtr->cursorPos = pos;
|
||||||
menu->items[i]->cursorPos = pos;
|
menu->items[i]->cursorPos = pos;
|
||||||
|
@ -3633,57 +3638,62 @@ typedef struct
|
||||||
|
|
||||||
static bind_t g_bindings[] =
|
static bind_t g_bindings[] =
|
||||||
{
|
{
|
||||||
|
//Makro - 3rd column was filled with -1; adding secondary binds
|
||||||
|
// - also, fixed the tabbing
|
||||||
//Makro - using scores instead of +scores
|
//Makro - using scores instead of +scores
|
||||||
{"scores", K_TAB, -1, -1, -1},
|
{"scores", K_TAB, -1, -1, -1},
|
||||||
{"+button2", K_ENTER, -1, -1, -1},
|
//Makro - button2 was enter
|
||||||
{"+speed", K_SHIFT, -1, -1, -1},
|
{"+button2", -1, -1, -1, -1},
|
||||||
{"+forward", K_UPARROW, -1, -1, -1},
|
{"+speed", K_SHIFT, -1, -1, -1},
|
||||||
{"+back", K_DOWNARROW, -1, -1, -1},
|
{"+forward", K_UPARROW, 'w', -1, -1},
|
||||||
{"+moveleft", ',', -1, -1, -1},
|
{"+back", K_DOWNARROW, 's', -1, -1},
|
||||||
{"+moveright", '.', -1, -1, -1},
|
{"+moveleft", ',', 'a', -1, -1},
|
||||||
{"+moveup", K_SPACE, -1, -1, -1},
|
{"+moveright", '.', 'd', -1, -1},
|
||||||
{"+movedown", 'c', -1, -1, -1},
|
{"+moveup", K_SPACE, -1, -1, -1},
|
||||||
{"+left", K_LEFTARROW, -1, -1, -1},
|
{"+movedown", 'c', -1, -1, -1},
|
||||||
{"+right", K_RIGHTARROW, -1, -1, -1},
|
{"+left", K_LEFTARROW, -1, -1, -1},
|
||||||
{"+strafe", K_ALT, -1, -1, -1},
|
{"+right", K_RIGHTARROW, -1, -1, -1},
|
||||||
{"+lookup", K_PGDN, -1, -1, -1},
|
{"+strafe", K_ALT, -1, -1, -1},
|
||||||
{"+lookdown", K_DEL, -1, -1, -1},
|
{"+lookup", K_PGDN, -1, -1, -1},
|
||||||
{"+mlook", '/', -1, -1, -1},
|
{"+lookdown", K_DEL, -1, -1, -1},
|
||||||
{"centerview", K_END, -1, -1, -1},
|
{"+mlook", '/', -1, -1, -1},
|
||||||
{"+zoom", -1, -1, -1, -1},
|
{"centerview", K_END, -1, -1, -1},
|
||||||
|
{"+zoom", -1, -1, -1, -1},
|
||||||
//Blaze: Reaction Weapon binds
|
//Blaze: Reaction Weapon binds
|
||||||
//Jbravo: order is important.
|
//Jbravo: order is important.
|
||||||
{"weapon 1", '1', -1, -1, -1},
|
{"weapon 1", '1', -1, -1, -1},
|
||||||
{"weapon 2", '2', -1, -1, -1},
|
{"weapon 2", '2', -1, -1, -1},
|
||||||
{"weapon 3", '3', -1, -1, -1},
|
{"weapon 3", '3', -1, -1, -1},
|
||||||
{"weapon 4", '4', -1, -1, -1},
|
{"weapon 4", '4', -1, -1, -1},
|
||||||
{"weapon 5", '5', -1, -1, -1},
|
{"weapon 5", '5', -1, -1, -1},
|
||||||
{"weapon 6", '6', -1, -1, -1},
|
{"weapon 6", '6', -1, -1, -1},
|
||||||
{"weapon 7", '7', -1, -1, -1},
|
{"weapon 7", '7', -1, -1, -1},
|
||||||
{"weapon 8", '8', -1, -1, -1},
|
{"weapon 8", '8', -1, -1, -1},
|
||||||
{"weapon 9", '9', -1, -1, -1},
|
{"weapon 9", '9', -1, -1, -1},
|
||||||
{"+attack", K_CTRL, -1, -1, -1},
|
{"+attack", K_CTRL, K_MOUSE1, -1, -1},
|
||||||
{"weapprev", '[', -1, -1, -1},
|
{"weapprev", '[', -1, -1, -1},
|
||||||
{"weapnext", ']', -1, -1, -1},
|
{"weapnext", ']', 'q', -1, -1},
|
||||||
{"+button3", K_MOUSE3, -1, -1, -1},
|
//Makro - button3 was mouse3
|
||||||
{"messagemode", 't', -1, -1, -1},
|
{"+button3", -1, -1, -1, -1},
|
||||||
{"messagemode2", -1, -1, -1, -1},
|
{"messagemode", 't', -1, -1, -1},
|
||||||
{"messagemode3", -1, -1, -1, -1},
|
{"messagemode2", -1, -1, -1, -1},
|
||||||
{"messagemode4", -1, -1, -1, -1},
|
{"messagemode3", -1, -1, -1, -1},
|
||||||
{"bandage", -1, -1, -1, -1},
|
{"messagemode4", -1, -1, -1, -1},
|
||||||
|
{"bandage", 'b', -1, -1, -1},
|
||||||
//reload
|
//reload
|
||||||
{"+button5", -1, -1, -1, -1},
|
{"+button5", 'r', -1, -1, -1},
|
||||||
{"weapon", -1, -1, -1, -1},
|
{"weapon", K_MOUSE3, -1, -1, -1},
|
||||||
{"opendoor", -1, -1, -1, -1},
|
{"opendoor", K_ENTER, -1, -1, -1},
|
||||||
{"dropweapon", -1, -1, -1, -1},
|
{"dropweapon", 'x', -1, -1, -1},
|
||||||
{"dropitem", -1, -1, -1, -1},
|
{"dropitem", 'z', -1, -1, -1},
|
||||||
{"irvision", -1, -1, -1, -1},
|
{"irvision", 'v', -1, -1, -1},
|
||||||
//Makro - this one was missing
|
//Makro - this one was missing
|
||||||
{"specialweapon", -1, -1, -1, -1},
|
{"specialweapon", 'e', -1, -1, -1},
|
||||||
//Makro - for the weapon/item, join and radio menus
|
//Makro - for the weapon/item, join and radio menus
|
||||||
{"ui_RQ3_loadout", -1, -1, -1, -1},
|
{"ui_RQ3_loadout", 'l', -1, -1, -1},
|
||||||
{"ui_RQ3_joinTeam", -1, -1, -1, -1},
|
{"ui_RQ3_joinTeam", 'j', -1, -1, -1},
|
||||||
{"ui_RQ3_radio", -1, -1, -1, -1}
|
{"ui_RQ3_radio", -1, -1, -1, -1},
|
||||||
|
{"ui_RQ3_tkok", -1, -1, -1, -1}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -3918,7 +3928,8 @@ void Item_Bind_Paint(itemDef_t *item) {
|
||||||
value = (item->cvar) ? DC->getCVarValue(item->cvar) : 0;
|
value = (item->cvar) ? DC->getCVarValue(item->cvar) : 0;
|
||||||
|
|
||||||
if (item->window.flags & WINDOW_HASFOCUS) {
|
if (item->window.flags & WINDOW_HASFOCUS) {
|
||||||
if (g_bindItem == item) {
|
//Makro - if you bind a key, the item shouldn't keep flashing when you're done
|
||||||
|
if (g_bindItem == item && g_waitingForKey) {
|
||||||
lowLight[0] = 0.8f * 1.0f;
|
lowLight[0] = 0.8f * 1.0f;
|
||||||
lowLight[1] = 0.8f * 0.0f;
|
lowLight[1] = 0.8f * 0.0f;
|
||||||
lowLight[2] = 0.8f * 0.0f;
|
lowLight[2] = 0.8f * 0.0f;
|
||||||
|
@ -3972,25 +3983,24 @@ void UI_ClearBind( const char *cvar ) {
|
||||||
qboolean Item_Bind_HandleKey(itemDef_t *item, int key, qboolean down) {
|
qboolean Item_Bind_HandleKey(itemDef_t *item, int key, qboolean down) {
|
||||||
int id;
|
int id;
|
||||||
int i;
|
int i;
|
||||||
qboolean ok;
|
qboolean ok, returnVal;
|
||||||
|
|
||||||
//Makro - the mouse doesn't have to be over the item unless we're clicking on it instead of using the keyboard
|
//Makro - the mouse doesn't have to be over the item unless we're clicking on it instead of using the keyboard
|
||||||
ok = (Rect_ContainsPoint(&item->window.rect, DC->cursorx, DC->cursory) && UI_IsMouse(key)) || (item->window.flags && WINDOW_HASFOCUS);
|
ok = (Rect_ContainsPoint(&item->window.rect, DC->cursorx, DC->cursory) && UI_IsMouse(key)) || (item->window.flags && WINDOW_HASFOCUS);
|
||||||
|
|
||||||
if (ok && !g_waitingForKey)
|
if (ok && !g_waitingForKey)
|
||||||
{
|
{
|
||||||
|
returnVal = qfalse;
|
||||||
if (down && (key == K_MOUSE1 || key == K_ENTER)) {
|
if (down && (key == K_MOUSE1 || key == K_ENTER)) {
|
||||||
g_waitingForKey = qtrue;
|
g_waitingForKey = qtrue;
|
||||||
g_bindItem = item;
|
g_bindItem = item;
|
||||||
|
returnVal = qtrue;
|
||||||
//Makro - moved backspace code here; added up/down functionality (wtf was this missing?)
|
//Makro - moved backspace code here; added up/down functionality (wtf was this missing?)
|
||||||
} else if (key == K_BACKSPACE) {
|
} else if (key == K_BACKSPACE) {
|
||||||
UI_ClearBind(item->cvar);
|
UI_ClearBind(item->cvar);
|
||||||
} else if (key == K_UPARROW) {
|
returnVal = qtrue;
|
||||||
Menu_SetPrevCursorItem(item->parent);
|
|
||||||
} else if (key == K_DOWNARROW) {
|
|
||||||
Menu_SetNextCursorItem(item->parent);
|
|
||||||
}
|
}
|
||||||
return qtrue;
|
return returnVal;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue