- since we already got lots of CVAR descriptions from the menu's content, let's use that as CVAR description if none is explicitly provided.
This also necessitated localization support for CVAR descriptions because menu content is multi-language.
This commit is contained in:
parent
bb3e100c54
commit
3a23cc69d6
4 changed files with 23 additions and 1 deletions
|
|
@ -34,6 +34,7 @@
|
|||
|
||||
#include "v_video.h"
|
||||
#include "menu/menu.h"
|
||||
#include "vm.h"
|
||||
|
||||
|
||||
//=============================================================================
|
||||
|
|
@ -52,3 +53,16 @@ DMenuItemBase *DOptionMenuDescriptor::GetItem(FName name)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void SetCVarDescription(FBaseCVar* cvar, const FString* label)
|
||||
{
|
||||
cvar->AddDescription(*label);
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(_OptionMenuItemOption, SetCVarDescription, SetCVarDescription)
|
||||
{
|
||||
PARAM_PROLOGUE;
|
||||
PARAM_POINTER(cv, FBaseCVar);
|
||||
PARAM_STRING(label);
|
||||
SetCVarDescription(cv, &label);
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue