mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-11 15:51:36 +00:00
f50d27ec11
The code currently assumes a single value is referenced rather than the beginning of an array.
33 lines
477 B
R
33 lines
477 B
R
#include <string.h>
|
|
#include "ruamoko/qwaq/debugger/views/nameview.h"
|
|
|
|
@implementation NameView
|
|
|
|
-initWithName:(string)name
|
|
{
|
|
if (!(self = [super initWithDef:def type:nil])) {
|
|
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
|