mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-22 02:11:19 +00:00
Fix setBasePos to get the pos from a view.
This fixes Group for the Point/Size/Rect change.
This commit is contained in:
parent
67beaf4487
commit
c460e3c979
3 changed files with 12 additions and 4 deletions
|
@ -41,7 +41,8 @@
|
|||
{
|
||||
[super setBasePos:pos];
|
||||
local Point point = {xabs, yabs};
|
||||
[views makeObjectsPerformSelector:@selector (setBasePos:) withObject:point];
|
||||
local SEL sel = @selector (setBasePosFromView:);
|
||||
[views makeObjectsPerformSelector:sel withObject:self];
|
||||
}
|
||||
|
||||
- (void) draw
|
||||
|
|
|
@ -38,14 +38,21 @@
|
|||
return flags & 1;
|
||||
}
|
||||
|
||||
- (Point) basePos
|
||||
{
|
||||
return makePoint (xabs, yabs);
|
||||
}
|
||||
|
||||
- (void) setBasePos: (integer) x y: (integer) y
|
||||
{
|
||||
local Point point = {x, y};
|
||||
[self setBasePos:point];
|
||||
xabs = xpos + x;
|
||||
yabs = ypos + y;
|
||||
}
|
||||
|
||||
- (void) setBasePos: (Point)pos
|
||||
- (void) setBasePosFromView: (View) view
|
||||
{
|
||||
Point pos = [view basePos];
|
||||
xabs = xpos + pos.x;
|
||||
yabs = ypos + pos.y;
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
- (id) canFocus: (integer)cf;
|
||||
- (integer) canFocus;
|
||||
- (void) setBasePos: (integer)x y: (integer)y;
|
||||
- (void) setBasePos: (Point)pos;
|
||||
- (void) setBasePosFromView: (View)view;
|
||||
- (void) draw;
|
||||
|
||||
- (integer) keyEvent:(integer)key unicode:(integer)unicode down:(integer)down;
|
||||
|
|
Loading…
Reference in a new issue