mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-01-22 09:22:04 +00:00
16e578a0f8
# Conflicts: # src/p_setup.cpp
32 lines
543 B
C++
32 lines
543 B
C++
|
|
#pragma once
|
|
|
|
#include "../../core/widget.h"
|
|
|
|
enum TextLabelAlignment
|
|
{
|
|
Left,
|
|
Center,
|
|
Right
|
|
};
|
|
|
|
class TextLabel : public Widget
|
|
{
|
|
public:
|
|
TextLabel(Widget* parent = nullptr);
|
|
|
|
void SetText(const std::string& value);
|
|
const std::string& GetText() const;
|
|
|
|
void SetTextAlignment(TextLabelAlignment alignment);
|
|
TextLabelAlignment GetTextAlignment() const;
|
|
|
|
double GetPreferredHeight() const;
|
|
|
|
protected:
|
|
void OnPaint(Canvas* canvas) override;
|
|
|
|
private:
|
|
std::string text;
|
|
TextLabelAlignment textAlignment = TextLabelAlignment::Left;
|
|
};
|