mirror of
https://github.com/Trensa-Organization/hy3.git
synced 2025-03-15 18:53:40 +01:00
Damage tab bar each tick to avoid defects
This solution is hacky and needs to be improved Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
3025a015ea
commit
445381f871
2 changed files with 9 additions and 0 deletions
|
@ -271,6 +271,14 @@ void Hy3TabBar::tick() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->entries.empty()) this->destroy = true;
|
if (this->entries.empty()) this->destroy = true;
|
||||||
|
|
||||||
|
damage();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Hy3TabBar::damage() {
|
||||||
|
auto pos = this->entries.front().node.position;
|
||||||
|
auto box = CBox {pos.x, pos.y, this->size.x, this->size.y};
|
||||||
|
g_pHyprRenderer->damageBox(&box);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hy3TabBar::updateNodeList(std::list<Hy3Node*>& nodes) {
|
void Hy3TabBar::updateNodeList(std::list<Hy3Node*>& nodes) {
|
||||||
|
|
|
@ -67,6 +67,7 @@ public:
|
||||||
Hy3TabBar();
|
Hy3TabBar();
|
||||||
void beginDestroy();
|
void beginDestroy();
|
||||||
|
|
||||||
|
void damage();
|
||||||
void tick();
|
void tick();
|
||||||
void updateNodeList(std::list<Hy3Node*>& nodes);
|
void updateNodeList(std::list<Hy3Node*>& nodes);
|
||||||
void updateAnimations(bool warp = false);
|
void updateAnimations(bool warp = false);
|
||||||
|
|
Loading…
Add table
Reference in a new issue