Hi! When I create my layout in CELayoutEditor, evrything looks correct. But when I load it into my project, it gets all messed up. My buttons has kind of an offset inward.
It looks as if the "circle" (see the pic) is scaled up on the Y-axis, alternatively the buttons are scaled down.
Could this be because we use a different resolution in game, than the one I use in CELayoutEditor? In any case, how do I solve this?
Peace
Weird offsets on buttons?
Moderators: CEGUI MVP, CEGUI Team
-
- Not too shy to talk
- Posts: 45
- Joined: Wed Sep 09, 2009 11:20
-
- Not too shy to talk
- Posts: 45
- Joined: Wed Sep 09, 2009 11:20
Re: Weird offsets on buttons?
I forgot to tell you. All the buttons have scale-positions, not offset.
Re: Weird offsets on buttons?
Nomonkeybusiness wrote:I forgot to tell you. All the buttons have scale-positions, not offset.
I'm fairly certain that is your problem. If you use the scaled parameters, then that data is going to scale based on the resolution. If you use the fixed-offset parameters, no matter your resolution those parameters will always use the same offsets.
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!
- scriptkid
- Home away from home
- Posts: 1178
- Joined: Wed Jan 12, 2005 12:06
- Location: The Hague, The Netherlands
- Contact:
Re: Weird offsets on buttons?
Hi,
If your troubling layout is part of the same hierarchy in-game as in the editor (meaning that your game code does not put your window inside another one for example), you should be able to get equal results by setting the editor's size equal to your game resolution. The View menu has some common shortcuts (1024x768) and so, but you can also resize it and look at the statusbar when you move the cursor until you have the equal dimensions.
HTH!
If your troubling layout is part of the same hierarchy in-game as in the editor (meaning that your game code does not put your window inside another one for example), you should be able to get equal results by setting the editor's size equal to your game resolution. The View menu has some common shortcuts (1024x768) and so, but you can also resize it and look at the statusbar when you move the cursor until you have the equal dimensions.
HTH!
Check out my released snake game using Cegui!
Who is online
Users browsing this forum: Bing [Bot] and 28 guests