Switch to hand cursor when clicking ui::label links
This commit is contained in:
parent
f0cf916b85
commit
284df5d92c
1 changed files with 7 additions and 0 deletions
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
#include <psemek/geom/contains.hpp>
|
||||
|
||||
#include <psemek/sdl2/cursor.hpp>
|
||||
|
||||
#include <stdexcept>
|
||||
#include <cctype>
|
||||
#include <unordered_map>
|
||||
|
|
@ -185,6 +187,11 @@ namespace psemek::ui
|
|||
|
||||
if (new_selected_link != selected_link_)
|
||||
{
|
||||
if (new_selected_link)
|
||||
sdl2::set_cursor(sdl2::cursor_type::hand);
|
||||
else
|
||||
sdl2::set_cursor(sdl2::cursor_type::arrow);
|
||||
|
||||
selected_link_ = new_selected_link;
|
||||
mouse_down_ = false;
|
||||
on_state_changed();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue