Oolite 1.93.0.7767-260207-f2a8cb5
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 2731 of file MyOpenGLView.m.

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

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

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 1385 of file MyOpenGLView.m.

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

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: