Fixed some stuff, added basic popups and more
This commit is contained in:
parent
c0dd04127c
commit
46ea31a118
14 changed files with 750 additions and 24 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue