fix snowflakes
This commit is contained in:
parent
13308a03c9
commit
8ba083cd0b
@ -112,14 +112,18 @@ void CatGUI::Update() {
|
|||||||
if (changed) {
|
if (changed) {
|
||||||
//logging::Info("Key %i changed! Now %i.", i, down);
|
//logging::Info("Key %i changed! Now %i.", i, down);
|
||||||
if (i == ButtonCode_t::MOUSE_LEFT) {
|
if (i == ButtonCode_t::MOUSE_LEFT) {
|
||||||
if (down) root->OnMousePress();
|
if (Visible()) {
|
||||||
else root->OnMouseRelease();
|
if (down) root->OnMousePress();
|
||||||
|
else root->OnMouseRelease();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (i == ButtonCode_t::KEY_INSERT && down) {
|
if (i == ButtonCode_t::KEY_INSERT && down) {
|
||||||
gui_visible = !gui_visible;
|
gui_visible = !gui_visible;
|
||||||
}
|
}
|
||||||
if (down) root->OnKeyPress((ButtonCode_t)i, false);
|
if (Visible()) {
|
||||||
else root->OnKeyRelease((ButtonCode_t)i);
|
if (down) root->OnKeyPress((ButtonCode_t)i, false);
|
||||||
|
else root->OnKeyRelease((ButtonCode_t)i);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (down) {
|
if (down) {
|
||||||
@ -134,7 +138,9 @@ void CatGUI::Update() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (shouldrepeat) root->OnKeyPress((ButtonCode_t)i, true);
|
if (Visible()) {
|
||||||
|
if (shouldrepeat) root->OnKeyPress((ButtonCode_t)i, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -141,6 +141,7 @@ void Background::Particle::Update(float dt) {
|
|||||||
vy += (float)particle_gravity * dt;
|
vy += (float)particle_gravity * dt;
|
||||||
x += vx * dt;
|
x += vx * dt;
|
||||||
y += vy * dt;
|
y += vy * dt;
|
||||||
|
if (x > draw::width + 16) x = -16;
|
||||||
if (y > (int)particle_safe + 255) dead = true;
|
if (y > (int)particle_safe + 255) dead = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user