What happened to newline?

0 favourites
  • 9 posts
From the Asset Store
Shark.io
$49 USD
Shark.io in the sea full of killer sharks, Sunday of life is the game. Who knows what is happening under the sea?
  • I have some buttons that I change the text of and use newline as part of that.

    It was working fine last night, but this morning newline doesn't seem to be working? What happened? It kind of screws up all my buttons? I'm on chrome - did it update somehow without notifying me?

  • I have some buttons that I change the text of and use newline as part of that.

    It was working fine last night, but this morning newline doesn't seem to be working? What happened? It kind of screws up all my buttons? I'm on chrome - did it update somehow without notifying me?

    I checked it and Newline seems to be working. Did you update in what version? Beta? or Stable? Do you have a .capx to show us?

  • I haven't updated construct at all.

    I'm looking at the post editor and I have no idea how to attach a capx?

    I can start a new project, add a button, add a system 'on start of layout' and set the text of the button to 'Line 1' & newline & 'Line 2' and the button will show "Line1Line2"

    Keep in mind this problem is with buttons - newline still works with text boxes.

  • Even better I find I can't put text boxes in front of buttons. So for no reason at all my buttons have f'd up and I have to reconstruct them in a way I don't actually know right now so I can have any sense of progress.

  • I don't think newline ever worked with buttons. You can make the text into multiple lines by changing the size of the button though, so maybe that's what you had before.

    The reason you can't put text objects on top of the button is because it's a form control that's not drawn to the canvas. Instead it's above the canvas.

    Technical stuff aside, if you want more control you could make the buttons with sprites instead.

  • I don't think newline ever worked with buttons.

    It definitely has. I've been working on this project for probably two to three months, with a button using newline in it from near day one!

    [quote:2b200joc]You can make the text into multiple lines by changing the size of the button though, so maybe that's what you had before.

    Right now, without newline working, the text simply goes to the edge of the button and disappears - there's no word wrap.

    What I really don't get is how it could work one night, then with no change on my part, multiple buttons using newline ceased to use it the next day. Also just figured the problem is not exclusive to chrome - internet explorer wont do it either.

    Was something depreciated in web browsers recently or something?

    It's really annoying to have to have a sprite and a text object compared to before.

  • It works in Opera, does not work in NW.js, so different browser engines may either support it or not. Maybe you have changed your preview browser or your browser got updated and changed that somehow. Anyway, in that case I would also suggest to use sprite buttons to ensure supporting every browser out there.

  • Any tips on attaching changeable text to a sprite? If there is a way of connecting sprite and text more than just putting one on top of the other?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Any tips on attaching changeable text to a sprite? If there is a way of connecting sprite and text more than just putting one on top of the other?

    You could put them together in a container, you could give one of the two an instance variable with the uid of the other or give both the same instance variable, so you'd know which one belongs to which one..

    So many options, so much to choose..

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