diff Gui/skin/skin.c @ 3080:182163807172

bug fixs
author pontscho
date Fri, 23 Nov 2001 01:41:45 +0000
parents bd851a5afcb3
children 2704448de713
line wrap: on
line diff
--- a/Gui/skin/skin.c	Fri Nov 23 00:21:51 2001 +0000
+++ b/Gui/skin/skin.c	Fri Nov 23 01:41:45 2001 +0000
@@ -112,6 +112,7 @@
  unsigned char fname[512];
  unsigned char tmp[512];
  int           x,y;
+ int	       sx=0,sy=0;
 
  CHECKDEFLIST( "base" );
  CHECKWINLIST( "base" );
@@ -119,8 +120,10 @@
  cutItem( in,fname,',',0 );
  x=cutItemToInt( in,',',1 );
  y=cutItemToInt( in,',',2 );
+ sx=cutItemToInt( in,',',3 );
+ sy=cutItemToInt( in,',',4 );
  #ifdef DEBUG
-  dbprintf( 3,"\n[skin] base: %s x: %d y: %d\n",fname,x,y );
+  dbprintf( 3,"\n[skin] base: %s x: %d y: %d ( %dx%d )\n",fname,x,y,sx,sy );
  #endif
  if ( !strcmp( winList,"main" ) )
   {
@@ -162,6 +165,11 @@
    defList->sub.y=y;
    defList->sub.width=defList->sub.Bitmap.Width;
    defList->sub.height=defList->sub.Bitmap.Height;
+   if ( sx && sy )
+    {
+     defList->sub.width=sx;
+     defList->sub.height=sy;
+    }
    #ifdef DEBUG
     dbprintf( 3,"[skin]  %d,%d %dx%d\n",defList->sub.x,defList->sub.y,defList->sub.width,defList->sub.height );
    #endif