A canva's snapshot with text boxes in another layer

Get help using Construct 2

Post » Fri Dec 23, 2016 2:32 pm

Hello

I'm just trying Construct2 to create a game for my fisrt educationnal project .

I try to make a canvas snapshot with all the layers but my png file contains only one layer

I explain a little bit more :

My first layer is just a image
On the second layer I put some text boxes
I have a "Validate" button with "take snapshot on canvas" action

So when i click on this button , the png canva snapshot is well created but without my text boxes

I try to chage the order of the layers, trying some blending mode without success

So i don't understand how can i take a picture off all layers

Can you explain where I'm wrong

Thx for your help
B
3
Posts: 2
Reputation: 179

Post » Fri Dec 23, 2016 2:46 pm

Create a new project and search for the "Screenshoot" term, there will have a sample with lots of information. Creating a new layer on the sample and placing the text on it still showing the text on the output.

The simplest way to hide the text, e.g. is making it invisible right before the canvas snapshot is taken, by setting its setup in the same event, also, if you want any button appearing on the screenshoot, you should use a sprite over it.

Image
Image
B
108
S
24
G
18
Posts: 1,375
Reputation: 22,828

Post » Fri Dec 23, 2016 3:02 pm

Sorry

I wrote "Text box" but it's "input boxes" with the textbox native plugin

Those input boxes , are well shown in the layout preview, but not in the png file

I try with your example with the same result
B
3
Posts: 2
Reputation: 179

Post » Fri Dec 23, 2016 3:20 pm

Input box and buttons are exceptions and they will never be captured. Instead, use a text behind this input box with the same content of the inputted text, placed exactly where the box is placed, so, it will capture the behind text instead. If you want the layout of this box being captures, you can clone it with an sprite and do the same.
Image
B
108
S
24
G
18
Posts: 1,375
Reputation: 22,828

Post » Fri Dec 23, 2016 3:24 pm

pm33 wrote:Sorry

I wrote "Text box" but it's "input boxes" with the textbox native plugin

Those input boxes , are well shown in the layout preview, but not in the png file

I try with your example with the same result


This is explained in the Manual:

Form controls are actual HTML elements floating above the game canvas in the HTML page. Therefore, nothing can be displayed on top of a form control, apart from other form controls.


Since they are not a part of the Canvas, then trying to take a snapshot will not work.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
137
S
31
G
87
Posts: 5,541
Reputation: 60,426


Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider], dop2000 and 7 guests