gabstv / ebiten-imgui Goto Github PK
View Code? Open in Web Editor NEWDear ImGui renderer for Ebitengine
License: MIT License
Dear ImGui renderer for Ebitengine
License: MIT License
If you don't set display size properly, it throws a fatal panic in the imgui code that doesn't really explain much. There needs to be some check to make sure it's initialized correctly, and an error thrown if it's not.
Hi there,
With the recent updates to the latest cimgui-go, I was attempting to try out the newer docking features. Unfortunately it seems that the current state of cimgui-go relies on having a handle to the main window in order to set docking flags? I'm not entirely sure. I came across this example which I was unable to get working under this repository. Any ideas on how to make it work? AllenDang/cimgui-go#101
Hello
I think that some restructuring of the code/API is needed to make ebiten-imgui support different TPS/FPS rates.
In usual Dear ImGui setup, you call Begin/EndFrame and widget creation functions in "Update", not "Draw". Actual drawing should be just just done in "Draw" function.
So, I think it's the usage should be like this:
func (g *Game) Update() {
g.mgr.BeginFrame()
// put stuff like imgui.Button etc. here
g.mgr.EndFrame()
}
func (g *Game) Draw(screen *ebiten.Image) {
g.mgr.Draw(screen) // new function - doesn't call "EndFrame" for us
}
This is much better and allows to have 60 TPS (update calls per second) and 60+ FPS (Draw calls per second) - we just need to render the old frame if Draw has been called more than once for 1 update call. Note that we can call imgui.Render
once - it doesn't break anything.
Thoughts? If you agree with this, I can make a PR which implements the changes, though it'll break the API.
Hello.
See inkyblackness/imgui-go#192
This is pretty important, because imgui-go will stop getting updates. I've already ported ebiten-imgui to cimgui-go, see this branch of my fork. Most of the work is done, however cimgui-go doesn't have some stuff exposed here and there - I'll work on that.
I can make a PR, but some discussion is needed. Obviously, this is a big breaking change, so ebiten-imgui probably will need to go to v2. If this is the case, maybe it might be the time to rethink some of API decisions if we're breaking it anyway.
Any thoughts on this?
P.S. I now see that readme still says that "API might change", so maybe there's no need for v2.
go调用 非英语字符串 的其它语言全部不能正常显示 这个应该怎么解决呢
renderer.New method requires an parameter of type *imgui.FontAtlas. How do I create this *imgui.FontAtlas object and assign it to renderer.New method? I don't know how to create imgui.FontAtlas, imgui.CurrentIO().Fonts() returns the imgui.FontAtlas object, but I can't call imgui.CurrentIO() before, what do I do?
Hey, thanks for making this library, it's been extremely useful for me! Just wondering if you had any examples for using imgui.Image
with ebiten?
Hi there, I was curious if we could get this merged with the upstream repo? The following resolves an issue that is currently causing panic when building font ranges, an issue that I have also been dealing with.
thanks for your consideration!
After crawling through all the examples and source code for this project and the imgui-go project I finally stumbled upon the secret sauce to get the window to have the text "Menu" instead of "Debug". Can you please consider adding this to one of your examples?
g.mgr.BeginFrame()
imgui.Begin("Menu") // changes menu title from default "Debug"
{
imgui.Text("Hello, world!")
}
imgui.End()
g.mgr.EndFrame()
Hello, I want to paste content in the input box. How should I use this ClipMask? Do you have any ideas?
imgui.Text("ภาษาไทย测试조선말") // To display these, you'll need to register a compatible font
Can you provide an example? thx
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.