- got rid of all DTA_Translation uses.
This commit is contained in:
parent
dadc8e2ec2
commit
470dc138c6
5 changed files with 11 additions and 24 deletions
|
|
@ -332,7 +332,6 @@ void DTextEnterMenu::Drawer ()
|
|||
const int ch = InputGridChars[y * INPUTGRID_WIDTH + x];
|
||||
FTexture *pic = SmallFont->GetChar(ch, &width);
|
||||
EColorRange color;
|
||||
FRemapTable *remap;
|
||||
|
||||
// The highlighted character is yellow; the rest are dark gray.
|
||||
color = (x == InputGridX && y == InputGridY) ? CR_YELLOW : CR_DARKGRAY;
|
||||
|
|
@ -344,13 +343,14 @@ void DTextEnterMenu::Drawer ()
|
|||
}
|
||||
else if (ch == ' ')
|
||||
{
|
||||
FRemapTable *remap = SmallFont->GetColorTranslation(color);
|
||||
// Draw the space as a box outline. We also draw it 50% wider than it really is.
|
||||
const int x1 = xx + cell_width/2 - width * CleanXfac * 3 / 4;
|
||||
const int x2 = x1 + width * 3 * CleanXfac / 2;
|
||||
const int y1 = yy + top_padding;
|
||||
const int y2 = y1 + SmallFont->GetHeight() * CleanYfac;
|
||||
const int palentry = remap->Remap[remap->NumEntries*2/3];
|
||||
const uint32 palcolor = remap->Palette[remap->NumEntries*2/3];
|
||||
const int palentry = remap->Remap[remap->NumEntries * 2 / 3];
|
||||
const uint32 palcolor = remap->Palette[remap->NumEntries * 2 / 3];
|
||||
screen->Clear(x1, y1, x2, y1+CleanYfac, palentry, palcolor); // top
|
||||
screen->Clear(x1, y2, x2, y2+CleanYfac, palentry, palcolor); // bottom
|
||||
screen->Clear(x1, y1+CleanYfac, x1+CleanXfac, y2, palentry, palcolor); // left
|
||||
|
|
|
|||
|
|
@ -360,13 +360,14 @@ DListMenuItemPlayerDisplay::DListMenuItemPlayerDisplay(FListMenuDescriptor *menu
|
|||
{
|
||||
mOwner = menu;
|
||||
|
||||
FRemapTable *bdremap = translationtables[TRANSLATION_Players][MAXPLAYERS + 1];
|
||||
for (int i = 0; i < 256; i++)
|
||||
{
|
||||
int r = c1.r + c2.r * i / 255;
|
||||
int g = c1.g + c2.g * i / 255;
|
||||
int b = c1.b + c2.b * i / 255;
|
||||
mRemap.Remap[i] = ColorMatcher.Pick (r, g, b);
|
||||
mRemap.Palette[i] = PalEntry(255, r, g, b);
|
||||
bdremap->Remap[i] = ColorMatcher.Pick (r, g, b);
|
||||
bdremap->Palette[i] = PalEntry(255, r, g, b);
|
||||
}
|
||||
mBackdrop = new FBackdropTexture;
|
||||
mPlayerClass = NULL;
|
||||
|
|
@ -574,10 +575,10 @@ void DListMenuItemPlayerDisplay::Drawer(bool selected)
|
|||
int x = (mXpos - 160) * CleanXfac + (SCREENWIDTH>>1);
|
||||
int y = (mYpos - 100) * CleanYfac + (SCREENHEIGHT>>1);
|
||||
|
||||
screen->DrawTexture (mBackdrop, x, y - 1,
|
||||
screen->DrawTexture(mBackdrop, x, y - 1,
|
||||
DTA_DestWidth, 72 * CleanXfac,
|
||||
DTA_DestHeight, 80 * CleanYfac,
|
||||
DTA_Translation, &mRemap,
|
||||
DTA_TranslationIndex, TRANSLATION(TRANSLATION_Players, MAXPLAYERS + 1),
|
||||
DTA_Masked, true,
|
||||
TAG_DONE);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue