Toolbar buttons offset

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
rakkar
Posts: 19
Joined: Sun Aug 07, 2005 11:24 pm

Toolbar buttons offset

Post by rakkar »

I added a toolbar and some buttons.

Code for the first button (also happens with tga format):

Code: Select all

video::ITexture * newButton = app.VideoDriver()->getTexture("media/editor/new.bmp");

toolBar->addButton(GenerateGUIIDByState(GUI_TOOLBAR_BUTTON_NEW), 0, newButton, newButton, false);
Here is what shows up:

Image

Here is the source image for one of the buttons:
Image

As you can see in the first image, the button images are offset in the toolbar. What can I do to fix this?
Masdus
Posts: 186
Joined: Tue Aug 26, 2003 1:13 pm
Location: Australia

Post by Masdus »

Is the toolbar large enough to display the image? From your pictures it looks like you need to make each button larger.
Didine
Posts: 19
Joined: Wed Aug 24, 2005 1:22 pm
Location: France
Contact:

Post by Didine »

Maybe, i have a solution but without programming : try to use a translate filter in a graphic software like Photoshop. Apply 50 % verticaly et 50 % horizontaly translation (menu filter>Misc.) for all you pictures.
Fred

Post by Fred »

Are the texture coordinates wrong in the source?
Post Reply