Oolite 1.91.0.7645-241119-222d325
Loading...
Searching...
No Matches
MyOpenGLView(OOPrivate) Category Reference

Instance Methods

(void) - resetSDLKeyModifiers
 
(void) - setWindowBorderless:
 
(void) - handleStringInput:keyID:
 

Detailed Description

Definition at line 78 of file MyOpenGLView.m.

Method Documentation

◆ handleStringInput:keyID:

- (void) handleStringInput: (SDL_KeyboardEvent *) kbd_event
keyID: (Uint16) key_id 

Extends class MyOpenGLView.

Definition at line 50 of file MyOpenGLView.m.

2670 : (SDL_KeyboardEvent *) kbd_event keyID:(Uint16)key_id;
2671{
2672 SDLKey key=kbd_event->keysym.sym;
2673
2674 // Del, Backspace
2675 if((key == SDLK_BACKSPACE || key == SDLK_DELETE) && [typedString length] > 0)
2676 {
2677 // delete
2678 [typedString deleteCharactersInRange:NSMakeRange([typedString length]-1, 1)];
2679 }
2680
2681 isAlphabetKeyDown=NO;
2682
2683 // TODO: a more flexible mechanism for max. string length ?
2684 if([typedString length] < 40)
2685 {
2686 lastKeyShifted = shift;
2687 if (allowingStringInput == gvStringInputAlpha)
2688 {
2689 // inputAlpha - limited input for planet find screen
2690 if(key >= SDLK_a && key <= SDLK_z)
2691 {
2692 isAlphabetKeyDown=YES;
2693 [typedString appendFormat:@"%c", key];
2694 // if in inputAlpha, keep in lower case.
2695 }
2696 }
2697 else
2698 {
2699 //Uint16 unicode = kbd_event->keysym.unicode;
2700 // printable range
2701 if (key_id >= 32 && key_id <= 255) // 126
2702 {
2703 if ((char)key_id != '/' || allowingStringInput == gvStringInputAll)
2704 {
2705 isAlphabetKeyDown=YES;
2706 [typedString appendFormat:@"%c", key_id];
2707 }
2708 }
2709 }
2710 }
2711}
@ gvStringInputAlpha
@ gvStringInputAll

◆ resetSDLKeyModifiers

- (void) resetSDLKeyModifiers

Extends class MyOpenGLView.

Definition at line 50 of file MyOpenGLView.m.

1335{
1336 // probably not needed for Linux
1337}

◆ setWindowBorderless:

- (void) setWindowBorderless: (BOOL) borderless

Extends class MyOpenGLView.

Definition at line 50 of file MyOpenGLView.m.

1340 :(BOOL)borderless
1341{
1342 // do nothing on Linux
1343}

The documentation for this category was generated from the following file: