Add menu on esc and don't close on esc

This commit is contained in:
2025-01-18 22:23:08 +01:00
parent 2a0f9348e9
commit fb018e2a7d
3 changed files with 78 additions and 27 deletions
+1 -2
View File
@@ -168,13 +168,12 @@ func (c *Chat) Update() (string, bool) {
c.inputBuffer = c.inputBuffer[:0]
c.cursorPos = 0
c.isTyping = false
return message, true
}
c.isTyping = false
}
if rl.IsKeyPressed(rl.KeyEscape) {
if rl.IsKeyPressed(rl.KeyEscape) && c.isTyping {
c.inputBuffer = c.inputBuffer[:0]
c.cursorPos = 0
c.isTyping = false