mirror of
https://github.com/Starpelly/raylib-beef.git
synced 2025-03-14 21:06:58 +01:00
Update README.md
This commit is contained in:
parent
c0edbe188f
commit
1186789e37
1 changed files with 46 additions and 0 deletions
46
README.md
46
README.md
|
@ -14,6 +14,52 @@ BeefLang bindings for **Raylib 4.5**.
|
|||
<br>
|
||||
<br>
|
||||
|
||||
## Example
|
||||
```cs
|
||||
using System;
|
||||
using Raylib;
|
||||
|
||||
namespace example;
|
||||
|
||||
class Program
|
||||
{
|
||||
public static int Main(String[] args)
|
||||
{
|
||||
SetConfigFlags(ConfigFlags.FLAG_WINDOW_RESIZABLE);
|
||||
InitWindow(800, 600, "Raylib Beef 4.5");
|
||||
|
||||
var beefMain = Color(165, 47, 78, 255);
|
||||
var beefOutline = Color(243, 157, 157, 255);
|
||||
|
||||
while (!WindowShouldClose())
|
||||
{
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
DrawRectangle(GetScreenWidth() / 2 - 128, GetScreenHeight() / 2 - 128, 256, 256, beefOutline);
|
||||
DrawRectangle(GetScreenWidth() / 2 - 112, GetScreenHeight() / 2 - 112, 224, 224, beefMain);
|
||||
|
||||
DrawText("raylib", GetScreenWidth() / 2 - 44, GetScreenHeight() / 2, 50, beefOutline);
|
||||
DrawText("beef", GetScreenWidth() / 2 - 62, GetScreenHeight() / 2 + 46, 50, beefOutline);
|
||||
|
||||
DrawRectangle(GetScreenWidth() / 2 + 54, GetScreenHeight() / 2 + 54, 42, 42, beefOutline);
|
||||
DrawRectangle(GetScreenWidth() / 2 + 62, GetScreenHeight() / 2 + 62, 26, 26, RAYWHITE);
|
||||
|
||||
DrawCircle(GetMouseX(), GetMouseY(), 20, beefOutline);
|
||||
DrawCircle(GetMouseX(), GetMouseY(), 8, beefMain);
|
||||
|
||||
DrawFPS(20, 20);
|
||||
|
||||
EndDrawing();
|
||||
}
|
||||
CloseWindow();
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## More Links
|
||||
* Raylib Repo (https://github.com/raysan5/raylib)
|
||||
* BeefLang (https://www.beeflang.org)
|
||||
|
|
Loading…
Add table
Reference in a new issue