mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-12 12:35:30 +00:00
call Form.Update() on each fade effect step.
This commit is contained in:
parent
7198c69f11
commit
28d739c256
|
@ -316,7 +316,7 @@ namespace OpenTK.Graphics
|
||||||
class FadeEffect : IDisposable
|
class FadeEffect : IDisposable
|
||||||
{
|
{
|
||||||
List<Form> forms = new List<Form>();
|
List<Form> forms = new List<Form>();
|
||||||
double opacity_step = 0.05;
|
double opacity_step = 0.04;
|
||||||
int sleep_step;
|
int sleep_step;
|
||||||
|
|
||||||
internal FadeEffect()
|
internal FadeEffect()
|
||||||
|
@ -382,7 +382,10 @@ namespace OpenTK.Graphics
|
||||||
while (!FadedOut)
|
while (!FadedOut)
|
||||||
{
|
{
|
||||||
foreach (Form form in forms)
|
foreach (Form form in forms)
|
||||||
|
{
|
||||||
form.Opacity += opacity_step;
|
form.Opacity += opacity_step;
|
||||||
|
form.Update();
|
||||||
|
}
|
||||||
Thread.Sleep(sleep_step);
|
Thread.Sleep(sleep_step);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -397,7 +400,10 @@ namespace OpenTK.Graphics
|
||||||
while (!FadedIn)
|
while (!FadedIn)
|
||||||
{
|
{
|
||||||
foreach (Form form in forms)
|
foreach (Form form in forms)
|
||||||
|
{
|
||||||
form.Opacity -= opacity_step;
|
form.Opacity -= opacity_step;
|
||||||
|
form.Update();
|
||||||
|
}
|
||||||
Thread.Sleep(sleep_step);
|
Thread.Sleep(sleep_step);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue