implement opacity in HudElement