Game Development Community

Size and position of GuiFadeinBitmapCtrl

by Koen Van Baelen · in Torque Game Builder · 08/15/2007 (11:56 am) · 1 replies

I want to display a 1024x256 bitmap in a GuiFadeinBitmapCtrl object. My screen size is 1024x768, so the bitmap should be positioned at 0,256. When I set "position" to 0,256 and "extent" to 1024,256 the bitmap is first displayed with the correct size and position, but when I save it and run the game it always gets stretched to fullscreen, no matter what I try. My settings simply don't get saved! I am really getting tired of all the bugs in Torque.

#1
08/15/2007 (1:18 pm)
Content controls will always get resized to the full extent of the canvas.

You can get around this, in your case, by "wrapping" the GuiFadeInBitmapCtrl in a blank control.
Here is an example:

//--- OBJECT WRITE BEGIN ---
new GuiControl(StartupGuiTransition) {
    // stuff here

    new GuiFadeinBitmapCtrl(SplashScreen) {
         // stuff here
    };
};
//--- OBJECT WRITE END ---