Skip to content

Commit

Permalink
iOS: #72 Support OS keyboard in in-game chat and console
Browse files Browse the repository at this point in the history
  • Loading branch information
singalen committed Nov 28, 2017
1 parent 376ada5 commit f7f5f15
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/floating_textbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ namespace gui{
preferences::set_message_private(check_->checked());
}
}

if(SDL_HasScreenKeyboardSupport()) {
SDL_StopTextInput();
}

box_.reset(nullptr);
check_.reset(nullptr);
font::remove_floating_label(label_);
Expand Down Expand Up @@ -97,6 +102,13 @@ namespace gui{
};

box_->set_location(rect);

if(SDL_HasScreenKeyboardSupport()) {
SDL_StartTextInput();
SDL_Rect r = rect;
SDL_SetTextInputRect(&r);
}

}

if(check_ != nullptr) {
Expand Down

0 comments on commit f7f5f15

Please sign in to comment.