mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-12 00:01:43 +00:00
877ad35a82
It doesn't work right now because View unconditionally sends refresh to its textContext, but textContext can be a draw buffer which does not respond to refresh. Still, these changes (notably the assignment chain in qwaq-group.r really pushed qfcc).
43 lines
691 B
R
43 lines
691 B
R
#include <Array.h>
|
|
#include "qwaq-curses.h"
|
|
#include "qwaq-screen.h"
|
|
|
|
@implementation Screen
|
|
+(Screen *) screen
|
|
{
|
|
return [[[self alloc] init] autorelease];
|
|
}
|
|
|
|
-init
|
|
{
|
|
if (!(self = [super initWithRect:getwrect (stdscr)])) {
|
|
return nil;
|
|
}
|
|
textContext = [TextContext screen];
|
|
[textContext scrollok: 1];
|
|
return self;
|
|
}
|
|
|
|
-handleEvent: (qwaq_event_t *) event
|
|
{
|
|
if (event.what & qe_mouse) {
|
|
[self printf:"%04x %2d %2d %d %08x \r", event.what, event.mouse.x, event.mouse.y, event.mouse.click, event.mouse.buttons];
|
|
[self redraw];
|
|
}
|
|
return self;
|
|
}
|
|
|
|
-draw
|
|
{
|
|
return self;
|
|
}
|
|
|
|
-redraw
|
|
{
|
|
//update_panels ();
|
|
[TextContext refresh];
|
|
//[TextContext doupdate];
|
|
return self;
|
|
}
|
|
|
|
@end
|