How do I change the c2canvas and c2canvasdiv in HTML?

Get help using Construct 2

Post » Wed Mar 22, 2017 9:46 pm

I'm trying to add a div below c2canvasdiv in the index HTML file.

Like this: https://www.scirra.com/forum/how-do-i-put-a-div-below-canvas-in-html_t189151

My div height is 75px and I want to decrease c2canvasdiv and c2canvas height so my div can fit on the screen.

c2canvas and c2canvasdiv sizes are controlled by c2runtime.js. (My project's fullscreen setting is 'Scale Outer'.) For hours, I've tried to modify height in c2runtime.js but it won't work.

So is there anybody did something like this before? I really appreciate any help. Thank you.

Edit:


I replaced all 'window.innerHeight' with 'window.innerHeight-75' in c2runtime.js and it worked. If you find a better solution please let me know.
Image
B
58
S
25
G
39
Posts: 449
Reputation: 23,723

Post » Thu Mar 23, 2017 8:10 pm

You could use an iFrame page that has your 75px bar at the top (or bottom) and just load theC2 client inside the iFrame?
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,414
Reputation: 4,822

Post » Thu Mar 23, 2017 10:20 pm

@gumshoe2029 Thank you, It would work but I didn't want to use iframe.
Image
B
58
S
25
G
39
Posts: 449
Reputation: 23,723

Post » Fri Mar 24, 2017 5:11 pm

Well, at least you found an alternative solution.
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,414
Reputation: 4,822


Return to How do I....?

Who is online

Users browsing this forum: adamebastin, ketramtu18 and 8 guests