All Projects → martinlindhe → gameui

martinlindhe / gameui

Licence: MIT license
A game UI for golang

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to gameui

go-space-crane
Simple moonlander like game with some new mechanics
Stars: ✭ 15 (-34.78%)
Mutual labels:  ebiten
ebiten-imgui
Dear ImGui renderer for Ebitengine
Stars: ✭ 82 (+256.52%)
Mutual labels:  ebiten
magia
magia is a toy GBA emulator written in golang.
Stars: ✭ 432 (+1778.26%)
Mutual labels:  ebiten
HaxePunk-UI
A Haxe port of the punk.ui project.
Stars: ✭ 17 (-26.09%)
Mutual labels:  game-ui
skulls
💀 💀 💀 s k u l l s 💀 💀 💀
Stars: ✭ 35 (+52.17%)
Mutual labels:  ebiten
ray engine
A toy raycasting engine in Go + Ebiten
Stars: ✭ 19 (-17.39%)
Mutual labels:  ebiten
ore-ui
💎 Building blocks to construct game UIs using web tech.
Stars: ✭ 122 (+430.43%)
Mutual labels:  game-ui
awesome-dear-imgui
A collection of awesome dear imgui bindings, extensions and resources
Stars: ✭ 439 (+1808.7%)
Mutual labels:  game-ui
Ebiten
A dead simple 2D game library for Go
Stars: ✭ 5,563 (+24086.96%)
Mutual labels:  ebiten
boids
🦢 The boids flocking simulation in Wasm using Ebiten!
Stars: ✭ 56 (+143.48%)
Mutual labels:  ebiten

About

GoDoc Travis-CI codecov.io

A game UI for golang with boilerplate to run with ebiten.

Example usage

package main

import "github.com/martinlindhe/gameui"

const (
    width, height = 320, 200
    fontName      = "_resources/font/open_dyslexic/OpenDyslexic3-Regular.ttf"
)

var (
    gui       = ui.New(width, height)
    font12, _ = ui.NewFont(fontName, 12, 72, ui.White)
)

func main() {
    // add a text element
    text := ui.NewText(font12).SetText("hello")
    text.Position = ui.Point{X: width/2 - text.GetWidth()/2, Y: height / 3}
    gui.AddComponent(text)

    if err := gui.Update(); err != nil {
        return err
    }

    // get a image.Image
    img := gui.Render()
}

Full example using ebiten:

go get github.com/martinlindhe/gameui
cd $GOPATH/src/github.com/martinlindhe/gameui
go run examples/tooltip/main.go

See the examples folder for more examples

License

Under MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].