9-Patch Display Issues

0 favourites
  • 4 posts
  • Link to .capx file (required!):

    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.

    <img src="http://imageshack.us/a/img543/3808/2h59.jpg" border="0" />

    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.

    <img src="http://imageshack.us/a/img826/2936/pnzr.jpg" border="0" />

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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.

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