kb2ma / cotel

CoAP messaging GUI tool
Apache License 2.0
4 stars 1 forks source link

The `Multiline` is part of the `ImGuiInputTextFlagsPrivate` now #2

Open MrOneTwo opened 2 years ago

MrOneTwo commented 2 years ago

I'm trying to play around with this app (thanks for writing it!) but there seems to be problems with compiling. The Multiline is part of the ImGuiInputTextFlagsPrivate now. The commented out chunk on the bottom also complains so I commented it out for now, since I don't fully understand why it doesn't build.

diff --git a/src/gui/client.nim b/src/gui/client.nim
index 6cb104e..7bc2c8a 100644
--- a/src/gui/client.nim
+++ b/src/gui/client.nim
@@ -526,7 +526,7 @@ proc showRequestWindow*(fixedFont: ptr ImFont) =
         validateTextPayload(reqPayText)
       reqPayText = buildPayloadText(reqPayload, FORMAT_HEX)

-    var payFlags = ImGuiInputTextFlags.Multiline.int32 or
+    var payFlags = ImGuiInputTextFlagsPrivate.Multiline.int32 or
                    ImGuiInputTextFlags.CallbackCharFilter.int32
     # Can't edit in text mode if contains non-editable chars
     if not isTextOnlyReqPayload and reqPayFormatIndex == FORMAT_TEXT.int32:
@@ -673,9 +673,9 @@ proc showRequestWindow*(fixedFont: ptr ImFont) =

       igSetNextItemWidth(420)
       igPushFont(fixedFont)
-      discard igInputTextCap("##respPayload", respPayText, len(respPayText),
-                             ImVec2(x: 0f, y: igGetTextLineHeightWithSpacing() * 8),
-                             (ImGuiInputTextFlags.Multiline.int or ImGuiInputTextFlags.ReadOnly.int).ImGuiInputTextFlags)
+      # discard igInputTextCap("##respPayload", respPayText, len(respPayText),
+      #                        ImVec2(x: 0f, y: igGetTextLineHeightWithSpacing() * 8),
+      #                        (ImGuiInputTextFlagsPrivate.Multiline.int or ImGuiInputTextFlags.ReadOnly.int).ImGuiInputTextFlags)
       igPopFont()

   igEnd()
kb2ma commented 2 years ago

Thanks for the report. Unfortunately I have zero time to investigate. Feel free to fork the project of course. :-)

MrOneTwo commented 2 years ago

@kb2ma Understandable. I hope I'll find some time soon to play around with cotel.