Added Hide GUI Keybind (#62)

F1 to hide gui
Also renamed the field for hiding the GUI to m_bDontRenderGui

I would have named it m_bRenderGui and flipped the default values and checks but I assumed that changing the least amount of stuff would be desired.
This commit is contained in:
Vruk
2023-08-20 11:19:24 -07:00
committed by GitHub
parent a6d05eb6f3
commit 9c2a5c43c8
6 changed files with 12 additions and 7 deletions

View File

@@ -1127,7 +1127,7 @@ extern int t_keepPic;
void LevelRenderer::takePicture(TripodCamera* pCamera, Entity* pOwner)
{
Mob* pOldMob = m_pMinecraft->m_pMobPersp;
bool bOldField23C = m_pMinecraft->m_options.field_23C;
bool bOldDontRenderGui = m_pMinecraft->m_options.m_bDontRenderGui;
bool bOldThirdPerson = m_pMinecraft->m_options.m_bThirdPerson;
#ifdef ENH_CAMERA_NO_PARTICLES
@@ -1136,11 +1136,11 @@ void LevelRenderer::takePicture(TripodCamera* pCamera, Entity* pOwner)
#endif
m_pMinecraft->m_pMobPersp = pCamera;
m_pMinecraft->m_options.field_23C = true;
m_pMinecraft->m_options.m_bDontRenderGui = true;
m_pMinecraft->m_options.m_bThirdPerson = false; // really from the perspective of the camera
m_pMinecraft->m_pGameRenderer->render(0.0f);
m_pMinecraft->m_pMobPersp = pOldMob;
m_pMinecraft->m_options.field_23C = bOldField23C;
m_pMinecraft->m_options.m_bDontRenderGui = bOldDontRenderGui;
m_pMinecraft->m_options.m_bThirdPerson = bOldThirdPerson;
#ifdef ENH_CAMERA_NO_PARTICLES