Unstable & with drawing restored

This commit is contained in:
Ilusha 2024-03-17 23:37:15 +03:00 committed by Ilya Shurupov
parent 1155067b26
commit cd8feaf2c0
15 changed files with 1004 additions and 31 deletions

View file

@ -41,7 +41,7 @@ namespace tp {
mLabel.proc(events, aArea, aArea);
}
void draw(Canvas& canvas) const override {
void draw(Canvas& canvas) override {
if (mIsPressed) {
canvas.rect(this->mArea, this->getColor("Pressed"), this->getValue("Rounding"));
} else if (mIsHover) {

View file

@ -17,7 +17,7 @@ namespace tp {
this->mArea = aArea;
}
void draw(Canvas& canvas) const override {
void draw(Canvas& canvas) override {
canvas.text(
mLabel.read(),
this->mArea,

View file

@ -68,7 +68,7 @@ namespace tp {
mPositionFraction = tp::clamp(mPositionFraction, 0.f, 1.f - mSizeFraction);
}
void draw(Canvas& canvas) const override {
void draw(Canvas& canvas) override {
auto area = getHandle();
if (mSizeFraction > 1.f) return;
@ -162,7 +162,7 @@ namespace tp {
}
}
void draw(Canvas& canvas) const override {
void draw(Canvas& canvas) override {
if (!this->mVisible) return;
mScroller.draw(canvas);

View file

@ -45,7 +45,7 @@ namespace tp {
}
// takes whole area
void draw(Canvas& canvas) const override {
void draw(Canvas& canvas) override {
if (mResizeInProcess) canvas.rect(getHandle(), this->getColor("Resizing"));
else if (mIsHover) canvas.rect(getHandle(), this->getColor("Hovered"));
else canvas.rect(getHandle(), this->getColor("Handle"));

View file

@ -58,7 +58,7 @@ namespace tp {
ImGui::PopStyleVar(3);
}
void draw(Canvas& canvas) const override {
void draw(Canvas& canvas) override {
// canvas.rect(this->mArea, this->getColor("Base"));
}