mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-20 22:05:12 +00:00
Overlays: Implement individual pulse
This commit is contained in:
parent
cfa2d4aaa8
commit
40f3adc45f
8 changed files with 77 additions and 13 deletions
|
|
@ -31,6 +31,8 @@ namespace rsx
|
|||
|
||||
void edit_text::move_caret(direction dir)
|
||||
{
|
||||
m_reset_caret_pulse = true;
|
||||
|
||||
switch (dir)
|
||||
{
|
||||
case direction::left:
|
||||
|
|
@ -112,6 +114,7 @@ namespace rsx
|
|||
}
|
||||
|
||||
caret_position += ::narrow<u16>(str.length());
|
||||
m_reset_caret_pulse = true;
|
||||
refresh();
|
||||
}
|
||||
|
||||
|
|
@ -136,6 +139,7 @@ namespace rsx
|
|||
}
|
||||
|
||||
caret_position--;
|
||||
m_reset_caret_pulse = true;
|
||||
refresh();
|
||||
}
|
||||
|
||||
|
|
@ -155,6 +159,13 @@ namespace rsx
|
|||
caret.back_color = fore_color;
|
||||
caret.pulse_effect_enabled = true;
|
||||
|
||||
if (m_reset_caret_pulse)
|
||||
{
|
||||
// Reset the pulse slightly below 1 rising on each user interaction
|
||||
caret.set_sinus_offset(1.6f);
|
||||
m_reset_caret_pulse = false;
|
||||
}
|
||||
|
||||
compiled.add(caret.get_compiled());
|
||||
|
||||
for (auto& cmd : compiled.draw_commands)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue