mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 14:52:01 +00:00
- fixed the notification display.
This commit is contained in:
parent
e0bd85935a
commit
8aaadfad1b
5 changed files with 15 additions and 22 deletions
|
@ -46,7 +46,7 @@
|
||||||
static uint64_t FirstFrameStartTime;
|
static uint64_t FirstFrameStartTime;
|
||||||
static uint64_t CurrentFrameStartTime;
|
static uint64_t CurrentFrameStartTime;
|
||||||
static uint64_t FreezeTime;
|
static uint64_t FreezeTime;
|
||||||
int GameTicRate;
|
int GameTicRate = 35; // make sure it is not 0, even if the client doesn't set it.
|
||||||
|
|
||||||
double TimeScale = 1.0;
|
double TimeScale = 1.0;
|
||||||
|
|
||||||
|
|
|
@ -154,7 +154,7 @@ CVAR(Int, developer, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
EXTERN_CVAR(Int, uiscale);
|
EXTERN_CVAR(Int, uiscale);
|
||||||
|
|
||||||
|
|
||||||
bool generic_ui = true;
|
CVAR(Bool, generic_ui, false, CVAR_ARCHIVE)
|
||||||
|
|
||||||
|
|
||||||
struct History
|
struct History
|
||||||
|
@ -785,7 +785,7 @@ void FNotifyBuffer::AddString(int printlevel, FString source)
|
||||||
|
|
||||||
width = screen->GetWidth() / active_con_scaletext(twod, generic_ui);
|
width = screen->GetWidth() / active_con_scaletext(twod, generic_ui);
|
||||||
|
|
||||||
FFont *font = generic_ui ? NewSmallFont : AlternativeSmallFont;
|
FFont* font = generic_ui ? NewSmallFont : SmallFont ? SmallFont : AlternativeSmallFont;
|
||||||
if (font == nullptr) return; // Without an initialized font we cannot handle the message (this is for those which come here before the font system is ready.)
|
if (font == nullptr) return; // Without an initialized font we cannot handle the message (this is for those which come here before the font system is ready.)
|
||||||
|
|
||||||
if (AddType == APPENDLINE && Text.Size() > 0 && Text[Text.Size() - 1].PrintLevel == printlevel)
|
if (AddType == APPENDLINE && Text.Size() > 0 && Text[Text.Size() - 1].PrintLevel == printlevel)
|
||||||
|
@ -905,7 +905,7 @@ int PrintString (int iprintlevel, const char *outline)
|
||||||
I_PrintStr(outline);
|
I_PrintStr(outline);
|
||||||
|
|
||||||
conbuffer->AddText(printlevel, outline);
|
conbuffer->AddText(printlevel, outline);
|
||||||
if (vidactive && (iprintlevel & PRINT_NOTIFY))
|
if (vidactive && (iprintlevel & PRINT_NOTIFY)) // The logic here is inverse to ZDoom because most texts getting here should not be on screem.
|
||||||
{
|
{
|
||||||
NotifyStrings.AddString(printlevel, outline);
|
NotifyStrings.AddString(printlevel, outline);
|
||||||
}
|
}
|
||||||
|
@ -1065,7 +1065,7 @@ void FNotifyBuffer::Tick()
|
||||||
if (i > 0)
|
if (i > 0)
|
||||||
{
|
{
|
||||||
Text.Delete(0, i);
|
Text.Delete(0, i);
|
||||||
FFont* font = generic_ui ? NewSmallFont : AlternativeSmallFont;
|
FFont* font = generic_ui ? NewSmallFont : SmallFont ? SmallFont : AlternativeSmallFont;
|
||||||
Top += font->GetHeight();
|
Top += font->GetHeight();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1079,7 +1079,7 @@ void FNotifyBuffer::Draw()
|
||||||
//if (gamestate == GS_FULLCONSOLE || gamestate == GS_DEMOSCREEN/* || menuactive != MENU_Off*/)
|
//if (gamestate == GS_FULLCONSOLE || gamestate == GS_DEMOSCREEN/* || menuactive != MENU_Off*/)
|
||||||
//return;
|
//return;
|
||||||
|
|
||||||
FFont* font = generic_ui ? NewSmallFont : AlternativeSmallFont;
|
FFont* font = generic_ui ? NewSmallFont : SmallFont? SmallFont : AlternativeSmallFont;
|
||||||
|
|
||||||
line = Top + font->GetDisplacement();
|
line = Top + font->GetDisplacement();
|
||||||
canskip = true;
|
canskip = true;
|
||||||
|
|
|
@ -230,7 +230,6 @@ void spriteglass(int spriteNum,int glassCnt);
|
||||||
void lotsofcolourglass(int spriteNum,int wallNum,int glassCnt);
|
void lotsofcolourglass(int spriteNum,int wallNum,int glassCnt);
|
||||||
void lotsofglass(int spriteNum,int wallnum,int glassCnt);
|
void lotsofglass(int spriteNum,int wallnum,int glassCnt);
|
||||||
|
|
||||||
void G_AddUserQuote(const char *daquote);
|
|
||||||
void G_BackToMenu(void);
|
void G_BackToMenu(void);
|
||||||
void G_DumpDebugInfo(void);
|
void G_DumpDebugInfo(void);
|
||||||
|
|
||||||
|
|
|
@ -1951,8 +1951,6 @@ MAIN_LOOP_RESTART:
|
||||||
lockclock = 0;
|
lockclock = 0;
|
||||||
|
|
||||||
g_player[myconnectindex].ps->fta = 0;
|
g_player[myconnectindex].ps->fta = 0;
|
||||||
for (int & q : user_quote_time)
|
|
||||||
q = 0;
|
|
||||||
|
|
||||||
if (ud.warp_on == 1)
|
if (ud.warp_on == 1)
|
||||||
{
|
{
|
||||||
|
@ -2152,16 +2150,6 @@ int G_DoMoveThings(void)
|
||||||
if (g_RTSPlaying > 0)
|
if (g_RTSPlaying > 0)
|
||||||
g_RTSPlaying--;
|
g_RTSPlaying--;
|
||||||
|
|
||||||
for (int & i : user_quote_time)
|
|
||||||
{
|
|
||||||
if (i)
|
|
||||||
{
|
|
||||||
if (--i > hud_messagetime)
|
|
||||||
i = hud_messagetime;
|
|
||||||
if (!i) pub = NUMPAGES;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Name display when aiming at opponents
|
// Name display when aiming at opponents
|
||||||
if (cl_idplayers && (g_netServer || ud.multimode > 1)
|
if (cl_idplayers && (g_netServer || ud.multimode > 1)
|
||||||
)
|
)
|
||||||
|
|
|
@ -320,7 +320,10 @@ void P_DoQuote(int32_t q, DukePlayer_t *p)
|
||||||
{
|
{
|
||||||
auto qu = quoteMgr.GetQuote(q);
|
auto qu = quoteMgr.GetQuote(q);
|
||||||
if (p == g_player[screenpeek].ps && qu[0] != '\0')
|
if (p == g_player[screenpeek].ps && qu[0] != '\0')
|
||||||
Printf((cq ? PRINT_LOW : PRINT_MEDIUM) | PRINT_NOTIFY, "%s\n", qu);
|
{
|
||||||
|
int printlevel = hud_messages == 1 ? PRINT_MEDIUM : PRINT_MEDIUM | PRINT_NOTIFY;
|
||||||
|
Printf(printlevel, "%s\n", qu);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -344,8 +347,11 @@ void GameInterface::DoPrintMessage(int prio, const char* t)
|
||||||
if (p->fta > 0)
|
if (p->fta > 0)
|
||||||
if (p->ftq == QUOTE_RESERVED || p->ftq == QUOTE_RESERVED2) return;
|
if (p->ftq == QUOTE_RESERVED || p->ftq == QUOTE_RESERVED2) return;
|
||||||
|
|
||||||
if (p == g_player[screenpeek].ps)
|
if (p == g_player[screenpeek].ps)
|
||||||
Printf(prio|PRINT_NOTIFY, cq ? TEXTCOLOR_TAN "%s\n" : "%s\n", t);
|
{
|
||||||
|
if (hud_messages == 2) prio |= PRINT_NOTIFY;
|
||||||
|
Printf(prio, cq ? TEXTCOLOR_TAN "%s\n" : "%s\n", t);
|
||||||
|
}
|
||||||
|
|
||||||
if (hud_messages == 1)
|
if (hud_messages == 1)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue