WindowHeight incorrect value

Bugs will be moved here once resolved.

Post » Fri Feb 28, 2014 8:46 am

Problem Description
windowHeight doesn't seem to work, at least in letterbox mode, windowHeight gives the size of the viewport instead of giving the height of the project

Capx: http://www.mediafire.com/download/5d3j0 ... eight.capx

Expected Result
I expect windowHeight to give the project's window Height, not the browser's window Height.
Or at least get access to a projectWindowHeight parameter

Construct 2 Version ID
r163
B
6
S
2
G
1
Posts: 39
Reputation: 1,303

Post » Fri Feb 28, 2014 10:43 am

Closing, it is working by design. A better name for the expression would have been "CanvasHeight" but it's too late to change it now.
Scirra Founder
B
403
S
238
G
89
Posts: 24,653
Reputation: 196,143

Post » Fri Feb 28, 2014 10:53 am

@Ashley, let's say this is working as intended (getting the canva's height is basically useless since the actual coordinates don't change), how do I access the REAL project window's height short of entering it manually in a variable or dictionnary or whatever (meaning I have to input it twice) ?
B
6
S
2
G
1
Posts: 39
Reputation: 1,303

Post » Fri Feb 28, 2014 12:34 pm

ViewportBottom("layer") - ViewportTop("layer")
Scirra Founder
B
403
S
238
G
89
Posts: 24,653
Reputation: 196,143

Post » Fri Feb 28, 2014 4:36 pm

@Ashley, thanks, actually that's what I was using but in a Dictionary to make it less confusing in big expressions
B
6
S
2
G
1
Posts: 39
Reputation: 1,303


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest