Game Development Community

Problems using GuichunkedBitmapCtrl

by Adam Johnston · in Torque Game Builder · 11/18/2005 (2:59 pm) · 2 replies

Hi there!

I was using a GuichunkedBitmapCtrl in order to show the lifes of my player
just a random pic in the left - top corner of the screen like that:

new GuiChunkedBitmapCtrl(imgPlayerLife3) {
      profile = "GuiContentProfile";
      horizSizing = "width";
      vertSizing = "height";
      position = "750 14";
      extent = "50 60";
      minExtent = "8 10";
      visible = "0";
      bitmap = "./images/player";
      useVariable = "0";
      tile = "0";
   };

but something weird happens if I change the
resolution of the screen (the image get bigger)
and this can be reverted even returning to the
original screen resolution...
Maybe I'm doing something wrong
could you give some advice?

#1
11/19/2005 (1:55 am)
Are you saying that the GUI control sizes to your resolution and you don't want it to? You are using horiz/vert sizing using "width" and "height" which tell the GUI to size to the extent of its parent which is possibly the size of the screen?

- Melv.
#2
11/21/2005 (8:23 am)
OK Melv. That was my fault, I found in guiControl.h what I was looking for:
enum horizSizingOptions
    {
        horizResizeRight = 0,   ///< fixed on the left and width
I must left those fields empty (by default)