mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-02-16 16:41:46 +00:00
- update window title with current level name
This commit is contained in:
parent
9858ed70b0
commit
2e467bd239
3 changed files with 29 additions and 10 deletions
|
@ -144,6 +144,7 @@ void ParseGLDefs();
|
||||||
void DrawFullscreenSubtitle(const char *text);
|
void DrawFullscreenSubtitle(const char *text);
|
||||||
void D_Cleanup();
|
void D_Cleanup();
|
||||||
void FreeSBarInfoScript();
|
void FreeSBarInfoScript();
|
||||||
|
void I_UpdateWindowTitle();
|
||||||
|
|
||||||
// PRIVATE FUNCTION PROTOTYPES ---------------------------------------------
|
// PRIVATE FUNCTION PROTOTYPES ---------------------------------------------
|
||||||
|
|
||||||
|
@ -161,7 +162,6 @@ EXTERN_CVAR (Bool, lookstrafe)
|
||||||
EXTERN_CVAR (Int, screenblocks)
|
EXTERN_CVAR (Int, screenblocks)
|
||||||
EXTERN_CVAR (Bool, sv_cheats)
|
EXTERN_CVAR (Bool, sv_cheats)
|
||||||
EXTERN_CVAR (Bool, sv_unlimited_pickup)
|
EXTERN_CVAR (Bool, sv_unlimited_pickup)
|
||||||
EXTERN_CVAR (Bool, I_FriendlyWindowTitle)
|
|
||||||
EXTERN_CVAR (Bool, r_drawplayersprites)
|
EXTERN_CVAR (Bool, r_drawplayersprites)
|
||||||
EXTERN_CVAR (Bool, show_messages)
|
EXTERN_CVAR (Bool, show_messages)
|
||||||
|
|
||||||
|
@ -2848,8 +2848,7 @@ static int D_DoomMain_Internal (void)
|
||||||
|
|
||||||
D_DoAnonStats();
|
D_DoAnonStats();
|
||||||
|
|
||||||
if (I_FriendlyWindowTitle)
|
I_UpdateWindowTitle();
|
||||||
I_SetWindowTitle(DoomStartupInfo.Name.GetChars());
|
|
||||||
|
|
||||||
D_DoomLoop (); // this only returns if a 'restart' CCMD is given.
|
D_DoomLoop (); // this only returns if a 'restart' CCMD is given.
|
||||||
//
|
//
|
||||||
|
@ -3086,11 +3085,27 @@ DEFINE_FIELD_X(InputEventData, event_t, data3)
|
||||||
DEFINE_FIELD_X(InputEventData, event_t, x)
|
DEFINE_FIELD_X(InputEventData, event_t, x)
|
||||||
DEFINE_FIELD_X(InputEventData, event_t, y)
|
DEFINE_FIELD_X(InputEventData, event_t, y)
|
||||||
|
|
||||||
|
CUSTOM_CVAR(Int, I_FriendlyWindowTitle, 1, CVAR_GLOBALCONFIG|CVAR_ARCHIVE|CVAR_NOINITCALL)
|
||||||
CUSTOM_CVAR(Bool, I_FriendlyWindowTitle, true, CVAR_GLOBALCONFIG|CVAR_ARCHIVE|CVAR_NOINITCALL)
|
|
||||||
{
|
{
|
||||||
if (self)
|
I_UpdateWindowTitle();
|
||||||
I_SetWindowTitle(DoomStartupInfo.Name.GetChars());
|
}
|
||||||
else
|
|
||||||
I_SetWindowTitle(NULL);
|
void I_UpdateWindowTitle()
|
||||||
|
{
|
||||||
|
switch (I_FriendlyWindowTitle)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
if (level.LevelName && level.LevelName.GetChars()[0])
|
||||||
|
{
|
||||||
|
FString titlestr;
|
||||||
|
titlestr.Format("%s - %s", level.LevelName, DoomStartupInfo.Name.GetChars());
|
||||||
|
I_SetWindowTitle(titlestr.GetChars());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 2:
|
||||||
|
I_SetWindowTitle(DoomStartupInfo.Name.GetChars());
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
I_SetWindowTitle(NULL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,6 +41,8 @@
|
||||||
#include "v_font.h"
|
#include "v_font.h"
|
||||||
#include "utf8.h"
|
#include "utf8.h"
|
||||||
|
|
||||||
|
void I_UpdateWindowTitle();
|
||||||
|
|
||||||
CVAR (Bool, cl_spreaddecals, true, CVAR_ARCHIVE)
|
CVAR (Bool, cl_spreaddecals, true, CVAR_ARCHIVE)
|
||||||
CVAR(Bool, var_pushers, true, CVAR_SERVERINFO);
|
CVAR(Bool, var_pushers, true, CVAR_SERVERINFO);
|
||||||
CVAR(Bool, gl_cachenodes, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
CVAR(Bool, gl_cachenodes, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||||
|
@ -201,4 +203,5 @@ CUSTOM_CVAR(String, language, "auto", CVAR_ARCHIVE | CVAR_NOINITCALL | CVAR_GLOB
|
||||||
if (Level->info != nullptr) Level->LevelName = Level->info->LookupLevelName();
|
if (Level->info != nullptr) Level->LevelName = Level->info->LookupLevelName();
|
||||||
}
|
}
|
||||||
UpdateGenericUI(ui_generic);
|
UpdateGenericUI(ui_generic);
|
||||||
|
I_UpdateWindowTitle();
|
||||||
}
|
}
|
||||||
|
|
|
@ -110,6 +110,7 @@ extern uint8_t globalfreeze, globalchangefreeze;
|
||||||
#define PCLS_ID MAKE_ID('p','c','L','s')
|
#define PCLS_ID MAKE_ID('p','c','L','s')
|
||||||
|
|
||||||
void G_VerifySkill();
|
void G_VerifySkill();
|
||||||
|
void I_UpdateWindowTitle();
|
||||||
|
|
||||||
CUSTOM_CVAR(Bool, gl_brightfog, false, CVAR_ARCHIVE | CVAR_NOINITCALL)
|
CUSTOM_CVAR(Bool, gl_brightfog, false, CVAR_ARCHIVE | CVAR_NOINITCALL)
|
||||||
{
|
{
|
||||||
|
@ -1060,7 +1061,7 @@ void G_DoLoadLevel(const FString &nextmapname, int position, bool autosave, bool
|
||||||
|
|
||||||
C_FlushDisplay();
|
C_FlushDisplay();
|
||||||
P_ResetSightCounters(true);
|
P_ResetSightCounters(true);
|
||||||
|
I_UpdateWindowTitle();
|
||||||
}
|
}
|
||||||
|
|
||||||
void FLevelLocals::DoLoadLevel(const FString &nextmapname, int position, bool autosave, bool newGame)
|
void FLevelLocals::DoLoadLevel(const FString &nextmapname, int position, bool autosave, bool newGame)
|
||||||
|
|
Loading…
Reference in a new issue