mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-18 00:29:05 +00:00

This commit adds a new property of font::ttext, whether it is "link aware". Link aware text has tokens that look like hyperlinks formatted thusly, with coloration and an underline. A `get_link` function, taking a layout location, returns a link token if it is pointed to at that location, and link awareness is enabled, and the empty string otherwise. All gui2::tcontrols may now have their text labels set to be link aware if desired. The gui2::tlabel constructor automatically sets these to be link aware. The gui2::tlabel click handler is set to use the `get_link` function instead of the `get_token` function. Link awareness is also registered as a property of [text] fields in gui widget definitions.