mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-23 09:20:40 +00:00
29 lines
587 B
R
29 lines
587 B
R
|
#include <string.h>
|
||
|
#include "ruamoko/qwaq/debugger/views/handleview.h"
|
||
|
|
||
|
@implementation HandleView
|
||
|
|
||
|
-initWithDef:(qdb_def_t)def in:(void *)data type:(qfot_type_t *)type
|
||
|
{
|
||
|
if (!(self = [super initWithDef:def type:type])) {
|
||
|
return nil;
|
||
|
}
|
||
|
self.data = (int *)(data + def.offset);
|
||
|
return self;
|
||
|
}
|
||
|
|
||
|
+(DefView *)withDef:(qdb_def_t)def in:(void *)data type:(qfot_type_t *)type
|
||
|
{
|
||
|
return [[[self alloc] initWithDef:def in:data type:type] autorelease];
|
||
|
}
|
||
|
|
||
|
-draw
|
||
|
{
|
||
|
[super draw];
|
||
|
string val = sprintf ("%d", data[0]);
|
||
|
[self mvprintf:{0, 0}, "%*.*s", xlen, xlen, val];
|
||
|
return self;
|
||
|
}
|
||
|
|
||
|
@end
|