Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Starpelly/raylib-beef
Autogenerated Beef bindings for raylib
https://github.com/Starpelly/raylib-beef
beef-language bindings gamedev raylib
Last synced: 4 months ago
JSON representation
Autogenerated Beef bindings for raylib
- Host: GitHub
- URL: https://github.com/Starpelly/raylib-beef
- Owner: Starpelly
- License: mit
- Created: 2023-03-19T17:57:45.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-31T22:53:18.000Z (11 months ago)
- Last Synced: 2024-08-02T14:04:41.221Z (7 months ago)
- Topics: beef-language, bindings, gamedev, raylib
- Language: Beef
- Homepage:
- Size: 9.33 MB
- Stars: 9
- Watchers: 2
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# raylib-beef

BeefLang bindings for **Raylib 5.0**.
## Example
```cs
using System;
using RaylibBeef;
using static RaylibBeef.Raylib;namespace example;
class Program
{
public static int Main(String[] args)
{
InitWindow(800, 600, scope $"Raylib Beef {RAYLIB_VERSION_MAJOR}.{RAYLIB_VERSION_MINOR}.{RAYLIB_VERSION_PATCH}");
InitAudioDevice();let beefMain = Color(165, 47, 78, 255);
let 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();
}CloseAudioDevice();
CloseWindow();return 0;
}
}
```## Quick Start (using Beef IDE)
1. Clone this repository to wherever you want
2. Right-click on your workspace and select *Add Existing Project* and select the folder where the *BeefProj.toml* file is.
3. Add raylib-beef as a dependency of your project

## Static Linking
On Windows, default linking is set to dynamically link to raylib. This is because of some weird linking problems with MSVC. You can change that by selecting a different project configuration for raylib-beef in the **Workspace** settings. You can select from **StaticDebug** and **StaticRelease**.
## More Links
* Raylib Repo (https://github.com/raysan5/raylib)
* BeefLang (https://www.beeflang.org)## Contribution
I'll be happy to resolve any issues or pull requests.