Fixed some stuff, added basic popups and more

This commit is contained in:
Booklordofthedings 2024-10-10 14:53:21 +02:00
parent c0dd04127c
commit 46ea31a118
14 changed files with 750 additions and 24 deletions

View file

@ -11,6 +11,23 @@ extension PlatformRaylib
{
public void StartDrawing()
{
if(Raylib.GetMouseDelta().x + Raylib.GetMouseDelta().y != 0)
{
if(targetFps != 40)
{
Raylib.SetTargetFPS(40);
targetFps = 40;
}
}
else
{
if(targetFps != 20)
{
Raylib.SetTargetFPS(20);
targetFps = 20;
}
}
Raylib.BeginDrawing();
Raylib.ClearBackground(_BackgroundColor);
Raylib.BeginTextureMode(_ScreenTexture);
@ -31,8 +48,27 @@ extension PlatformRaylib
Raylib.EndDrawing();
}
private int32 targetFps = 40;
public void RedrawLastFrame()
{
if(Raylib.GetMouseDelta().x + Raylib.GetMouseDelta().y != 0)
{
if(targetFps != 40)
{
Raylib.SetTargetFPS(40);
targetFps = 40;
}
}
else
{
if(targetFps != 20)
{
Raylib.SetTargetFPS(20);
targetFps = 20;
}
}
Raylib.BeginDrawing();
Raylib.ClearBackground(_BackgroundColor);
Raylib.DrawTexturePro(
@ -43,6 +79,9 @@ extension PlatformRaylib
0,
Raylib.WHITE
);
#if DEBUG
Raylib.DrawRectangle(0,0,5,5, Raylib.PINK);
#endif
Raylib.EndDrawing();
}