mirror of
https://github.com/narzoul/DDrawCompat
synced 2024-12-30 08:55:36 +01:00
31 lines
595 B
C++
31 lines
595 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
|
|
#include <Windows.h>
|
|
|
|
#include <Overlay/Control.h>
|
|
|
|
namespace Overlay
|
|
{
|
|
class LabelControl : public Control
|
|
{
|
|
public:
|
|
LabelControl(Control& parent, const RECT& rect, const std::string& label, UINT format, DWORD style = WS_VISIBLE);
|
|
|
|
virtual void onLButtonDown(POINT pos) override;
|
|
|
|
const std::string& getLabel() const { return m_label; }
|
|
void setLabel(const std::string label);
|
|
void setColor(COLORREF color);
|
|
|
|
private:
|
|
virtual void draw(HDC dc) override;
|
|
|
|
std::string m_label;
|
|
std::wstring m_wlabel;
|
|
UINT m_align;
|
|
COLORREF m_color;
|
|
};
|
|
}
|