tox private impl + dht caps histo

This commit is contained in:
2023-11-13 16:23:49 +01:00
parent 4e4f62dd20
commit fd9d14d00c
7 changed files with 104 additions and 1 deletions

22
src/tox_dht_cap_histo.hpp Normal file
View File

@@ -0,0 +1,22 @@
#pragma once
#include <solanaceae/toxcore/tox_private_interface.hpp>
#include <vector>
class ToxDHTCapHisto {
ToxPrivateI& _tpi;
bool _enabled {true};
bool _show_window {false};
std::vector<float> _ratios;
const float _value_add_interval {1.f}; // every second
float _time_since_last_add {0.f};
public:
ToxDHTCapHisto(ToxPrivateI& tpi) : _tpi(tpi) {}
void tick(float time_delta);
void render(void);
};