Oolite 1.91.0.7745-260117-205bce7
Loading...
Searching...
No Matches
MyOpenGLView(OOPrivate) Category Reference

Instance Methods

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

Detailed Description

Definition at line 79 of file MyOpenGLView.m.

Method Documentation

◆ handleStringInput:keyID:

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

Extends class MyOpenGLView.

Definition at line 2730 of file MyOpenGLView.m.

2730 : (SDL_KeyboardEvent *) kbd_event keyID:(Uint16)key_id;
2731{
2732 SDLKey key=kbd_event->keysym.sym;
2733
2734 // Del, Backspace
2735 if((key == SDLK_BACKSPACE || key == SDLK_DELETE) && [typedString length] > 0)
2736 {
2737 // delete
2738 [typedString deleteCharactersInRange:NSMakeRange([typedString length]-1, 1)];
2739 }
2740
2741 isAlphabetKeyDown=NO;
2742
2743 // TODO: a more flexible mechanism for max. string length ?
2744 if([typedString length] < 40)
2745 {
2746 lastKeyShifted = shift;
2747 if (allowingStringInput == gvStringInputAlpha)
2748 {
2749 // inputAlpha - limited input for planet find screen
2750 if(key >= SDLK_a && key <= SDLK_z)
2751 {
2752 isAlphabetKeyDown=YES;
2753 [typedString appendFormat:@"%c", key];
2754 // if in inputAlpha, keep in lower case.
2755 }
2756 }
2757 else
2758 {
2759 //Uint16 unicode = kbd_event->keysym.unicode;
2760 // printable range
2761 if (key_id >= 32 && key_id <= 255) // 126
2762 {
2763 if ((char)key_id != '/' || allowingStringInput == gvStringInputAll)
2764 {
2765 isAlphabetKeyDown=YES;
2766 [typedString appendFormat:@"%c", key_id];
2767 }
2768 }
2769 }
2770 }
2771}
@ gvStringInputAlpha
@ gvStringInputAll

References gvStringInputAll, and gvStringInputAlpha.

Referenced by MyOpenGLView::pollControls.

Here is the caller graph for this function:

◆ resetSDLKeyModifiers

- (void) resetSDLKeyModifiers

Extends class MyOpenGLView.

Definition at line 1378 of file MyOpenGLView.m.

1379{
1380 // probably not needed for Linux
1381}

References resetSDLKeyModifiers.

Referenced by MyOpenGLView::pollControls, and resetSDLKeyModifiers.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setWindowBorderless:

- (void) setWindowBorderless: (BOOL) borderless

Extends class MyOpenGLView.

Definition at line 1384 of file MyOpenGLView.m.

1384 :(BOOL)borderless
1385{
1386 // do nothing on Linux
1387}

Referenced by MyOpenGLView::initialiseGLWithSize:useVideoMode:, and MyOpenGLView::pollControls.

Here is the caller graph for this function:

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