How do I set the ANGLE of a 9-Patch object?

0 favourites
  • 3 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • Ok, maybe I'm not using the 9-Patch object correctly, but I'd like to be able to set the angle. There is no "angle" parameter under the "common" properties.

    WHY? I just like the look of the boxes better than a scaled/stretched sprite - for all the reasons given in the example of the 9-patch, it just looks better. I'm using (well, was trying to use) them as HUD elements, but need to place them at different angles, not just parallel boxes.

    Thanks!

    PS: I did try to use the action "Move at Angle" where I set the "move" parameter = 0 and the angle to 45. But that didn't do anything. And that may not be the proper way to express that anyway. <img src="smileys/smiley5.gif" border="0" align="middle" />

    PPS: Is there any hidden "gotcha" stuff with the 9-patch object, like "Oh, it doesn't work in Safari." I'd like to know before I get too far committed to it. Thanks!!

  • Quick hack off the top of my head, rotate the layer that its on.

    Better solution - if you're using a fixed HUD, take a little time and create the sprites sized as you want them. If your design is not finalized, use placeholders.

    This won't work if you're constantly resizing HUD elements though.. you may want to make custom events to mimic 9patch behavior. Maybe a 3 patch? For example have a fixed image for the ends of a status bar, and a stretchable sprite in the middle.

    Doesn't look like 9patch supports angles. Behaviors don't rotate it either. Any possible future support for this?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey thanks

    I had no idea you could rotate layers! I agree it may not be the best solution for this, but good to know - you never know when that might come in handy.

    Yes, after I posted this I realized that I should just make a PNG sprite of the HUD in Photoshop and use that - it was just enticing to build it in C2, but this will be better in the long run.

    Thanks again for your help!

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