r80: Clone text doesn't clone all properties

Bugs will be moved here once resolved.

Post » Wed Mar 07, 2012 3:47 pm

When you copy and paste a text object the text properties such as font, color, alignment transfer to the copy. However when you clone a text object, they do not. It appears that Clone Object Type for a text object is the same as insert new object except for the object name being derived from the cloned object. (EDIT: It will clone the instance variables and behaviors attached to the original. Just not the text properties.)

To see the issue:
1) Create a text object.
2) Change the text, font size and/or color.
3) Right click on the text object and choose the Clone Object Type item from the context menu.
4) Click to place the cloned object. The text properties do not transfer.

In contrast, this works well:
1) Copy the text object created in step 1 above.
4) Paste and then click to place. The text properties in the new instance are the same as in the copied instance.

This is a relatively low priority since there is a workaround, but it is tedious when you have a lot of text objects you want to have the same formatting which you must perform over and over.

EDIT: Also, I've seen the same issue when you have created a sprite, made some changes to size and opacity, and then try to clone it. The changes you made don't transfer to the clone. For example, I created a rectangle sprite that I faded and changed opacity to use for image buttons, but when I tried to clone them I ended up having to resize and change the opacity again. kittiewan2012-03-07 16:04:46
B
29
S
11
G
12
Posts: 281
Reputation: 11,868

Post » Mon Jul 16, 2012 8:29 pm

I find this tedious as well.

Why bother having cloning functionality if it just creates new?
B
3
Posts: 3
Reputation: 381

Post » Mon Jul 16, 2012 10:01 pm

Well, the feature was intended for sprite objects, looks like I missed copying the properties for Text though.

I didn't think this was very important though because I thought it was pretty rare to even need to clone a text object. If you're not setting the text through events, you can just control+drag new instances of the same type and set their text individually.
Scirra Founder
B
357
S
214
G
72
Posts: 22,946
Reputation: 178,228

Post » Wed Jul 18, 2012 7:33 am

I have just started using Construct 2. What a fantastic piece of software.
Congratulations Ashley, you really have done an amazing job!

I work as a User Experience professional and have been looking to move into gaming. From my initial use, Construct 2 seems to be exactly what I need.

Back on topic: I agree that this would be a nice feature. In fact, this was the behaviour I expected when I cloned the text object. I had one text instance placed on another to create a dropshadow effect (wrong method?) and had to do that again each time.
B
14
S
3
G
3
Posts: 25
Reputation: 3,217

Post » Wed Jul 18, 2012 3:30 pm

@NewSkool - Thanks! But again in that case you can just control+drag the text object, and change the color/properties of the new instance you just dragged. I agree it's a bug and should be fixed, it's just that's probably preferable to cloning anyway, since you don't end up with a second object type just for a text shadow.
Scirra Founder
B
357
S
214
G
72
Posts: 22,946
Reputation: 178,228

Post » Thu Jul 19, 2012 12:07 am

First, even as it is, clone text does have its uses to clone the instance variables and behaviors. It would be nice to have more, but there are thing's that are much more worth spending time on.

But regardless of whether you do anything about text object cloning, note the edit at the bottom of the original post (reproduced below) saying that even sprite objects don't clone all attributes, like size and opacity. I probably should have reported that separately. Do you want me to? (It's still an issue in release 99.)

[QUOTE=kittiewan]
EDIT: Also, I've seen the same issue when you have created a sprite, made some changes to size and opacity, and then try to clone it. The changes you made don't transfer to the clone. For example, I created a rectangle sprite that I faded and changed opacity to use for image buttons, but when I tried to clone them I ended up having to resize and change the opacity again. [/QUOTE]

B
29
S
11
G
12
Posts: 281
Reputation: 11,868

Post » Thu Dec 13, 2012 2:37 pm

I have a screen with 30 level boxes on it. Each level box shows the score for each level in a text box under it. So each textbox has to be unique. How can I clone one textbox (with properties) 30 times? Or is there a different way to do it?
B
19
S
3
G
2
Posts: 212
Reputation: 4,006

Post » Thu Dec 13, 2012 3:39 pm

@kenhes - this is a closed bug report. You probably want to post your question in the "How do I" forum.
Scirra Founder
B
357
S
214
G
72
Posts: 22,946
Reputation: 178,228


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 0 guests