mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 07:12:02 +00:00
- made the different cursor characters for Raven's and the other small fonts a property of the font instead deciding based on the game.
SVN r2935 (trunk)
This commit is contained in:
parent
352a926ddf
commit
7e362819e4
5 changed files with 19 additions and 5 deletions
|
@ -252,7 +252,7 @@ void CT_Drawer (void)
|
|||
}
|
||||
|
||||
// draw the prompt, text, and cursor
|
||||
ChatQueue[len] = gameinfo.gametype & GAME_DoomChex ? '_' : '[';
|
||||
ChatQueue[len] = SmallFont->GetCursor();
|
||||
ChatQueue[len+1] = '\0';
|
||||
if (con_scaletext < 2)
|
||||
{
|
||||
|
|
|
@ -637,10 +637,11 @@ void DLoadSaveMenu::Drawer ()
|
|||
listboxLeft+1, listboxTop+rowHeight*i+CleanYfac, savegamestring,
|
||||
DTA_CleanNoMove, true, TAG_DONE);
|
||||
|
||||
char curs[2] = { SmallFont->GetCursor(), 0 };
|
||||
screen->DrawText (SmallFont, CR_WHITE,
|
||||
listboxLeft+1+SmallFont->StringWidth (savegamestring)*CleanXfac,
|
||||
listboxTop+rowHeight*i+CleanYfac,
|
||||
(gameinfo.gametype & (GAME_DoomStrifeChex)) ? "_" : "[",
|
||||
curs,
|
||||
DTA_CleanNoMove, true, TAG_DONE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -161,7 +161,7 @@ void FPlayerNameBox::Drawer(bool selected)
|
|||
else
|
||||
{
|
||||
size_t l = strlen(mEditName);
|
||||
mEditName[l] = (gameinfo.gametype & (GAME_DoomStrifeChex)) ? '_' : '[';
|
||||
mEditName[l] = SmallFont->GetCursor();
|
||||
mEditName[l+1] = 0;
|
||||
|
||||
screen->DrawText (SmallFont, CR_UNTRANSLATED, x + mFrameSize, mYpos, mEditName,
|
||||
|
|
|
@ -345,6 +345,7 @@ FFont::FFont (const char *name, const char *nametemplate, int first, int count,
|
|||
Name = copystring (name);
|
||||
Next = FirstFont;
|
||||
FirstFont = this;
|
||||
Cursor = '_';
|
||||
|
||||
maxyoffs = 0;
|
||||
|
||||
|
@ -1892,6 +1893,7 @@ void V_InitCustomFonts()
|
|||
int start;
|
||||
int first;
|
||||
int count;
|
||||
char cursor = '_';
|
||||
|
||||
while ((llump = Wads.FindLump ("FONTDEFS", &lastlump)) != -1)
|
||||
{
|
||||
|
@ -1938,6 +1940,11 @@ void V_InitCustomFonts()
|
|||
count = sc.Number;
|
||||
format = 1;
|
||||
}
|
||||
else if (sc.Compare ("CURSOR"))
|
||||
{
|
||||
sc.MustGetString();
|
||||
cursor = sc.String[0];
|
||||
}
|
||||
else if (sc.Compare ("NOTRANSLATION"))
|
||||
{
|
||||
if (format == 1) goto wrong;
|
||||
|
@ -1981,7 +1988,8 @@ void V_InitCustomFonts()
|
|||
}
|
||||
if (format == 1)
|
||||
{
|
||||
new FFont (namebuffer, templatebuf, first, count, start);
|
||||
FFont *fnt = new FFont (namebuffer, templatebuf, first, count, start);
|
||||
fnt->SetCursor(cursor);
|
||||
}
|
||||
else if (format == 2)
|
||||
{
|
||||
|
@ -2003,7 +2011,8 @@ void V_InitCustomFonts()
|
|||
}
|
||||
if (count > 0)
|
||||
{
|
||||
new FSpecialFont (namebuffer, first, count, &lumplist[first], notranslate);
|
||||
FFont *fnt = new FSpecialFont (namebuffer, first, count, &lumplist[first], notranslate);
|
||||
fnt->SetCursor(cursor);
|
||||
}
|
||||
}
|
||||
else goto wrong;
|
||||
|
@ -2377,6 +2386,7 @@ void V_InitFonts()
|
|||
else if (Wads.CheckNumForName ("FONTA_S") >= 0)
|
||||
{
|
||||
SmallFont = new FFont ("SmallFont", "FONTA%02u", HU_FONTSTART, HU_FONTSIZE, 1);
|
||||
SmallFont->SetCursor('[');
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -95,6 +95,8 @@ public:
|
|||
inline int StringWidth (const char *str) const { return StringWidth ((const BYTE *)str); }
|
||||
|
||||
int GetCharCode(int code, bool needpic) const;
|
||||
char GetCursor() const { return Cursor; }
|
||||
void SetCursor(char c) { Cursor = c; }
|
||||
|
||||
protected:
|
||||
FFont ();
|
||||
|
@ -110,6 +112,7 @@ protected:
|
|||
int SpaceWidth;
|
||||
int FontHeight;
|
||||
int GlobalKerning;
|
||||
char Cursor;
|
||||
struct CharData
|
||||
{
|
||||
FTexture *Pic;
|
||||
|
|
Loading…
Reference in a new issue