quakeforge/ruamoko/qwaq/device/nameview.r
Bill Currie 4057500acc [qwaq] Implement device management for input-app
Currently shows only the axes (along with dev "path" and name), but it
has done a good job of pushing dev of other bits of code :)
2021-09-25 14:22:19 +09:00

33 lines
449 B
R

#include <string.h>
#include "ruamoko/qwaq/device/nameview.h"
@implementation NameView
-initWithName:(string)name
{
if (!(self = [super init])) {
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