linkman2004's Forum Posts

  • Why not, isnt this a behavior and event situation?

    Yes, but this board is for questions pertaining to development of new plugins and behaviors as can be seen in the board description:

    "The SDKs and effect development."

  • HUGE new update now up!

    Sprite Button Plugin - v0.5a

    Download Now(with example) - 109KB

    Adds/Changes/Fixes:

    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.

  • The U and V values are pretty much equivalent to X and Y positions, but for texture coordinates. They stand for the point on the texture that associates with a vertex. In Construct these coordinates are actually numbered like screen coordinates rather than values from 0.0 - 1.0.

    Here's an image showing an example of UV coordinates:

    <img src="http://dl.dropbox.com/u/917406/UVexplanation.png">

    Since Construct's sprite meshes require displacement values, these wouldn't be the actual values. The real values, starting with the left square, would be 0, 0 all the way around; the right square, on the other hand, would -- going from the top-left corner around clockwise -- have these values:

    1 - 0, 0

    2 - 128, 0

    3 - 128, 128

    4 - 0, 128

    Hopefully I explained all of this well enough and that I got the main idea across. Hope this helps.

  • You don't have a mouse and keyboard object in the "Menu" layout, so the "On click" conditions are never triggering.

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

  • The expression I gave you does work(I made sure to test it), so I think it's probably something else in your code. Unfortunately, I don't really know what's going on with your code, so I can't help with the problem. Would you mind posting a CAP?

  • You can use the System object's Len() expression, which gets the length of a string. So to get the length of the text in an edit box, you'd use: Len(EditBox.Text)

  • All good ideas for a GUI plugin, although something complex as this would be pretty tricky to do. I'll most likely make other types of sprite controls -- sliders, text boxes, maybe even a tab plugin -- but I wouldn't get your hopes up for an all encompassing GUI plugin.

    Hmm. A GUI plugin would certainly be useful. Though, can we have this plugin working with keyboard/gamepad controls? Like, any button that happens to be active can be selected through, say, the arrow keys.

    That sounds like a fairly good idea. I'll see about implementing that at some point.

    Already using this.

    I am missing the ability to set stuff, id, text etc., from events.

    I'll work on integrating actions for those in the next version.

    Speaking of the next version, I'm currently sitting on a new build with support for two-state buttons and checkboxes. I'm still trying to work out a bug and I'll release once that's fixed.

  • I'm still having problems with runtime loaded image crashes. This one seems to be fixed, but there seems to be another crash that's related. The problem is that I can't seem to reproduce it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's not broken. I was actually working on something the other day in response to this that could convert the data into raw binary. I'll see if I can finish it tonight.

  • Just thought I'd chime in to suggest my Sprite Button plugin. They act like normal sprites, so Z-ordering isn't an issue.

  • Thanks for the comments, everybody! Glad you're enjoying it thus far.

    Nice idea!

    Ever thought about doing something like a gui plug?

    A GUI plugin could be a cool idea. Mind giving some suggestions on how it could work?

    I installed it, It doesn't appear to work.

    I use 99.5 by the way...

    Have you tried the example? Does that appear to be working?

  • Well, I've been working on this the past couple days and I'm now ready to release an alpha version of my latest plugin: Sprite Button!

    Sprite Button Plugin - v0.9b

    Download Now(with example) - 132KB

    Features:

    • Graphics: Specify the three main faces for your button: Default, hovering, and clicked.
    • Text: Add text to your buttons with options such as font, size, color, position, and offset.
    • Icons: Button icons allow you to assign your buttons -- unique objects only, copies will all have the same icon -- specialized icons, with options for positioning and offset.
    • Identifiers: Identifiers allow you to differentiate between copies of one button type. For example: You have three buttons of the same type with unique identifiers, "New", "Save", and "Load". Using the "Button clicked by ID" condition, you can check copies of buttons independently and have them do different things.

    You can also use the "Button identifier" expression to retrieve the identifier of the currently clicked button. This identifier can be used in tandem with the function object to call functions with the same name as the button identifier.

    Those are the main features for now. This is currently designated an alpha since I don't have all of the features in yet. Plans for the plugin include support for two state buttons, check boxes, and radio buttons, the latter of which should be pretty intuitive to use.

    Unfortunately I don't have time at the moment to pull together a proper example, but it's all rather intuitive and shouldn't be too hard to pick up.

    As with my other plugins, be sure to post with your thoughts about the plugin, feature requests, and any bugs you stumble across. Have fun!

  • New version!

    Advanced Camera Plugin - v0.85b

    Download Now(with example) - 151KB

    Additions/Fixes/Changes

    FIX - The "Set zoom" and "Smooth zoom" actions were setting the zoom levels to 100 times what was specified.

    CHANGE - Smooth rotation transitions now rotate in the shortest direction instead of only clockwise.

    Not a whole lot new in this build, but I suggest that if you are using this plugin you should download it for the zoom fix.

  • As a work around, for now you can use "Add force", setting the X and Y force to these:

    X: cos(Angle) * Force
    Y: sin(Angle) * Force[/code:33thacq4]