Extend Team Arena Favorite Address edit field to hold an IPv6 address
This commit is contained in:
parent
7b34987823
commit
81f92fe7f0
1 changed files with 23 additions and 0 deletions
|
@ -5125,6 +5125,28 @@ void Item_SetupKeywordHash(void) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
===============
|
||||||
|
Item_ApplyHacks
|
||||||
|
|
||||||
|
Hacks to fix issues with Team Arena menu scripts
|
||||||
|
===============
|
||||||
|
*/
|
||||||
|
static void Item_ApplyHacks( itemDef_t *item ) {
|
||||||
|
|
||||||
|
// Fix length of favorite address in createfavorite.menu
|
||||||
|
if ( item->type == ITEM_TYPE_EDITFIELD && item->cvar && !Q_stricmp( item->cvar, "ui_favoriteAddress" ) ) {
|
||||||
|
editFieldDef_t *editField = (editFieldDef_t *)item->typeData;
|
||||||
|
|
||||||
|
// enough to hold an IPv6 address plus null
|
||||||
|
if ( editField->maxChars < 48 ) {
|
||||||
|
Com_Printf( "Extended create favorite address edit field length to hold an IPv6 address\n" );
|
||||||
|
editField->maxChars = 48;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
===============
|
===============
|
||||||
Item_Parse
|
Item_Parse
|
||||||
|
@ -5147,6 +5169,7 @@ qboolean Item_Parse(int handle, itemDef_t *item) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*token.string == '}') {
|
if (*token.string == '}') {
|
||||||
|
Item_ApplyHacks( item );
|
||||||
return qtrue;
|
return qtrue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue