Try to fix label cursor issue
This commit is contained in:
parent
cdbe162521
commit
c928b88062
1 changed files with 10 additions and 0 deletions
|
|
@ -18,6 +18,11 @@ namespace psemek::ui
|
|||
|
||||
void label::set_text(std::string text)
|
||||
{
|
||||
if (selected_link_)
|
||||
{
|
||||
sdl2::set_cursor(sdl2::cursor_type::arrow);
|
||||
selected_link_ = std::nullopt;
|
||||
}
|
||||
text_ = std::move(text);
|
||||
tagged_ = false;
|
||||
|
||||
|
|
@ -59,6 +64,11 @@ namespace psemek::ui
|
|||
|
||||
void label::set_tagged_text(std::string text)
|
||||
{
|
||||
if (selected_link_)
|
||||
{
|
||||
sdl2::set_cursor(sdl2::cursor_type::arrow);
|
||||
selected_link_ = std::nullopt;
|
||||
}
|
||||
text_ = std::move(text);
|
||||
tagged_ = true;
|
||||
selected_link_ = std::nullopt;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue