[Example] Sprite resizable button with 9patch

0 favourites
  • 2 posts
From the Asset Store
Unlock platyers earning coins, and save it with Localstorage
  • Hi guys,

    I was playing to find a simple way to create sprite buttons with the 9patch and ive got a demo up and running. You actually can resize it any size and the label will fellow. You can put any instance if you wish you just have to use the ID to identify them. (Or you could use their UID whatever). The idea was to be able to use button of any size without changing a single thing! (9patch was really useful here! thankis to Scirra for this)

    <img src="http://s8.postimg.org/gq4jsc6jp/buttons.png" border="0" />

    This enable you to make sprites button with 3 states: Normal, Clicked, Over (Active). You actually just have to include the events sheet in your stuff and put 'Button' object on your screen. That is the main object needed to create a button. I make use of containers.

    You can get the example here.

    mediafire.com

    Enjoy! :)

  • Try Construct 3

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

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

    thankyou for this example but when i try to make many buttons and i make it no space between button it cause bug like this

    screenshot : dropbox.com/sh/ormbajuyjfpcx2m/Sr6dxdhkZL

    hover mouse on the buttons and it do like that

    when i click some button its happen to all buttons

    help please :)

    EDIT: if i place picture on the button when i move mouse over button

    picture is disspear!

    EDIT: ok i fix a picture disspear now just use move to top layer <img src="smileys/smiley17.gif" border="0" align="middle" />

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