All Projects → gabstv → ebiten-imgui

gabstv / ebiten-imgui

Licence: MIT license
Dear ImGui renderer for Ebitengine

Programming Languages

go
31211 projects - #10 most used programming language
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to ebiten-imgui

ray engine
A toy raycasting engine in Go + Ebiten
Stars: ✭ 19 (-76.83%)
Mutual labels:  ebiten
Syndra
3D Game Engine/Renderer
Stars: ✭ 40 (-51.22%)
Mutual labels:  imgui
imgui entt entity editor
A drop-in entity editor for EnTT with Dear ImGui
Stars: ✭ 146 (+78.05%)
Mutual labels:  imgui
skulls
💀 💀 💀 s k u l l s 💀 💀 💀
Stars: ✭ 35 (-57.32%)
Mutual labels:  ebiten
microui-odin
A tiny immediate-mode UI library for The Odin Programming Language
Stars: ✭ 24 (-70.73%)
Mutual labels:  imgui
Fractal Engine
WIP 3D game engine with editor and other stuff
Stars: ✭ 152 (+85.37%)
Mutual labels:  imgui
imgui
ImGui bindings for Nim via cimgui
Stars: ✭ 117 (+42.68%)
Mutual labels:  imgui
imgui-rs-vulkan-renderer
A Vulkan renderer for imgui-rs using Ash
Stars: ✭ 44 (-46.34%)
Mutual labels:  imgui
binviz
Binary visualization tool primarily aimed at videogame reverse engineering & research.
Stars: ✭ 32 (-60.98%)
Mutual labels:  imgui
ButOSX
CSGO Cheat Base for MacOSX. Written in C++ & Objective C. Menu Powered by ImGui. Includes Apple TouchBar API.
Stars: ✭ 58 (-29.27%)
Mutual labels:  imgui
cocos2d-x-imgui
ImGui for cocos2d-x, with lua binding
Stars: ✭ 24 (-70.73%)
Mutual labels:  imgui
panorama
Lightweight system monitor for Linux
Stars: ✭ 31 (-62.2%)
Mutual labels:  imgui
ParsecSoda
Parsec Soda is a custom open-source game streaming app that integrates with Parsec API and is focused in Host experience.
Stars: ✭ 135 (+64.63%)
Mutual labels:  imgui
bawr
SVG/Font Icon processing tool for C++
Stars: ✭ 66 (-19.51%)
Mutual labels:  imgui
magia
magia is a toy GBA emulator written in golang.
Stars: ✭ 432 (+426.83%)
Mutual labels:  ebiten
UEImgui
Use imgui in unreal for customize editor
Stars: ✭ 75 (-8.54%)
Mutual labels:  imgui
ImStudio
Real-time GUI layout designer for Dear ImGui
Stars: ✭ 285 (+247.56%)
Mutual labels:  imgui
Poptart.jl
🏂 GUI programming in Julia based on CImGui.jl
Stars: ✭ 44 (-46.34%)
Mutual labels:  imgui
s7-imgui
Using s7 scheme alongside Dear ImGui to (interactively) build (cross platform) GUI apps.
Stars: ✭ 29 (-64.63%)
Mutual labels:  imgui
wave-gui
Yet another data-over-sound tool
Stars: ✭ 64 (-21.95%)
Mutual labels:  imgui

Dear ImGui for Ebitengine

A renderer of imgui-go for Ebiten!

This project is in a pre-alpha stage. The API might change in future versions.

preview

Usage:

package main

import (
	"fmt"
	"image/color"

	"github.com/gabstv/ebiten-imgui/renderer"
	"github.com/hajimehoshi/ebiten/v2"
	"github.com/hajimehoshi/ebiten/v2/ebitenutil"
	"github.com/inkyblackness/imgui-go/v4"
)

func main() {
	mgr := renderer.New(nil)

	ebiten.SetWindowSize(800, 600)

	gg := &G{
		mgr: mgr,
	}

	ebiten.RunGame(gg)
}

type G struct {
	mgr *renderer.Manager
	// demo members:
	clearColor [3]float32
	floatVal   float32
	counter    int
	name       string
}

func (g *G) Draw(screen *ebiten.Image) {
	screen.Fill(color.RGBA{uint8(g.clearColor[0] * 255), uint8(g.clearColor[1] * 255), uint8(g.clearColor[2] * 255), 255})
	ebitenutil.DebugPrint(screen, fmt.Sprintf("TPS: %.2f", ebiten.CurrentTPS()))
	g.mgr.Draw(screen)
}

func (g *G) Update() error {
	g.mgr.Update(1.0/60.0)
	g.mgr.BeginFrame()
	{
		imgui.Text("ภาษาไทย测试조선말")                        // To display these, you'll need to register a compatible font
		imgui.Text("Hello, world!")                       // Display some text
		imgui.SliderFloat("float", &g.floatVal, 0.0, 1.0) // Edit 1 float using a slider from 0.0f to 1.0f
		imgui.ColorEdit3("clear color", &g.clearColor)    // Edit 3 floats representing a color

		//imgui.Checkbox("Demo Window", &showDemoWindow) // Edit bools storing our window open/close state
		//imgui.Checkbox("Go Demo Window", &showGoDemoWindow)
		//imgui.Checkbox("Another Window", &showAnotherWindow)

		if imgui.Button("Button") { // Buttons return true when clicked (most widgets return true when edited/activated)
			g.counter++
		}
		imgui.SameLine()
		imgui.Text(fmt.Sprintf("counter = %d", g.counter))

		imgui.InputText("Name", &g.name)
	}
	g.mgr.EndFrame()
	return nil
}

func (g *G) Layout(outsideWidth, outsideHeight int) (int, int) {
	g.mgr.SetDisplaySize(float32(800), float32(600))
	return 800, 600
}
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].