Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notebook gump - needs text input #27

Closed
DominusExult opened this issue Oct 18, 2015 · 6 comments
Closed

Notebook gump - needs text input #27

DominusExult opened this issue Oct 18, 2015 · 6 comments

Comments

@DominusExult
Copy link
Collaborator

The Notebook gump (gump/Notebook_gump.cc) needs text input if possible.

@litchie
Copy link
Owner

litchie commented Oct 20, 2015

One problem is that keyboard will occupy a large portion of the screen, and it could cover up the UI. Need to do some adjustments like cheat screen, but this may be more difficult.

@DominusExult
Copy link
Collaborator Author

hmm, we should be able to shift the notebook gump higher up to give more room. That might need to suffice even though not the whole page will be available :(

@DominusExult
Copy link
Collaborator Author

I think it is useable now.
It only needs UITextView for both pages. But that is beyond me :)

I did have to cheat with the checkmark that closes the notebook. Even though I made the shortcut bar ignore events when the notebook is open, closing the gump via the checkmark "bled" through to the shortcut bar and registered as click on the Disk button. Seems as if the notebook gump gets closed with mouse_down but the mouse_up event is not canceled and thus hits the shortcut bar. I can't figure out what to do with that. So for now I replaced the notebook gump (which has the checkmark) with the generic book gump which can only be closed by ESC.

@DominusExult
Copy link
Collaborator Author

You can enable Textinput by the following patch but it doesn't work correctly:

  • using return to get to next line will close the keyboard and
  • tapping on the notebook gump doesn't reopen it
diff --git a/gumps/Notebook_gump.cc b/gumps/Notebook_gump.cc
index 55a4123..a30f53e 100644
--- a/gumps/Notebook_gump.cc
+++ b/gumps/Notebook_gump.cc
@@ -336,6 +336,7 @@ Notebook_gump *Notebook_gump::create(
        instance = new Notebook_gump;
 #ifdef __IPHONEOS__
        touchui->hideGameControls();
+       SDL_StartTextInput();
 #endif
    }
    return instance;
@@ -691,6 +692,11 @@ bool Notebook_gump::handle_kbd_event(
    int unicode = ev.key.keysym.unicode;
 #endif

+#ifdef __IPHONEOS__
+   if (ev.type == SDL_MOUSEBUTTONDOWN) {
+       SDL_StartTextInput();
+   }
+#endif
    if (ev.type == SDL_KEYUP)
        return true;        // Ignoring key-up at present.
    if (ev.type != SDL_KEYDOWN)

@paultzirides
Copy link

Had an issue with a bluetooth keyboard connected, will try to reproduce again.

@DominusExult
Copy link
Collaborator Author

@paultzirides I think Exult for iOs might not work with Bluetooth keyboards yet. Judging from litchie/dospad@369b82d (which is a commit to Dospad (DOSBOx port for iOS) we might need to implement this as well.
I opened a new issue (#40) and if you can confirm problems with a bluetooth keyboard please answer in that issue.

DominusExult added a commit that referenced this issue Jul 2, 2017
… we have known for years now that this is flag #31 - Thanks KnightCaptain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants