Mark credits label as link-unaware
This significantly speeds up opening the credits screen.
This commit is contained in:
parent
d90b1d1c43
commit
495c744cf1
3 changed files with 10 additions and 0 deletions
|
@ -125,6 +125,7 @@ void end_credits::pre_show(window& window)
|
|||
text_widget_ = find_widget<scroll_label>(&window, "text", false, true);
|
||||
|
||||
text_widget_->set_use_markup(true);
|
||||
text_widget_->set_link_aware(false);
|
||||
text_widget_->set_label((focus_ss.str().empty() ? ss : focus_ss).str());
|
||||
|
||||
// HACK: always hide the scrollbar, even if it's needed.
|
||||
|
|
|
@ -103,6 +103,13 @@ void scroll_label::set_text_alpha(unsigned short alpha)
|
|||
}
|
||||
}
|
||||
|
||||
void scroll_label::set_link_aware(bool l)
|
||||
{
|
||||
if(label* widget = get_internal_label()) {
|
||||
widget->set_link_aware(l);
|
||||
}
|
||||
}
|
||||
|
||||
void scroll_label::set_self_active(const bool active)
|
||||
{
|
||||
state_ = active ? ENABLED : DISABLED;
|
||||
|
|
|
@ -71,6 +71,8 @@ public:
|
|||
|
||||
void set_text_alpha(unsigned short alpha);
|
||||
|
||||
void set_link_aware(bool l);
|
||||
|
||||
private:
|
||||
/**
|
||||
* Possible states of the widget.
|
||||
|
|
Loading…
Add table
Reference in a new issue