Disabled buttons can be pressed

Bugs will be moved here once resolved.

Post » Mon Jun 16, 2014 8:04 pm

Problem Description
As subject says, the problem is that disabled buttons can be pressed and runs an event.
On Chrome, buttons works fine if are visible and disabled: they can't be pressed.
On Firefox and Internet Explorer, buttons can be pressed also if are visible and disabled.

Attach a Capx
https://www.dropbox.com/s/k8wsx38fv6cle ... utton.capx

Description of Capx
With this Capx you can see that pressing where there is an invisible and disabled button, an event will work anyway.

Steps to Reproduce Bug
  • Run Layout
  • Press where the yellow button is

Observed Result
Text "Hi" will appear also if invisible button is disabled (invisible button is on yellow area).

Expected Result
Text "Hi" should not appear because button is set on "disabled".

Affected Browsers
  • Chrome: YES (only if button is invisible and disabled)
  • FireFox: YES (also if button is visible and disabled)
  • Internet Explorer: YES (also if button is visible and disabled)

Operating System and Service Pack
Windows 7 64 bit SP1

Construct 2 Version ID
r172
B
6
S
1
Posts: 4
Reputation: 435

Post » Thu Jun 19, 2014 3:59 am

Yep. I guess you are right.

Windows 8.1 Update 1 x64, Construct 2 R173 x64
B
86
S
25
G
11
Posts: 652
Reputation: 11,047

Post » Thu Jun 19, 2014 6:33 am

I don't use buttons in C2, never have - I use sprites, but I agree, it doesn't work.
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,708

Post » Thu Jun 19, 2014 12:01 pm

Totally agree on this one, but i took it more of a "It's a feature, not a bug" approach.
But while we are at it, a few additions to the Button object could be great:
Condition - If disabled
Condition - If hovered
Condition - On Right Clicked
Expression - Button State (Disabled, Enabled, Hovered)

These additions might could come in handy, at least for me :)
Especially the On Right Clicked and If Disabled is important for me.
- Conti
"It's done when it's done"

Shadows of War
Buy on Steam ;)
B
24
S
10
G
7
Posts: 253
Reputation: 4,931

Post » Wed Jun 25, 2014 2:40 pm

Closing as not a bug. The 'Button: on clicked' trigger does not fire if the button is invisible or disabled. However you have 'Is touching button' in an OR block, and the touch object is set to use mouse input. By design, 'Is touching object' just checks if there is a touch within the object's rectangle regardless of its settings, so this is working correctly.
Scirra Founder
B
395
S
232
G
88
Posts: 24,368
Reputation: 193,746


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest