RaylibFishGfx 1.0.1
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package RaylibFishGfx --version 1.0.1
NuGet\Install-Package RaylibFishGfx -Version 1.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="RaylibFishGfx" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="RaylibFishGfx" Version="1.0.1" />
<PackageReference Include="RaylibFishGfx" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add RaylibFishGfx --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: RaylibFishGfx, 1.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package RaylibFishGfx@1.0.1
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=RaylibFishGfx&version=1.0.1
#tool nuget:?package=RaylibFishGfx&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
RaylibFishGfx
Raylib graphics and input backend for FishUI. Provides a complete, production-ready implementation using Raylib-cs.
Features
- Complete IFishUIGfx Implementation - All 27+ methods implemented with native Raylib calls
- RaylibInput - Full keyboard, mouse, and text input handling
- Optimized - Native 9-patch, circles, texture filtering, and scissor clipping
- Game Loop Integration -
UseBeginDrawingoption for existing game loops
Installation
dotnet add package FishUI
dotnet add package RaylibFishGfx
Quick Start
using FishUI;
using FishUI.Controls;
using RaylibFishGfx;
using Raylib_cs;
// Create Raylib backend
var gfx = new RaylibFishGfx(1280, 720, "My App");
var input = new RaylibInput();
var events = new MyEventHandler(); // Implement IFishUIEvents
// Initialize FishUI
var settings = new FishUISettings();
var fishUI = new FishUI.FishUI(settings, gfx, input, events);
fishUI.Init();
// Load theme
settings.LoadTheme("data/themes/gwen_default.yaml", applyImmediately: true);
// Add controls
var window = new Window
{
Position = new Vector2(100, 100),
Size = new Vector2(400, 300),
Title = "Hello FishUI!"
};
fishUI.AddControl(window);
var button = new Button
{
Position = new Vector2(20, 50),
Size = new Vector2(120, 30),
Text = "Click Me!"
};
button.OnButtonPressed += (btn, mbtn, pos) => Console.WriteLine("Clicked!");
window.AddChild(button);
// Main loop
while (!Raylib.WindowShouldClose())
{
float dt = Raylib.GetFrameTime();
fishUI.Tick(dt, (float)Raylib.GetTime());
}
Raylib.CloseWindow();
Integrating with Existing Game Loops
If you already have a Raylib game loop with BeginDrawing/EndDrawing:
var gfx = new RaylibFishGfx(1280, 720, "My Game");
gfx.UseBeginDrawing = false; // Don't call BeginDrawing/EndDrawing
while (!Raylib.WindowShouldClose())
{
Raylib.BeginDrawing();
Raylib.ClearBackground(Color.SkyBlue);
// Draw your game here...
DrawGame();
// Draw UI on top
fishUI.Tick(Raylib.GetFrameTime(), (float)Raylib.GetTime());
Raylib.EndDrawing();
}
Classes
RaylibFishGfx
Complete graphics backend implementing SimpleFishUIGfx:
public class RaylibFishGfx : SimpleFishUIGfx
{
// Constructor
public RaylibFishGfx(int width, int height, string title);
// Set to false when integrating with existing game loop
public bool UseBeginDrawing { get; set; } = true;
}
RaylibInput
Input backend implementing IFishUIInput:
public class RaylibInput : IFishUIInput
{
public FishInputState GetInputState();
}
Implemented Features
| Feature | Implementation |
|---|---|
| Window management | Init(), GetWindowWidth(), GetWindowHeight(), FocusWindow() |
| Image loading | Full image, cropped regions, sub-images |
| Font loading | TTF fonts with size, spacing, color, monospace detection |
| Primitives | Lines, rectangles, circles (filled & outline) |
| Images | DrawTexture, DrawTexturePro, NPatch/9-slice |
| Text | MeasureText, DrawText with color/scale |
| Clipping | BeginScissorMode, EndScissorMode, push/pop stack |
| Filtering | Point (pixelated) or Trilinear (smooth) |
Links
License
MIT License - see LICENSE for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.