Replace Old Widgets
This commit is contained in:
parent
03da5e41d6
commit
c41dc20132
81 changed files with 388 additions and 278 deletions
17
.back/WidBack/private/LabelWidget.cpp
Normal file
17
.back/WidBack/private/LabelWidget.cpp
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#include "LabelWidget.hpp"
|
||||
|
||||
using namespace tp;
|
||||
|
||||
LabelWidget::LabelWidget() { this->mArea = { 0, 0, 100, 30 }; }
|
||||
|
||||
void LabelWidget::eventDraw(Canvas& canvas) {
|
||||
canvas.text(mLabel.c_str(), this->mArea, fontSize, Canvas::LC, padding, fontColor);
|
||||
}
|
||||
|
||||
void LabelWidget::eventUpdateConfiguration(WidgetManager& wm) {
|
||||
wm.setActiveId("Label");
|
||||
|
||||
fontSize = wm.getNumber("Size", "FontSize");
|
||||
padding = wm.getNumber("Padding", "Padding");
|
||||
fontColor = wm.getColor("Default", "Front");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue