panel bitmap change

Posted By: ChildeHarold

panel bitmap change - 09/08/07 08:35

stupid question: I just want to change the panel bitmap on the fly.
What function do I need for that?
Posted By: Shadow969

Re: panel bitmap change - 09/08/07 08:40

not sure about it
your_panel.bmap = your_bmap;
Posted By: ChildeHarold

Re: panel bitmap change - 09/08/07 09:00

yes, that works in a way - but not really convincing.
Here's what I am doing. I am creating a thumbnail on the fly which is part of a panel,here
panel ThumnailForeground

which has per definition the thumbnail.bmp as source.
Although the porgram changes this bmap, it does not affect the panel. So I conclude: There's a necessity of some update. The program read the bitmap buffer and stores - and it does not bother about the changed file.
I tried to work around, but even the following function did not work.
It changes the bitmap - but just one time, that's all.


var tswtich = 0;

function TestThumb()
{


if (tswitch == 0)
{
ThumnailForeground.bmap = thumb2;
tswitch = 1;
}
else
{
tswitch = 0;
ThumnailForeground.bmap = thumb1;
} Code:
  


Posted By: Darkyyes

Re: panel bitmap change - 09/10/07 04:15

if you want to change panels in-game you should probably code 2 seperate panel codes and as when you use them it's defined and changed in a diffrent code file



to change between you should have a check for if tswitch = 1; is on then turn off tswitch = 1; then turn on tswitch = 0;
so get it back it should check whats currently on and turn it off then turn on the other one

im not especially good witch scripts but perhaps this could help you =/
© 2023 lite-C Forums