SDL: account for rounded screen corners for text input
This commit is contained in:
@@ -871,6 +871,8 @@ public class MainActivity extends Activity
|
||||
screenKeyboard.setTextColor(this.getResources().getColor(android.R.color.background_light));
|
||||
if( isRunningOnOUYA() && Globals.TvBorders )
|
||||
screenKeyboard.setPadding(100, 100, 100, 100); // Bad bad HDMI TVs all have cropped borders
|
||||
else
|
||||
screenKeyboard.setPadding(20, 20, 20, 20); // Account for rounded screen corners
|
||||
_screenKeyboard = screenKeyboard;
|
||||
_videoLayout.addView(_screenKeyboard);
|
||||
//_screenKeyboard.setKeyListener(new TextKeyListener(TextKeyListener.Capitalize.NONE, false));
|
||||
|
||||
@@ -715,7 +715,7 @@ int main(int argc, char* argv[])
|
||||
if(evt.key.keysym.sym == SDLK_2)
|
||||
{
|
||||
__android_log_print(ANDROID_LOG_INFO, "Ballfield", "Async text input started");
|
||||
asyncTextInputBuf[0] = 0;
|
||||
strcpy(asyncTextInputBuf, "async");
|
||||
SDL_ANDROID_GetScreenKeyboardTextInputAsync(asyncTextInputBuf, sizeof(asyncTextInputBuf));
|
||||
}
|
||||
if(evt.key.keysym.sym == SDLK_3)
|
||||
@@ -768,7 +768,7 @@ int main(int argc, char* argv[])
|
||||
}
|
||||
}
|
||||
}
|
||||
if( screenKeyboardShown != SDL_IsScreenKeyboardShown(NULL))
|
||||
if( screenKeyboardShown != SDL_IsScreenKeyboardShown(NULL) )
|
||||
{
|
||||
__android_log_print(ANDROID_LOG_INFO, "Ballfield", "Screen keyboard shown: %d -> %d", screenKeyboardShown, SDL_IsScreenKeyboardShown(NULL));
|
||||
screenKeyboardShown = SDL_IsScreenKeyboardShown(NULL);
|
||||
|
||||
2
todo.txt
2
todo.txt
@@ -27,8 +27,6 @@ TODO, which will get actually done
|
||||
|
||||
- SDL: SdlVideoResizeKeepAspect=y mouse location shifted near right border.
|
||||
|
||||
- SDL: Text input window is slightly out of screen on phone with virtual navigation keys.
|
||||
|
||||
- SDL: Text input window still blocks touches sometimes after text input is finished.
|
||||
|
||||
- Debian: proot crashes on Shield TV arm64 box.
|
||||
|
||||
Reference in New Issue
Block a user