Game Project
Loading...
Searching...
No Matches
DebugWindow.h
1#pragma once
2#include <vector>
3
4#include <SFML/System.hpp>
5#include <SFML/Graphics.hpp>
6#include <imgui.h>
7#include <imgui-SFML.h>
8
9#include "Common.h"
10#include "FPSTracker.h"
11
13{
14public:
19 void Init(sf::RenderWindow& window);
23 void Shutdown();
24
30 void ProcessEvent(sf::RenderWindow& window, const sf::Event& event);
36 void Update(sf::RenderWindow& window, sf::Time delta_time);
41 void Render(sf::RenderWindow& window_);
42private:
43 float elapsed_time_ = 0.f;
44 FPSTracker fps_tracker_;
45};
46
Definition DebugWindow.h:13
void Render(sf::RenderWindow &window_)
Displays all the UI elements on the screen.
Definition DebugWindow.cpp:40
void ProcessEvent(sf::RenderWindow &window, const sf::Event &event)
Update ImGui to process all the events, like clicking the buttons.
Definition DebugWindow.cpp:16
void Update(sf::RenderWindow &window, sf::Time delta_time)
Call once per frame, updates all the values.
Definition DebugWindow.cpp:26
void Shutdown()
Close the debug window system.
Definition DebugWindow.cpp:21
void Init(sf::RenderWindow &window)
Initialise the debug window system.
Definition DebugWindow.cpp:3
Keeps track of FPS statistics over time. Call update to add samples, and update stats to recalculate ...
Definition FPSTracker.h:9