From 7e7660f1e19be1e8502c3833c412917ac0a1f093 Mon Sep 17 00:00:00 2001 From: bbassie Date: Sun, 24 Jan 2021 02:26:26 +0100 Subject: [PATCH] Add tooltip to icon for better accessibility --- modules/gui/warp-list.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/gui/warp-list.lua b/modules/gui/warp-list.lua index 95059507..f3f08e7b 100644 --- a/modules/gui/warp-list.lua +++ b/modules/gui/warp-list.lua @@ -419,22 +419,26 @@ local function update_icon_button(element, on_cooldown, warp, warp_player_is_on, local position = warp.position element.tooltip = {'warp-list.goto-bypass', position.x, position.y} element.enabled = true + warp_status_element.tooltip = {'warp-list.goto-bypass', position.x, position.y} warp_status_element.caption = warp_status_icons.bypass label_style.font = 'default-semibold' else element.tooltip = {'warp-list.goto-disabled'} element.enabled = false + warp_status_element.tooltip = {'warp-list.goto-disabled'} warp_status_element.caption = warp_status_icons.not_available label_style.font = 'default' end elseif warp_player_is_on.warp_id == warp.warp_id then element.tooltip = {'warp-list.goto-same-warp'} element.enabled = false + warp_status_element.tooltip = {'warp-list.goto-same-warp'} warp_status_element.caption = warp_status_icons.current label_style.font = 'default' elseif on_cooldown then element.tooltip = {'warp-list.goto-cooldown'} element.enabled = false + warp_status_element.tooltip = {'warp-list.goto-cooldown'} warp_status_element.caption = warp_status_icons.cooldown label_style.font = 'default' else @@ -444,17 +448,20 @@ local function update_icon_button(element, on_cooldown, warp, warp_player_is_on, local position = warp.position element.tooltip = {'warp-list.goto-tooltip', position.x, position.y} element.enabled = true + warp_status_element.tooltip = {'warp-list.goto-tooltip', position.x, position.y} warp_status_element.caption = warp_status_icons.connected label_style.font = 'default-semibold' elseif bypass_warp_proximity then local position = warp.position element.tooltip = {'warp-list.goto-bypass-different-network', position.x, position.y} element.enabled = true + warp_status_element.tooltip = {'warp-list.goto-bypass-different-network', position.x, position.y} warp_status_element.caption = warp_status_icons.bypass label_style.font = 'default-semibold' else element.tooltip = {'warp-list.goto-different-network'} element.enabled = false + warp_status_element.tooltip = {'warp-list.goto-different-network'} warp_status_element.caption = warp_status_icons.different label_style.font = 'default' end