Form controls render issues, solution?

Discussion and feedback on Construct 2

Post » Tue Sep 29, 2015 1:37 pm

I was wondering now that form controls are part of C2 and they are rendered above other objects, which of course causes a lot of problems when running a project. But what are the supposed solution to fixing this, because it seems to be something that have been with C2 for a long time now.

Here is an example:
Image

Left image is the original design in the editor.

Top right image - Is full screen, and here the Red squares are being overlapped by the textbox and buttons, the Text object is misplaced compared to the textbox and there are different spaces between the buttons compared to the original one. The Big button have its X,Y value written as text, which match those in the editor, so the position should be the same but clearly aint.

Lower right image - Is scaled down meaning the window size have been decreased and I zoomed in so its easier to see. The text object have now moved even more compared to both the original layout in the editor and the full screen version, as now the "T" in text is covered by the textbox.

So the problem is, what is the solution or the idea to how to fix these issues, when it was designed? Because it seems like the form control uses a different scale or something and since the position reported in the C2 editor seems to match the position during runtime, why don't they appear correctly or how are you suppose to compensate for it, so your project looks correct when you run it?
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,848

Post » Thu Apr 28, 2016 12:58 am

I have the same problem
The form controls scale differently from the rest of my graphics, when switched from window to fullscreen, or resizing the window
How can you properly align an UI if the relative scale of elements change with display size?
B
22
S
6
G
8
Posts: 328
Reputation: 6,651

Post » Thu Apr 28, 2016 6:59 am

You might try this method for resizing the UI elements:
span-class-posthilit-button-span-auto-font-size_p1021532?#p1021532

Also note, that forms elements are rendered over the canvas, so they will be always on top.
B
135
S
33
G
17
Posts: 1,557
Reputation: 20,721

Post » Sat Apr 30, 2016 10:54 am

Thanks that's a handy fix for the font size
Main concern was also about the actual element size, which doesn't scale as in editor like in image above
Anyway, now I decided to do my own ui with sprites etc, as those form elements are just out of control
B
22
S
6
G
8
Posts: 328
Reputation: 6,651

Post » Sat Apr 30, 2016 3:08 pm

Did you try applying the logic in my capx to the form elements, setting their size?
B
135
S
33
G
17
Posts: 1,557
Reputation: 20,721


Return to Construct 2 General

Who is online

Users browsing this forum: BlueAlfie and 10 guests