mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-06 13:11:20 +00:00
3a1e467ae8
Sadly, there are many bogus warnings and other errors. qfcc is still very sick :(.
42 lines
688 B
R
42 lines
688 B
R
#include "draw.h"
|
|
#include "key.h"
|
|
#include "sound.h"
|
|
|
|
#include "CrosshairView.h"
|
|
|
|
@implementation CrosshairView
|
|
{
|
|
CrosshairCvar *crosshair;
|
|
}
|
|
|
|
-(id)initWithBounds:(Rect)aRect :(CrosshairCvar*)_crosshair
|
|
{
|
|
self = [self initWithBounds:aRect];
|
|
crosshair = _crosshair;
|
|
return self;
|
|
}
|
|
|
|
-(void) next
|
|
{
|
|
[crosshair next];
|
|
S_LocalSound ("misc/menu2.wav");
|
|
}
|
|
|
|
-(void) draw
|
|
{
|
|
Draw_Fill (xabs, yabs, xlen, ylen, 0);
|
|
Draw_Crosshair ([crosshair crosshair], xabs + xlen / 2, yabs + ylen / 2);
|
|
}
|
|
|
|
- (integer) keyEvent:(integer)key unicode:(integer)unicode down:(integer)down
|
|
{
|
|
switch (key) {
|
|
case QFK_RETURN:
|
|
case QFM_BUTTON1:
|
|
[self next];
|
|
return 1;
|
|
default:
|
|
return 0;
|
|
}
|
|
}
|
|
@end
|