What happened to newline?

Get help using Construct 2

Post » Fri Jan 29, 2016 11:33 pm

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?
B
48
S
14
G
4
Posts: 184
Reputation: 5,437

Post » Sat Jan 30, 2016 4:19 pm

Callan S wrote: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?
Image



The Things you can create is only limited by your imagination. If you don't have the skills then use your motivation as a natural force to exceed all expectations. Chadori RebornXD
B
53
S
17
G
90
Posts: 1,111
Reputation: 59,095

Post » Sat Jan 30, 2016 11:33 pm

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.
B
48
S
14
G
4
Posts: 184
Reputation: 5,437

Post » Sun Jan 31, 2016 1:41 am

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.
B
48
S
14
G
4
Posts: 184
Reputation: 5,437

Post » Sun Jan 31, 2016 5:52 am

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.
B
88
S
30
G
89
Posts: 5,106
Reputation: 60,323

Post » Sun Jan 31, 2016 7:52 am

R0J0hound wrote: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!
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.
B
48
S
14
G
4
Posts: 184
Reputation: 5,437

Post » Sun Jan 31, 2016 8:46 am

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.
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 787
Reputation: 3,786

Post » Sun Jan 31, 2016 9:54 am

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?
B
48
S
14
G
4
Posts: 184
Reputation: 5,437

Post » Sun Jan 31, 2016 10:05 am

Callan S wrote: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..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775


Return to How do I....?

Who is online

Users browsing this forum: ErekT, JaisonAntoniazzi and 8 guests