Immediate-Mode-UI / Nuklear

A single-header ANSI C immediate mode cross-platform GUI library
https://immediate-mode-ui.github.io/Nuklear/doc/index.html
8.89k stars 533 forks source link

GDI+ (gdip), Text Input Copy/Paste/Ctrl+A not working #572

Closed nyaruku closed 10 months ago

nyaruku commented 11 months ago

image So I'm working on an Application with Nuklear and i realised following things:

a1ive commented 10 months ago

https://github.com/Immediate-Mode-UI/Nuklear/blob/614abce05b9455849bbf1519b7f86e53c78b04ab/demo/gdip/nuklear_gdip.h#L789 => if (!IsClipboardFormatAvailable(CF_UNICODETEXT) || !OpenClipboard(NULL)) It's working for me. (https://github.com/Immediate-Mode-UI/Nuklear/issues/126)

nyaruku commented 10 months ago

https://github.com/Immediate-Mode-UI/Nuklear/blob/614abce05b9455849bbf1519b7f86e53c78b04ab/demo/gdip/nuklear_gdip.h#L789 => if (!IsClipboardFormatAvailable(CF_UNICODETEXT) || !OpenClipboard(NULL)) It's working for me. (https://github.com/Immediate-Mode-UI/Nuklear/issues/126)

gonna try the paste fix, but for me ctrl+a is also not working, and i tried to switch to GDI and it works, so I'll have to stick with GDI for now, gonna try to compare the gdi+ header with the gdi header if i can find a fix.

nyaruku commented 10 months ago

Alright i fixed copy/paste by just using the code from the gdi header, now i have to fix the ctrl+a im pretty sure it has something to do with the key events, gonna do a PR once i fixed that too

nyaruku commented 10 months ago

image after comparing both headers, i realised that gdip header doesnt even have a switch statement to select all the text bruh

nyaruku commented 10 months ago

Fix is there, updated my PR: https://github.com/Immediate-Mode-UI/Nuklear/pull/576/commits/0435477a914dc4a58e3e80dd5301314757a67749 https://github.com/Immediate-Mode-UI/Nuklear/pull/576