[HUD] Only displaying profiler window when debug overlay is hidden.
Added a message in DebugOverlay that is displayed when profiler is enabled.
This commit is contained in:
parent
791e41ce36
commit
b227e254eb
@ -107,6 +107,9 @@ void DebugOverlay::update(bool printOpenGLInfo) {
|
||||
stream << (hour < 10 ? "0" : "") << hour << ":";
|
||||
stream << (minute < 10 ? "0" : "") << minute << '\n';
|
||||
|
||||
if (Config::isProfilerWindowEnabled)
|
||||
stream << "Press F3 to return to profiler\n";
|
||||
|
||||
if (printOpenGLInfo) {
|
||||
GLint major, minor;
|
||||
glGetIntegerv(GL_MAJOR_VERSION, &major);
|
||||
|
@ -112,6 +112,8 @@ void HUD::update() {
|
||||
|
||||
if (m_isDebugOverlayVisible)
|
||||
m_debugOverlay.update(m_printOpenGLInfo);
|
||||
else if (Config::isProfilerWindowEnabled)
|
||||
m_debugProfilerWindow.update();
|
||||
|
||||
if (Config::isBlockInfoWidgetEnabled) {
|
||||
m_blockInfoWidget.update();
|
||||
@ -125,9 +127,6 @@ void HUD::update() {
|
||||
|
||||
if (Config::isLightmapViewerEnabled)
|
||||
m_debugLightmapViewer.update(m_world);
|
||||
|
||||
if (Config::isProfilerWindowEnabled)
|
||||
m_debugProfilerWindow.update();
|
||||
}
|
||||
|
||||
void HUD::draw(gk::RenderTarget &target, gk::RenderStates states) const {
|
||||
@ -143,6 +142,8 @@ void HUD::draw(gk::RenderTarget &target, gk::RenderStates states) const {
|
||||
|
||||
if (m_isDebugOverlayVisible)
|
||||
target.draw(m_debugOverlay, states);
|
||||
else if (Config::isProfilerWindowEnabled)
|
||||
target.draw(m_debugProfilerWindow, states);
|
||||
|
||||
if (Config::isBlockInfoWidgetEnabled)
|
||||
target.draw(m_blockInfoWidget, states);
|
||||
@ -159,9 +160,6 @@ void HUD::draw(gk::RenderTarget &target, gk::RenderStates states) const {
|
||||
if (Config::isLightmapViewerEnabled)
|
||||
target.draw(m_debugLightmapViewer, states);
|
||||
|
||||
if (Config::isProfilerWindowEnabled)
|
||||
target.draw(m_debugProfilerWindow, states);
|
||||
|
||||
target.draw(m_chat, states);
|
||||
|
||||
states.transform = gk::Transform::Identity;
|
||||
|
Loading…
x
Reference in New Issue
Block a user