From 53041c74a5de42f045cc7b09f41ebe80424ceaec Mon Sep 17 00:00:00 2001 From: Logan Hunt Date: Thu, 19 Jan 2023 11:05:57 -0700 Subject: [PATCH] Cursor highlight --- lib/chessh/ssh/client/menu.ex | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/chessh/ssh/client/menu.ex b/lib/chessh/ssh/client/menu.ex index 6c96cc2..b69340c 100644 --- a/lib/chessh/ssh/client/menu.ex +++ b/lib/chessh/ssh/client/menu.ex @@ -63,7 +63,6 @@ defmodule Chessh.SSH.Client.Menu do %Chessh.SSH.Client.Game.State{player_session: player_session, game: game}}} end) ++ [ - {"Settings", {}}, {"Help", {}} ] end @@ -130,7 +129,14 @@ defmodule Chessh.SSH.Client.Menu do fn {i, {option, _}} -> [ ANSI.cursor(y + length(logo_lines) + i + 1, x), - if(i == selected, do: ANSI.format([:bright, :light_cyan, "+ #{option}"]), else: option) + if(i == selected, + do: + ANSI.format_fragment( + [:light_cyan, :bright, "> #{option} <", :reset], + true + ), + else: option + ) ] end ) ++ [ANSI.home()]