Cursor highlight

This commit is contained in:
Logan Hunt 2023-01-19 11:05:57 -07:00
parent 38fb530b60
commit 53041c74a5
No known key found for this signature in database
GPG Key ID: 8AC6A4B840C0EC49

View File

@ -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()]