Sprite Button Plugin - UPDATE 01/23 - v0.9b

This forum is currently in read-only mode.
From the Asset Store
Fantasy Game includes more than 600 sound effects inspired by hit computer games like World of Warcraft and Diablo.
  • I'm getting a little issue with the button automatically setting clicked state if the window pops up and the cursor is over the button.

    Also mouse is over button doesn't seem to register.

    Then a small suggestion. A check box for unconfined text wrap beyond button size.

    And finally a small... er ok not so small suggestion. How about linking states to the animator?

    Might be interesting to animate the buttons.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm getting a little issue with the button automatically setting clicked state if the window pops up and the cursor is over the button.

    It could be the current version I have, but I can't seem to reproduce this

    Also mouse is over button doesn't seem to register.

    Ah, this is due to the fact that the object isn't capable of collision checks. That will change in the future.

    Then a small suggestion. A check box for unconfined text wrap beyond button size.

    I'll throw that into the next build

    And finally a small... er ok not so small suggestion. How about linking states to the animator?

    Might be interesting to animate the buttons.

    That would be a tough one, so I don't know how likely it is to happen, but I'll look into how it would work.

  • HUGE new update now up!

    Sprite Button Plugin - v0.5a

    Download Now(with example) - 109KB


    ADD - Check box button type added. Along with these come new conditions/actions for using them(C-Button is ticked, C-Button is ticked by ID, A-Tick button). Check boxes can be ticked from the start(which is represented in the layout editor) and display different text while ticked. A special "Check box" properties section appears when this button type is set.

    ADD - Two-state button type added. These have the same features as check boxes but resize like normal buttons and allow for icons.

    ADD - Confine text option in the edit-time properties. When checked the text will be confined to the borders of the button. Unchecked will allow text to go outside the edges of the button.

    ADD - Actions for altering text attributes: text, font, color, size, position, offset values, ticked text.

    ADD - Actions for setting group and identifier values. NOTE: Groups are a feature that will be used for radio buttons in the future.

    CHANGE - Edit-time properties have been shifted around and added to different groups for clarity and usability.

    CHANGE - Behaviors are no longer allowed for the sprite buttons. This would mess with the collision mask offsets on check boxes and radio buttons.

    CHANGE - Button clicks are now detected through collision detection, meaning buttons can now be whatever shape is desired. The collision mode must be set to per-pixel for this to work.

    FIX - Confined text could go off the edges of the button.

    Just a warning to those with CAPs already using this: I've done as much as I can to make sure that existing CAPs don't break, but I can't be 100% sure. It's best that you back up your files before trying out the new plugin.

    Well, that's about it. The included example shows off both check boxes and non-square buttons, so it should give people a pretty good idea of how things work.

    As always, PLEASE be sure to respond with feedback and any problems you have. If you find a bug, be sure to report it to me!

    Have fun.

  • Awesome work! So far I haven't noted any faults. Looking forward to further additions, such as radio buttons

  • Last major update is up right now!

    Sprite Button Plugin - v0.6a

    Download Now(with example) - 127KB


    [ADD] - Radio button type added. Radio buttons in the same group have control over each other; For example, if three radio buttons are in the same group, only one can be ticked at any given time.

    [ADD] - New actions added: Button clicked by ID and group, Button clicked by group, Button toggled by ID and group, Button toggled by group.

    [ADD] - New expressions: Button group, Button type(returns: 0 = Normal, 1 = Two-State, 2 = Check box, 3 = Radio).

    [CHANGE] - Groups can now be used with all button types.

    [FIX] - Zooming screwed up hover/click detection

    This will be the last major update feature-wise since all of the button types are in, but I'll keep releasing new version with small features and bug fixes.

    Anyways, I'll leave everybody to play with the new example file that's included. Once again, leave feedback and any bugs you run across.

    Have fun.

  • are controls supposed to be clickable when invisible?

    Could it be made so they are unclickable when invisible?

    They work great anyhoo, will put them to use right now =) thanks!

  • Thanks, Madster. I've got a new version with your suggestion:

    Sprite Button Plugin - v0.7a

    Download Now(with example) - 128KB


    [ADD] - New option to disable a button while it is invisible: Properties -> Disable when invisible. This will make the button unclickable when either it is set to invisible or the layer it's on is invisible.

    [ADD] - Option to make a button invisible from the start of the layout: Properties -> Invisible on start.

    Just a small update, but these new features, specifically the one allowing for the disabling of buttons while invisible, could make things such as tabbed interfaces much easier.

    Have fun.

  • Thank you very much for this. Construct is more complete with this plugin. I noticed that your 'Insert new object' SpriteButton only appears in New Direct X Game and not New Application. It's very much suited to apps and I thought that it didn't work at all or I had done something wrong until I tried again with new game instead of application. Thanks for putting in the hard work to make things so much easier for everyone else.

  • Thanks, table. Glad you find it useful.

    I have a small new update ready here. Nothing earth shattering, but there it is:

    Sprite Button Plugin - v0.71a

    Download Now(with example) - 128KB


    [CHANGE] - Drawing speed optimizations. Text would still be processed and drawn even when there was none.

  • Me likes. Very much.

  • I've come with a fairly major update to this plugin! Check it out:

    Sprite Button Plugin - v0.8a

    Download Now(with example) - 132KB


    [ADD] - "Compare button group" and "Compare button identifier" conditions added. These will only check if the the group/identifier is equal to the specified value. If you want to see if it is not equal, just invert the condition.

    [ADD] - "Override text position" property added for check boxes and radio buttons. This is checked by default. When checked, the "Text position" property in the "Text" category is overridden and the text is automatically placed to the right of the button image. Unchecking this will allow for free alignment of the text.

    [CHANGE] - Check boxes and radio buttons can now have button icons. Now that I think about it, I don't know why this was disabled before, but they're there for everybody to use now.

    As usual, please leave any comments and suggestions, and be sure to mention any bugs you come across.


  • This is likely to be the last update to this plugin. I'm giving everybody one week to throw their requests and bug reports out here before I declare it complete and throw it into the appropriate forum. It's been just sitting around here for too long, so I intend to shuffle it off to its rightful place.

    Sprite Button Plugin - v0.9b

    Download Now(with example) - 132KB


    [ADD] - Added "Assume radio toggle" parameter to "Set group" action. If set to yes, the radio button switching groups will assume the toggled state in its new group.

    [FIX] - Assigning a radio button to a new group during runtime -- assuming it was already checked -- could result in two radio buttons in the same group being checked.

    [FIX] - Using the "Tick button" action on a radio button could result in two buttons in the same group being toggled at the same time.

    Again, there's a one week period where bug reports and feature requests can be made before I declare this complete. If you come across any bugs, be sure to mention it, because I don't want to accidentally declare an incomplete plugin complete.

  • What a great plugin! Working good with 99.8 so far.

    This type of work will push Construct past the simple game making app into the serious side. ...or let me choose to launch missiles or Energy weapons.

  • Great plugin, I'm hoping you could submit it to Ashley and co. so it has a better chance of staying compatible with future Construct versions.

  • Thanks, guys.

    Well, I gave this thread a lot longer than I said I would, so it's time to end it. The new thread can be found here:

    [PLUGIN] Sprite Button(In: Completed addons)

    Any comments, questions, or feature requests should be made there.

    RIP Original Sprite Button Thread - November 2009 to February 2010

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