HISE Logo Forum
    • Categories
    • Register
    • Login

    Best Way to Implement an Infinite Text Console?

    Scheduled Pinned Locked Moved Solved Scripting
    5 Posts 3 Posters 182 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • clevername27C
      clevername27
      last edited by

      Does anyone know the best way to implement an infinite text console within a plugin?

      Would it need to be a label or markdown tile, inside a viewport, where each time you write to it, you must increase the size of the label/tile?

      Thanks.

      d.healeyD ustkU 2 Replies Last reply Reply Quote 0
      • d.healeyD
        d.healey @clevername27
        last edited by

        @clevername27 If it's just plain text then a label or even a panel, inside a viewport as you suggested. Markdown panel might do it too but it depends on your needs.

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

        clevername27C 1 Reply Last reply Reply Quote 1
        • ustkU
          ustk @clevername27
          last edited by

          @clevername27 I have made an infinite log using a panel.

          The tricky part is to get the paragraph height when drawing. If the line exceeds the panel's width, then it should be truncated to another line so you keep track the Y position for drawing the next line/paragraph...

          But this was before panels have been compatible with markdown so it might be a bit easier now

          What I do on my side is to push new log entries in an array, then I repaint the whole panel with that array of strings.

          Another thing I really struggled at that time is to keep the log showing the last line at the bottom of the panel (so keeping the viewport all all the way down). This is tricky because when repainting a panel, the parent viewport desperately want to go back to top. Alright, why not just set its viewPositionY to 1 again then? Well, that causes all sorts of flickering that make the repaint very unprofessional...
          If you hit this issue I will try to find that bit of code

          Can't help pressing F5 in the forum...

          clevername27C 1 Reply Last reply Reply Quote 1
          • clevername27C clevername27 has marked this topic as solved on
          • clevername27C
            clevername27 @d.healey
            last edited by

            @d-healey Thank you, David.

            1 Reply Last reply Reply Quote 0
            • clevername27C
              clevername27 @ustk
              last edited by

              @ustk Very cool - I gave up a lot quicker, lol. Thanks on the offer, very kind of you.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post

              18

              Online

              1.8k

              Users

              12.1k

              Topics

              104.9k

              Posts