reVeno/Source/Veno/GUI/Components/LabelComponent.cpp
versustunez d735c1d076 - cleanup vars
- added LICENSE.txt
- added LabelComponent.cpp
- renamed some variables
- moved instance id to processor
2020-06-08 21:27:17 +02:00

33 lines
656 B
C++

//
// Created by versustune on 07.06.20.
//
#include "LabelComponent.h"
LabelComponent::LabelComponent(Component *parent, std::string name) {
m_text = name;
m_parent = parent;
m_label = std::make_shared<Label>(m_parent->getName(), name);
}
LabelComponent::~LabelComponent() {
m_label.reset();
}
void LabelComponent::resized() {
if (m_label != nullptr) {
m_label->setBounds(0, 0, getWidth(), getHeight());
}
}
void LabelComponent::paint(Graphics &g) {
}
void LabelComponent::setPosition(LabelPosition position) {
m_position = position;
}
LabelPosition LabelComponent::getLabelPosition() {
return m_position;
}