9-Patch Display Issues

Bugs will be moved here once resolved.

Post » Tue Oct 29, 2013 2:09 am

Link to .capx file (required!):
https://www.dropbox.com/s/vlgf3uyv6wxl6w7/9_patch.capx

Steps to reproduce:
1. Place 9 patch objects with varying margins.
2. Test on preview or export

Observed result:
Objects display incorrectly relative to the editor window.
Left is in preview, right is in editor.

Expected result:
Images to display as seen in the editor.

Browsers affected:
Chrome: yes
Firefox: yes
Internet Explorer: yes

Operating system & service pack:
Windows 7 64 bit
Construct 2 version:
Release 146 (64 bit) Commercial


Additional editor display error Objects disappearing in editor window when certain other objects visible.
Left image with all objects visiblie, Right image slightly moved left in editor hides these objects.
ShaunRemo2013-10-31 23:37:54
B
5
S
2
Posts: 6
Reputation: 646

Post » Thu Oct 31, 2013 6:48 pm

This occurs because the runtime only supports one set of margin values. The editor supports individual margins, but only the first set are used at runtime. To work around it, clone the object four times and set the margins for each different type. The runtime should work the same as the editor, but at least there's an easy workaround for now.
Scirra Founder
B
399
S
236
G
89
Posts: 24,525
Reputation: 195,382

Post » Thu Oct 31, 2013 11:43 pm

Thank you I will use the work around for now, are there any plans to remedy the multiple margins? as having multiple 9-patch objects of the same image seems a bit wasteful. Any ideas on the in editor display issues? (Updated the post so images appear)

Edit: the display issue was being caused by WebGL being enabled and certain objects being viewed.ShaunRemo2013-11-01 00:18:16
B
5
S
2
Posts: 6
Reputation: 646

Post » Fri Nov 01, 2013 2:36 pm

Construct 2 will deduplicate images on export so it's not wasteful. I'll leave the bug report open and try to support this in future.
Scirra Founder
B
399
S
236
G
89
Posts: 24,525
Reputation: 195,382


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests