1
0
mirror of https://github.com/narzoul/DDrawCompat synced 2024-12-30 08:55:36 +01:00
2023-11-05 14:21:15 +01:00

34 lines
736 B
C++

#pragma once
#include <array>
#include <functional>
#include <Overlay/LabelControl.h>
#include <Overlay/StatsQueue.h>
namespace Overlay
{
class StatsWindow;
class StatsControl : public Control
{
public:
static const int NAME_LABEL_WIDTH = 70;
static const int VALUE_LABEL_WIDTH = 40;
typedef std::function<std::array<std::string, 4>(StatsQueue::TickCount)> UpdateFunc;
StatsControl(StatsWindow& parent, const RECT& rect, const std::string& caption, UpdateFunc updateFunc, DWORD style);
void update(StatsQueue::TickCount tickCount);
private:
LabelControl m_captionLabel;
LabelControl m_curLabel;
LabelControl m_avgLabel;
LabelControl m_minLabel;
LabelControl m_maxLabel;
UpdateFunc m_updateFunc;
};
}