mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-14 08:50:58 +00:00
0da92e33f6
This is much nicer (even though things aren't quite right yet)
33 lines
451 B
R
33 lines
451 B
R
#include <string.h>
|
|
#include "debugger/nameview.h"
|
|
|
|
@implementation NameView
|
|
|
|
-initWithName:(string)name
|
|
{
|
|
if (!(self = [super initWithType:type])) {
|
|
return nil;
|
|
}
|
|
self.name = name;
|
|
return self;
|
|
}
|
|
|
|
-(void)dealloc
|
|
{
|
|
str_free (name);
|
|
[super dealloc];
|
|
}
|
|
|
|
+(NameView *)withName:(string)name
|
|
{
|
|
return [[[self alloc] initWithName:name] autorelease];
|
|
}
|
|
|
|
-draw
|
|
{
|
|
[super draw];
|
|
[self mvaddstr:{0, 0}, str_mid (name, 0, xlen)];
|
|
return self;
|
|
}
|
|
|
|
@end
|