Page 1 of 1

Possible bug with CreateBGPic and @DISPLAY {BGPic=}

Posted: Sun May 12, 2019 2:07 pm
by Juan Carlos
I found this possible bug between CreateBGPic and @DISPLAY {BGPic=} with this example you can see better it.

/*BACKGROUNDS */
CreateBGPic(0, 360, 520, #BLACK)
@BGPIC 1, "MyBackground.png", {Loader="inbuilt"}

@DISPLAY {Title="Bug BGPic", BGPic=0, Width=360, Height=520}
Wait(100)
DisplayBGPic(0)

EscapeQuit(True)
Repeat
WaitEvent
Forever

In this code instead of show the BGPic=0 created with CreateBGPic where you create a black background, the code shows fast the @BGPIC 0 but after the main background showed is the @BGPIC 1.

The backgrounds created with CreateBGPic can'ts be use for @DISPLAY {Title="Bug BGPic", BGPic=0, Width=360, Height=520}

Re: Possible bug with CreateBGPic and @DISPLAY {BGPic=}

Posted: Mon May 13, 2019 8:26 pm
by airsoftsoftwair
That's not a bug. The preprocessor commands are evaluated before script execution starts so BGPic 0 is not there when the preprocessor evaluates the @DISPLAY preprocessor command.

Re: Possible bug with CreateBGPic and @DISPLAY {BGPic=}

Posted: Mon May 13, 2019 9:26 pm
by Juan Carlos
airsoftsoftwair wrote: Mon May 13, 2019 8:26 pm That's not a bug. The preprocessor commands are evaluated before script execution starts so BGPic 0 is not there when the preprocessor evaluates the @DISPLAY preprocessor command.
Ok, thank you Andreas, I make a black background as one normal picture.