- more work on graphics substitutiion
* added a CVAR that sets how localizable graphics need to be dealt with. * pass the substitution string to OkForLocalization so that proper checks can be performed. * increased item spacing on Doom's list menus to 18 from 16 pixels, because otherwise the diacritic letters would not fit. 20 would have been more ideal but 18 was the limit without compromising its visual style * added a second text-only main menu because here the spacing cannot be changed. Doing so would render any single-patch main menu non-functional. So here the rules are that if substitution takes place, it will swap out the entire menu class. * fixed some issues with the summary screen's "entering" and "finished" graphics.
This commit is contained in:
parent
a0c10df387
commit
48fcdacf06
16 changed files with 191 additions and 112 deletions
|
|
@ -304,13 +304,6 @@ DEFINE_ACTION_FUNCTION_NATIVE(_TexMan, CheckForTexture, CheckForTexture)
|
|||
ACTION_RETURN_INT(CheckForTexture(name, type, flags));
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(_TexMan, OkForLocalization)
|
||||
{
|
||||
PARAM_PROLOGUE;
|
||||
PARAM_INT(name);
|
||||
ACTION_RETURN_INT(true); // work for later. We need the definition to implement the language support
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// FTextureManager :: ListTextures
|
||||
|
|
@ -400,6 +393,35 @@ FTexture *FTextureManager::FindTexture(const char *texname, ETextureType usetype
|
|||
return GetTexture(texnum.GetIndex());
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// FTextureManager :: OkForLocalization
|
||||
//
|
||||
//==========================================================================
|
||||
CVAR(Int, cl_localizationmode,0, CVAR_ARCHIVE)
|
||||
|
||||
bool FTextureManager::OkForLocalization(FTextureID texnum, const char *substitute)
|
||||
{
|
||||
if (!texnum.isValid()) return false;
|
||||
|
||||
// Todo: Some decisions must be made here whether this texture is ok to use with the current locale settings.
|
||||
return !cl_localizationmode;
|
||||
}
|
||||
|
||||
static int OkForLocalization(int index, const FString &substitute)
|
||||
{
|
||||
return TexMan.OkForLocalization(FSetTextureID(index), substitute);
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(_TexMan, OkForLocalization, OkForLocalization)
|
||||
{
|
||||
PARAM_PROLOGUE;
|
||||
PARAM_INT(name);
|
||||
PARAM_STRING(subst)
|
||||
ACTION_RETURN_INT(OkForLocalization(name, subst));
|
||||
}
|
||||
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// FTextureManager :: AddTexture
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue