Oolite 1.91.0.7699-250829-cea269d
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 2728 of file MyOpenGLView.m.

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