mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-13 02:08:49 +12:00
overlays: implement osk keyboard cursor actions
This commit is contained in:
parent
eccceea7fb
commit
059c45f202
2 changed files with 19 additions and 0 deletions
|
@ -706,6 +706,18 @@ namespace rsx
|
|||
case CELL_KEYC_ESCAPE:
|
||||
Close(CELL_OSKDIALOG_CLOSE_CANCEL);
|
||||
break;
|
||||
case CELL_KEYC_RIGHT_ARROW:
|
||||
on_move_cursor(key, edit_text::direction::right);
|
||||
break;
|
||||
case CELL_KEYC_LEFT_ARROW:
|
||||
on_move_cursor(key, edit_text::direction::left);
|
||||
break;
|
||||
case CELL_KEYC_DOWN_ARROW:
|
||||
on_move_cursor(key, edit_text::direction::down);
|
||||
break;
|
||||
case CELL_KEYC_UP_ARROW:
|
||||
on_move_cursor(key, edit_text::direction::up);
|
||||
break;
|
||||
case CELL_KEYC_ENTER:
|
||||
if ((flags & CELL_OSKDIALOG_NO_RETURN))
|
||||
{
|
||||
|
@ -833,6 +845,12 @@ namespace rsx
|
|||
}
|
||||
}
|
||||
|
||||
void osk_dialog::on_move_cursor(const std::u32string&, edit_text::direction dir)
|
||||
{
|
||||
m_preview.move_caret(dir);
|
||||
m_update = true;
|
||||
}
|
||||
|
||||
std::u32string osk_dialog::get_placeholder() const
|
||||
{
|
||||
const localized_string_id id = m_password_mode
|
||||
|
|
|
@ -106,6 +106,7 @@ namespace rsx
|
|||
void on_backspace(const std::u32string&);
|
||||
void on_delete(const std::u32string&);
|
||||
void on_enter(const std::u32string&);
|
||||
void on_move_cursor(const std::u32string&, edit_text::direction dir);
|
||||
|
||||
std::u32string get_placeholder() const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue