Ship Routes: routes rest faded, hover brings one to full opacity
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
216e6f90b8
commit
40add57ba9
2 changed files with 16 additions and 6 deletions
|
|
@ -11,12 +11,12 @@ local COLORS = {
|
|||
Horde = { 1.00, 0.32, 0.24 },
|
||||
Neutral = { 1.00, 0.82, 0.25 },
|
||||
}
|
||||
-- line width in screen pixels, and opacity
|
||||
-- line width in screen pixels, and resting opacity: routes sit faded until hovered
|
||||
local STYLE = {
|
||||
boat = { width = 3, alpha = 0.95 },
|
||||
air = { width = 2.5, alpha = 0.8 },
|
||||
boat = { width = 3, alpha = 0.4 },
|
||||
air = { width = 2.5, alpha = 0.35 },
|
||||
}
|
||||
local DIMMED = 0.2 -- opacity of other routes while one is highlighted
|
||||
local LIT = 1 -- opacity of a route while its marker is hovered; the rest stay at their resting opacity
|
||||
local WORLD_MAP = 947 -- Azeroth: the shared space that legs between continents are drawn in
|
||||
local WORLD = -1 -- instance marker in Data.lua for a point given on the world map
|
||||
-- the zone or continent map each instance is placed on the world map by
|
||||
|
|
@ -351,7 +351,7 @@ function provider:DrawLines()
|
|||
local route = item.route
|
||||
local style = STYLE[route.kind]
|
||||
local c = Color(route)
|
||||
local alpha = (hl and not hl[route]) and DIMMED or style.alpha
|
||||
local alpha = (hl and hl[route]) and LIT or style.alpha
|
||||
local px = style.width + ((hl and hl[route]) and 1.5 or 0)
|
||||
local pts = item.pts
|
||||
for i = 1, #pts - 3, 2 do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue