summaryrefslogtreecommitdiff
path: root/src/client/layer.c
diff options
context:
space:
mode:
authororoborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-08-22 16:37:04 +0000
committeroroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-08-22 16:37:04 +0000
commitb56004caaa4e1c2b682e5f3391239321acc41b8a (patch)
treef41e23c631b06ca160ff10717ce6ab702ccf06d7 /src/client/layer.c
parent1e656ce31aca56aa802245b220850ebba6672d93 (diff)
- moznost nastavit ako sa ma screen splitnut tuxanci-svn --split-vertical alebo tuxanci-svn --split-horizontal
git-svn-id: http://opensvn.csie.org/tuxanci_ng@239 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e
Diffstat (limited to 'src/client/layer.c')
-rwxr-xr-xsrc/client/layer.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/client/layer.c b/src/client/layer.c
index 5aa8124..770a916 100755
--- a/src/client/layer.c
+++ b/src/client/layer.c
@@ -158,9 +158,8 @@ void drawLayerSplit(int local_x, int local_y, int x, int y, int w, int h)
if( local_x + (this->x - x) < local_x )
{
- //this->x = local_x;
int z;
- z = ( local_x + (this->x - x) + this->w ) - local_x;
+
z = local_x - ( local_x + (this->x - x) );
this->x += z;
@@ -173,6 +172,22 @@ void drawLayerSplit(int local_x, int local_y, int x, int y, int w, int h)
this->w -= ( local_x + (this->x - x) + this->w ) - (local_x + w);
}
+ if( local_y + (this->y - y) < local_y )
+ {
+ int z;
+
+ z = local_y - ( local_y + (this->y - y) );
+
+ this->y += z;
+ this->py += z;
+ this->h -= z;
+ }
+
+ if( local_y + (this->y - y) + this->h > local_y+h )
+ {
+ this->h -= ( local_y + (this->y - y) + this->h ) - (local_y + h);
+ }
+
drawImage(this->image,
local_x + (this->x - x), local_y + (this->y - y),
this->px, this->py,