AllenDang / giu

Cross platform rapid GUI framework for golang based on Dear ImGui.
MIT License
2.11k stars 127 forks source link

[bug] InputMultilineWidget doesnt make new line with Enter or Crtl Enter and Backspace key doesnt work #776

Closed ismyhc closed 4 months ago

ismyhc commented 4 months ago

What happend?

Im simply trying to use InputMultilineWidget for a message input box. When hitting enter or Crtl+Enter (when setting the flag) it doesnt create a new line.

Also, backspace key does not delete characters.

Its also worth noting this doesnt work in the examples either.

Code example

main.go ```golang package main import ( g "github.com/AllenDang/giu" ) var input string func loop() { g.SingleWindow().Layout( g.InputTextMultiline(&input).OnChange(func() { println("input changed") }), ) } func main() { wnd := g.NewMasterWindow("Huge list demo", 800, 600, 0) wnd.Run(loop) } ```

To Reproduce

  1. Run my demo
  2. Trying entering text and then pressing enter for new line. Also try deleting text with backspace

Version

master

OS

Ubuntu 23.10

ismyhc commented 4 months ago

I guess this is related to #754

Is there an easy workaround for this yet?

gucio321 commented 4 months ago

Unfortunately im not aware of any workaround... In going to fix this bug in the future... For now id suggest using v0.7

gucio321 commented 4 months ago

Closing as duplicate