hackily adding the event count to the graph
This commit is contained in:
@@ -72,13 +72,14 @@ private:
|
||||
std::shared_ptr<CLCaster> raycaster;
|
||||
std::shared_ptr<LightHandle> light_handle;
|
||||
std::shared_ptr<LightController> light_controller;
|
||||
GraphTimer fps;
|
||||
Input input_handler;
|
||||
std::shared_ptr<WindowHandler> window_handler;
|
||||
|
||||
// The sfml imgui wrapper I'm using requires Update be called with sf::Time
|
||||
// Might modify it to also accept seconds
|
||||
sf::Clock sf_delta_clock;
|
||||
GraphTimer fps;
|
||||
|
||||
|
||||
// vars for us to use with ImGUI
|
||||
float light_color[4] = { 0, 0, 0, 0 };
|
||||
|
||||
@@ -11,12 +11,15 @@ public:
|
||||
|
||||
~GraphTimer();
|
||||
|
||||
static GraphTimer* get_instance();
|
||||
|
||||
unsigned int create_line(std::string label);
|
||||
unsigned int delete_line(unsigned int idx);
|
||||
|
||||
void start(unsigned int idx);
|
||||
void stop(unsigned int idx);
|
||||
void frame(unsigned int idx, double delta_time);
|
||||
void count(unsigned int idx, int counter);
|
||||
|
||||
void draw();
|
||||
|
||||
@@ -31,4 +34,7 @@ private:
|
||||
std::vector<int> counters;
|
||||
std::vector<std::string> labels;
|
||||
|
||||
|
||||
// I actually think I might make this a singleton, along
|
||||
static GraphTimer* instance;
|
||||
};
|
||||
@@ -52,6 +52,9 @@ private:
|
||||
std::vector<sf::Mouse::Button> held_mouse_buttons;
|
||||
|
||||
|
||||
// TODO: Debug, remove this when finished
|
||||
int graph_index = 0;
|
||||
|
||||
private:
|
||||
|
||||
static const std::vector<std::string> key_strings;
|
||||
|
||||
Reference in New Issue
Block a user