mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-20 22:05:12 +00:00
overlays: implement osk delete action
This commit is contained in:
parent
ad340c3007
commit
eccceea7fb
4 changed files with 32 additions and 0 deletions
|
|
@ -173,6 +173,27 @@ namespace rsx
|
|||
refresh();
|
||||
}
|
||||
|
||||
void edit_text::del()
|
||||
{
|
||||
if (caret_position >= text.length())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (caret_position == 0)
|
||||
{
|
||||
value = value.length() > 1 ? value.substr(1) : U"";
|
||||
}
|
||||
else
|
||||
{
|
||||
value = value.substr(0, caret_position) + value.substr(caret_position + 1);
|
||||
}
|
||||
|
||||
m_reset_caret_pulse = true;
|
||||
set_unicode_text(value);
|
||||
refresh();
|
||||
}
|
||||
|
||||
compiled_resource& edit_text::get_compiled()
|
||||
{
|
||||
if (!is_compiled)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue