[BUG?] set...Image functions?

Discussion regarding the development of CEGUI itself - as opposed to questions about CEGUI usage that should be in the help forums.

Moderators: CEGUI MVP, CEGUI Team

User avatar
Sponge
Just popping in
Just popping in
Posts: 16
Joined: Tue Nov 08, 2005 18:17
Location: Fryslan, The Netherlands
Contact:

[BUG?] set...Image functions?

Postby Sponge » Sat Nov 19, 2005 14:26

Hi guys,

Right now I'm working on a scrollable pane in my project.. like a fruit machine. Or, more related, like the common scrolling "build" bar in RTS games.

The problem is, that I cannot dynamically set the images the way I want to.

I have an imageset, an image, and an rendarable image. These are 100% OK. I double checked during the quick watch.

Code: Select all

RenderableImage img;
img.setImage(&imgImage);
btn->setNormalImage(&img);
btn->setPushedImage(&img);
btn->setDisabledImage(&img);

imgImage is a CEGUI::Image object. The problem is, that all images will get their default picture. I already have images set (as test) in the .xml file.

Now,the strange thing is, that if I do it using the property method, it does work:

Code: Select all

sprintf(strProperty,"set: imgObjects image: store");
btn->setProperty("NormalImage",strProperty);

Above will change my image (like it shoukd). But this is kinda dirty (imo).

Am I doing something wrong with the set...Image calls?

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: [BUG?] set...Image functions?

Postby CrazyEddie » Sun Nov 20, 2005 10:50

Hi,

Is there anything in the CEGUI.log file that may indicate a problem, and which version of the system is this?

The code you posted should work ok I believe, though I'll have a think and let you know if anything comes to mind.

Btw, in the future, the property approach will be the one that you'll be using anyway; many widget features are getting pushed out into the falagard skin XML files - and the affected features will then only work via the properties interface (though we will be supplying some helpers to keep code clean-ish).

CE.

User avatar
Sponge
Just popping in
Just popping in
Posts: 16
Joined: Tue Nov 08, 2005 18:17
Location: Fryslan, The Netherlands
Contact:

Re: [BUG?] set...Image functions?

Postby Sponge » Mon Nov 21, 2005 12:02

Hi,

No there isn't anything in the log file. It's not a real problem (I got my scrollable 'image spinner' working), but I was just wondering if I did something wrong. I compared the code to internal code of buttons and stuff - which use the set...Image functions too -, and the code was the same :).

Oh, btw, I'm using 0.4, the latest "reeleased" zip version one. The CVS version is... not exactly the most convenient to compile lately :) :oops:.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: [BUG?] set...Image functions?

Postby CrazyEddie » Tue Nov 22, 2005 19:44

Yeah it should work - unless... The only thing that it might be is if you're using the Falagard based version of the skin. I think in these cases the old member functions may have no effect - which is probably what you're seeing. I should have thought of this earlier (this is part of the transition to a fully property based system I mentioned above).

And yes, CVS HEAD is rather unstable :lol:


Return to “CEGUI Library Development Discussion”

Who is online

Users browsing this forum: No registered users and 6 guests