How do I Center graphics

Get help using Construct 2

Post » Tue Mar 25, 2014 7:45 am

bremen wrote:@Aphrodite lol I forgot about the anchor.


If you are using Intel XDK Crosswalk compiling your APK try and use the beta build it should solve the orientation problem.
Image Stoorn Memory Puzzle
B
9
S
3
G
1
Posts: 66
Reputation: 1,488

Post » Tue Mar 25, 2014 8:17 am

@Phuzz I'm stuck using CocoonJS on this project since I can't upload a XDK APK when I have already used CocoonJS APK cause they have separate signings.
Please Support Ocean Explorer.
http://igg.me/p/735007/x/6915815
B
14
S
4
G
3
Posts: 125
Reputation: 2,645

Post » Tue Mar 25, 2014 8:55 am

@bremen your game supports both orientations?
Image Stoorn Memory Puzzle
B
9
S
3
G
1
Posts: 66
Reputation: 1,488

Post » Tue Mar 25, 2014 9:53 am

@Phuzz Well it was just portrait view originally, but I been getting request for landscape also so I set both orientations on but when you view the game in landscape the buttons and score are all the the left side like there still in portrait view. But I think I may have corrected the buttons, but I can't get the score and text to line up correctly in the corners even with anchor. Sigh if it not one thing its another... lol
Please Support Ocean Explorer.
http://igg.me/p/735007/x/6915815
B
14
S
4
G
3
Posts: 125
Reputation: 2,645

Post » Tue Mar 25, 2014 10:22 am

bremen wrote:@Phuzz Well it was just portrait view originally, but I been getting request for landscape also so I set both orientations on but when you view the game in landscape the buttons and score are all the the left side like there still in portrait view. But I think I may have corrected the buttons, but I can't get the score and text to line up correctly in the corners even with anchor. Sigh if it not one thing its another... lol


The anchor behavior needs you to place them in the corners in the layout view accordingly to the window size set in C2, the LeftEdge and TopEdge will help you, since it means that the left and top edges of your object will still be at the ame position relative to the chosen corner for every aspect ratio.

Hope that helps

Also : https://www.scirra.com/manual/88/anchor
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Tue Mar 25, 2014 9:07 pm

@Aphrodite Yes thanks I got it to work correctly.
Please Support Ocean Explorer.
http://igg.me/p/735007/x/6915815
B
14
S
4
G
3
Posts: 125
Reputation: 2,645

Post » Fri Apr 04, 2014 11:26 pm

RamPackWobble wrote:this appears to work..

set x to (ViewportLeft("Layer 0") + ViewportRight("Layer 0")) / 2


This code above works great for graphics but not for text objects. Very weird. Any idea why?
B
8
S
1
Posts: 62
Reputation: 660

Post » Sat Apr 05, 2014 6:49 am

@Jjanikowski - Have you tried putting the text "hotspot" to its centre ?
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,832

Post » Sat Apr 05, 2014 7:22 pm

Ill give that a shot Ram.
Thanks
B
8
S
1
Posts: 62
Reputation: 660

Previous

Return to How do I....?

Who is online

Users browsing this forum: David181, OBLIVION, tarek2 and 25 guests