quakeforge/ruamoko/cl_menu/MouseToggle.r
2010-11-24 17:01:19 +09:00

19 lines
277 B
R

#include "cvar.h"
#include "MouseToggle.h"
@implementation MouseToggle
-(void)toggle
{
if (Cvar_GetFloat ("m_pitch") < 0) {
Cvar_SetFloat ("m_pitch", 0.022);
} else {
Cvar_SetFloat ("m_pitch", -0.022);
}
}
-(BOOL)value
{
return Cvar_GetFloat ("m_pitch") < 0;
}
@end