diff --git a/neercs/term/term.cpp b/neercs/term/term.cpp index dcc16d9..3057f50 100644 --- a/neercs/term/term.cpp +++ b/neercs/term/term.cpp @@ -30,7 +30,8 @@ Term::Term(ivec2 size) m_caca(caca_create_canvas(size.x, size.y)), m_size(size), m_title(0), - m_time(0.f) + m_time(0.f), + m_debug(false) { #if defined HAVE_PTY_H || defined HAVE_UTIL_H || defined HAVE_LIBUTIL_H m_pty = new Pty(); @@ -141,6 +142,16 @@ void Term::TickGame(float seconds) // if (total > 10000) // break; } + + /* Some fancy shit if we press F3 */ + if (Input::WasPressed(Key::F3)) + m_debug = !m_debug; + + if (m_debug) + { + m_time += seconds; + DrawFancyShit(); + } #else /* Unsupported platform - draw some fancy shit instead */ m_time += seconds; @@ -253,4 +264,4 @@ void Term::DrawFancyShit() caca_put_str(m_caca, 0, 2, "root@lol:~/ echo LOL"); caca_put_str(m_caca, 0, 3, "LOL"); caca_put_str(m_caca, 0, 4, "root@lol:~/"); -} \ No newline at end of file +} diff --git a/neercs/term/term.h b/neercs/term/term.h index 2a196b7..0baa460 100644 --- a/neercs/term/term.h +++ b/neercs/term/term.h @@ -126,6 +126,7 @@ private: /* Mostly for fancy shit */ void DrawFancyShit(); float m_time; + bool m_debug; }; #endif // __TERM_TERM_H__