Text Input box - Part Styling with Scroll Bar Conundrum

0 favourites
  • 8 posts
From the Asset Store
All popular touch mechanics - scrolling, zooming, swiping
  • Hello,

    Conundrum!

    I'm trying to make a log that has the following:

    1. A Scroll bar (for when the log gets too big, players can use a scroll back to browse up and down the log)

    2. Part bold text - I'm going to use this for time and date. Yes, I know about the time and date tutorial on the website, that's fantastic but I want to make this part bold and the actual log details normal text.

    Is there any way to do both of these things in one object?

    The text box has everything I need except it doesn't come with a scroll bar - Do I have to design the scroll bar separately for this to work the best possible way and if so how does one do that?

    OR

    Do I use the Text Input field which scrolls and comes with a free scroll bar - but how would I make the time and date part of the message bold and not the rest?

    Your advice is appreciated and THANK YOU in advance! :)

  • -For number 1, yes you could create your own scrolling using sprites that shouldn't be a problem.

    -However for number 2, this is gonna be a bit tricky depending on how big your log data is.

    Example:

    -The "text Input plugin" has scrolling but doesn't support the BBcode as far as I know, so you cannot make some parts of the text in bold.

    -So you are left only with one choice the "Text plugin" as here it supports the BBcode but you need to be aware of the limitations that the Text plugin has a "maximum texture size limit"

    https://github.com/Scirra/Construct-3-bugs/issues/5331

    So if you cross that limit the text gets blurry, this means that you will need to split the logs into multiple texts instances if the logs are too big then you can place them one after the other so you can scroll them nicely like if they where in just one Text object. The calculation should be the same as if you had just one text object as you add up all the text objects Heights so you can use it to make the scroll bar calculation.

  • Okay, thanks for your advice tarek2

    How would I go about creating a scroll bar?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • There are many ways to make the scroll depending on your preference but if you haven't done any yet then I will suggest going for the simplest by using hierarchies so you can pin all the logs in one base, you will just need to keep track of how much you need to scroll when adding new logs.

    Here is one example:

    https://www.dropbox.com/s/cbmgo91orf8p79u/Scrolling%20List%20Dinamic1.c3p?dl=0

  • Hey tarek2

    This is about the type of system I am looking for. Excellent!

    Thank you so much for the example. I'll definitely use this to help me in my game! :)

  • tarek2

    Just one question on this example you shared, how would I make it so that you can click on the scroll bar (not the slider) and it jumps to that point in the text?

  • tarek2

    Just one question on this example you shared, how would I make it so that you can click on the scroll bar (not the slider) and it jumps to that point in the text?

    Np Glad, it was helpful.

    Something like this?

    https://www.dropbox.com/s/5oq7jcjmmxmajya/Scrolling%20List%20Dinamic2.c3p?dl=0

    Now that I think you could also use a list and jump to the logs directly but that means you will need to use a form object which will always be on top of the canvas so it can be very annoying.

  • tarek2

    Wow man, you make this seem easy. It makes sense now after I see it all, though, I just couldn't put it together.

    This is a great example to use. Thanks again for your help!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)