You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm making a level editor for my game with debugUI. It is working very well so far.
I haven't used popups yet but popup is one of the options for a right click menu for my entities while I'm in the edit level state. Otherwise I'll have to open a new window when I right click. I haven't tested it yet.
I will do that next to see which I prefer and let you know how the use case goes
Sorry for the slow response from me, I finally got time tonight to try it out.
My work with ebiten and golang and debug UI is all my hobby, it is not my day job so if I am too slow to get to something please don't let me halt your progress.
The popups work very conveniently to open and have buttons for the "menu". The only issue is that they do not close on button click. I thought this would be easy to fix by writing a simple close method like this:
func (c*Context) OpenPopup(namestring) {
cnt:=c.Container(name)
// set as hover root so popup isn't closed in begin_window_ex()c.nextHoverRoot=cntc.hoverRoot=c.nextHoverRoot// position at mouse cursor, open and bring-to-frontcnt.layout.Rect=image.Rect(c.mousePos.X, c.mousePos.Y, c.mousePos.X+1, c.mousePos.Y+1)
cnt.open=truec.bringToFront(cnt)
}
func (c*Context) ClosePopup(namestring) {
cnt:=c.Container(name)
cnt.open=false
}
And calling it in my button if statement but for reasons I don't yet understand this was not sufficient. When I get some more time I may experiment more but I think this feature is worth keeping around if it is simple to maintain because right mouse click menus are very common use cases in editors.
Another nice use of the popup is to popup a window when you click an element or entity while holding a key like Ctrl or Alt and have it populated with that entities state information like a debugger does on hover in IDEs.
In the end I do think the popup is worth keeping. Thank you for considering my input!
I'm very far behind in my fork because when I pulled last there were breaking changes. I think last time the example wasn't update yet. I will pull and try again. Thank you!
Activity
ShadyHippo commentedon Mar 25, 2025
I'm making a level editor for my game with debugUI. It is working very well so far.
I haven't used popups yet but popup is one of the options for a right click menu for my entities while I'm in the edit level state. Otherwise I'll have to open a new window when I right click. I haven't tested it yet.
I will do that next to see which I prefer and let you know how the use case goes
hajimehoshi commentedon Apr 5, 2025
I removed the milestone. Let's revisit this later.
ShadyHippo commentedon Apr 6, 2025
Sorry for the slow response from me, I finally got time tonight to try it out.
My work with ebiten and golang and debug UI is all my hobby, it is not my day job so if I am too slow to get to something please don't let me halt your progress.
The popups work very conveniently to open and have buttons for the "menu". The only issue is that they do not close on button click. I thought this would be easy to fix by writing a simple close method like this:
And calling it in my button if statement but for reasons I don't yet understand this was not sufficient. When I get some more time I may experiment more but I think this feature is worth keeping around if it is simple to maintain because right mouse click menus are very common use cases in editors.
Another nice use of the popup is to popup a window when you click an element or entity while holding a key like Ctrl or Alt and have it populated with that entities state information like a debugger does on hover in IDEs.
In the end I do think the popup is worth keeping. Thank you for considering my input!
hajimehoshi commentedon Apr 6, 2025
Hmm? Please check the latest API. There is already ClosePopup.
hajimehoshi commentedon Apr 6, 2025
So, are you using popups in your actual code?
ShadyHippo commentedon Apr 6, 2025
I'm very far behind in my fork because when I pulled last there were breaking changes. I think last time the example wasn't update yet. I will pull and try again. Thank you!
ShadyHippo commentedon Apr 6, 2025
Just tried it, yes - this is exactly what I need! Thank you!!
ShadyHippo commentedon Apr 6, 2025
I will be now. I need to update to the new API changes but once I do I will be using it for a right click menu
Vmarcelo49 commentedon Jun 14, 2025
I am also using the popups, since it seems that debugui doesnt have a dropdown/combo menu i use them to make an expandable list of my game objects