Make Group set its position (and those of its subviews) correctly.

This commit is contained in:
Bill Currie 2010-11-24 11:46:45 +09:00
parent e9fea12e47
commit 730082a393
3 changed files with 15 additions and 10 deletions

View file

@ -24,6 +24,7 @@
Boston, MA 02111-1307, USA
*/
#include "debug.h"
#include "cvar.h"
#include "draw.h"
#include "system.h"
@ -437,7 +438,7 @@
}
}
@end
void traceon () = #0;
@implementation ProxyView
-(id)initWithBounds:(Rect)aRect title:(View)aTitle view:(View)aView
@ -462,12 +463,11 @@ void traceon () = #0;
[view draw];
}
- (void) setBasePos: (Point) pos
- (void) setBasePosFromView: (View) aview
{
[super setBasePos:pos];
local Point point = {xabs, yabs};
[title setBasePos:point];
[view setBasePos:point];
[super setBasePosFromView:aview];
[title setBasePosFromView:self];
[view setBasePosFromView:self];
}
@end

View file

@ -37,10 +37,16 @@
[self setBasePos: x y:y];
}
- (void) setBasePos: (Point) pos
- (void) setBasePos: (integer) x y: (integer) y
{
[super setBasePos:pos];
local Point point = {xabs, yabs};
[super setBasePos: x y:y];
local SEL sel = @selector (setBasePosFromView:);
[views makeObjectsPerformSelector:sel withObject:self];
}
- (void) setBasePosFromView: (View) view
{
[super setBasePosFromView:view];
local SEL sel = @selector (setBasePosFromView:);
[views makeObjectsPerformSelector:sel withObject:self];
}

View file

@ -13,7 +13,6 @@
- (View) addView: (View)aView;
- (id) addViews: (Array)viewlist;
- (void) moveTo: (integer)x y:(integer)y;
- (void) setBasePos: (Point)pos;
- (void) draw;
@end