Button not showing texture

All about our 2D gui.

Moderator: cuicui

Button not showing texture

Postby dcboy on Sun Feb 18, 2007 2:14 am

Hi,
I'm having some button problems. I followed the wiki to make a button but it shows up with no texture at all, just white. Any suggestions?

Here's my code:

Code: Select all
BrumeTexture bTex = this.GetTexture("button.png");
            bTex.Name = "buttonTex";
            Button myButton = new Button(this, "buttonName", "Click me!!!", null);
            myButton.setTextureName("buttonTex");
            myButton.setSize(125, 42);
            myButton.center(0, 0);
            myButton.centerLabel();
Dan Castellon - owner of thegtaspot.com
dcboy
Brume Rookie
 
Posts: 7
Joined: Wed Feb 14, 2007 2:13 pm

Postby Silmaryls on Tue Feb 20, 2007 10:44 pm

Hi,

If the button is white, it means that texture was not found.

I updated the wiki with a better description of the textures needed for the button.

First you should remove your first two lines (texture loading) as it is done by the component.
Then you must add the following files to your data directories :
- buttonTex_on.tga
- buttonTex_off.tga
- buttonTex_disabled.tga
- buttonTex_pressed.tga

Just check the wiki for further information.
And come back here if you have problems to make it work.

PS: you should also download the IceCube sample as it uses the framework a lot.
User avatar
Silmaryls
Brume Team Member
 
Posts: 340
Joined: Tue Feb 21, 2006 10:09 pm
Location: Paris - France

Postby dcboy on Wed Feb 21, 2007 12:02 am

Cool, there we go. I looked at the engine source and there's a debug dialog. Could I use the dxmutgui to create a gui like the dialog does?
Dan Castellon - owner of thegtaspot.com
dcboy
Brume Rookie
 
Posts: 7
Joined: Wed Feb 14, 2007 2:13 pm

Postby Silmaryls on Wed Feb 21, 2007 9:46 pm

Yes it's possible as we already use it for our debug console.

But we are currently migrating under Pipo Framework. The idea behind this is to integrate the framework into Brume.
User avatar
Silmaryls
Brume Team Member
 
Posts: 340
Joined: Tue Feb 21, 2006 10:09 pm
Location: Paris - France

Postby Bartman on Thu Mar 01, 2007 12:37 pm

Hi Silmaryls

Do you have any planning concerning Pipo and the integration in Brume?
What should I do in meantime, can I use the old Pipo, how compatible will it be. The source zip for IceCube 1.1 does no longer contain the pipo sources??

Thanks
Bart
User avatar
Bartman
Brume user
 
Posts: 23
Joined: Wed Oct 11, 2006 7:01 am
Location: The Netherlands

Postby rubbish on Thu Mar 01, 2007 1:33 pm

I think the pipo 1.1 sources can be downloaded on SF.
Last edited by rubbish on Fri Mar 02, 2007 2:05 am, edited 1 time in total.
rubbish
Brume user
 
Posts: 183
Joined: Fri Nov 03, 2006 5:05 am

Postby Silmaryls on Thu Mar 01, 2007 8:59 pm

Hi Bartman !

Rubbish is right, you can download the sources on SF (zip file) here.

For the integration, there is no planning yet.
I don't think it will be in the next release (1.6).
Maybe in 1.7.

So for the moment you should better use the existing framework. I don't think there will be lot of changes later. We will just integrate classes, finish missing components and maybe some little refactoring in order to make all coherent.

Silmaryls
User avatar
Silmaryls
Brume Team Member
 
Posts: 340
Joined: Tue Feb 21, 2006 10:09 pm
Location: Paris - France

Postby Bartman on Fri Mar 02, 2007 9:06 am

Ahh, sorry, missed it on SF
Thanks for the response!
Will give it a try

Bart
User avatar
Bartman
Brume user
 
Posts: 23
Joined: Wed Oct 11, 2006 7:01 am
Location: The Netherlands


Return to Pipo 2D framework

Who is online

Users browsing this forum: No registered users and 1 guest

cron