How do I correct my button problem

Get help using Construct 2

Post » Sat Oct 10, 2015 12:03 am

Look at what is happening to my buttons when I scroll my screen:

Image

What can I do to make my buttons scroll out of the screen without deformation?
B
15
S
6
Posts: 105
Reputation: 1,356

Post » Sat Oct 10, 2015 1:14 am

What button are you using? normal button?

I would use this plugin instead...
plugin-flatui-button-7-theme-50-icons-update-v1-4_t124213
Eat ALL THE BACON!
B
45
S
17
G
3
Posts: 290
Reputation: 4,993

Post » Sat Oct 10, 2015 1:24 pm

Yes, I use normal button. I tried the plugin button and it has the same behavior.

Thanks for the link, I will definitively use the button plugin instead the normal one.
B
15
S
6
Posts: 105
Reputation: 1,356

Post » Sat Oct 10, 2015 1:31 pm

The issue here is, that the button object isn't rendered inside the canvas.
It is a "DOM"-element that "floats" above..
That's why it will always be above sprites, even if you try to change the z-order..
It's also the reason why moving it has different results than moving objects that are rendered inside the canvas..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sat Oct 10, 2015 1:39 pm

So the solution is to use the mouse object and a sprite and recreate the button behavior (changing sprite animation on Cursor is over)?
B
15
S
6
Posts: 105
Reputation: 1,356

Post » Sat Oct 10, 2015 1:47 pm

Before buttons, I just used sprites with "on object clicked"

so I didn't even use buttons before... the old buttons were fairly glitchy...
Eat ALL THE BACON!
B
45
S
17
G
3
Posts: 290
Reputation: 4,993

Post » Sat Oct 10, 2015 2:07 pm

I guess it's personal preference..

I tend to use DOM-elements during creation and testing, but replace them with Sprites and the like before "publishing"
Just like I replace all text-objects with the sprite-font object..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sat Oct 10, 2015 2:30 pm

@LittleStain Do you have a solution to replace a TextBox object?
B
15
S
6
Posts: 105
Reputation: 1,356

Post » Sat Oct 10, 2015 3:16 pm

This should be a good start:

Image

Ofcourse, other keys (keycodes) should also be taken into account..

edit: SpriteF = SpriteFont-object
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sat Oct 10, 2015 3:49 pm

Thanks, I'll give it a try.
B
15
S
6
Posts: 105
Reputation: 1,356


Return to How do I....?

Who is online

Users browsing this forum: David181 and 17 guests