Disponible
amalgame-ui-sdl
Binding SDL2 : fenêtre, événements, dessin 2D, texte.
Vue d'ensemble
Binding à SDL2 et SDL2_ttf, liés dynamiquement : fenêtres, événements clavier et souris, dessin 2D et texte.
Caractéristiques
- ✓SDL2 et SDL2_ttf liés dynamiquement (
libsdl2-devetlibsdl2-ttf-devpour compiler) - ✓Fenêtre, événements, dessin 2D :
Clear,FillRect,DrawLine,DrawText - ✓Détection du thème clair ou sombre du système (
OSTheme.DetectOS) - ✓Entrées clavier, souris et texte
- ✓Base de
ui-forms
Exemple
Exemple minimal d'utilisation — recopiable tel quel après l'install.
amc package add ui-sdl
import Amalgame.UI.SDL
public class Program {
public static void Main(string[] args) {
let win: Window = Window.New("Demo", 800, 600)
if (win == null) {
return
}
let bg: Color = new Color(32, 32, 32, 255)
let blue: Color = new Color(0, 160, 255, 255)
while (!win.ShouldClose()) {
win.Poll()
win.Clear(bg)
win.FillRect(new Rect(100, 100, 200, 120), blue)
win.Present()
}
win.Close()
}
}
En bref
- Licence : Apache-2.0
- Installation :
amc package add ui-sdl - Code source : amalgame-lang/amalgame-ui-sdl
- Index officiel : amalgame-lang/packages-index