Weird offsets on buttons?

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

Nomonkeybusiness
Not too shy to talk
Not too shy to talk
Posts: 45
Joined: Wed Sep 09, 2009 11:20

Weird offsets on buttons?

Postby Nomonkeybusiness » Thu Nov 12, 2009 12:42

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
Image

Nomonkeybusiness
Not too shy to talk
Not too shy to talk
Posts: 45
Joined: Wed Sep 09, 2009 11:20

Re: Weird offsets on buttons?

Postby Nomonkeybusiness » Thu Nov 12, 2009 12:44

I forgot to tell you. All the buttons have scale-positions, not offset.

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

Re: Weird offsets on buttons?

Postby Jamarr » Thu Nov 12, 2009 16:22

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!

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Re: Weird offsets on buttons?

Postby scriptkid » Mon Nov 16, 2009 11:57

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!
Check out my released snake game using Cegui!


Return to “Help”

Who is online

Users browsing this forum: Bing [Bot] and 28 guests