Oolite 1.91.0.7644-241112-7f5034b
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.

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

◆ resetSDLKeyModifiers

- (void) resetSDLKeyModifiers

Extends class MyOpenGLView.

Definition at line 50 of file MyOpenGLView.m.

1331{
1332 // probably not needed for Linux
1333}

◆ setWindowBorderless:

- (void) setWindowBorderless: (BOOL) borderless

Extends class MyOpenGLView.

Definition at line 50 of file MyOpenGLView.m.

1336 :(BOOL)borderless
1337{
1338 // do nothing on Linux
1339}

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