summaryrefslogtreecommitdiff
path: root/lib/chessh/ssh/screens/menu.ex
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chessh/ssh/screens/menu.ex')
-rw-r--r--lib/chessh/ssh/screens/menu.ex9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/chessh/ssh/screens/menu.ex b/lib/chessh/ssh/screens/menu.ex
index 9baa059..d9df1b7 100644
--- a/lib/chessh/ssh/screens/menu.ex
+++ b/lib/chessh/ssh/screens/menu.ex
@@ -23,15 +23,14 @@ defmodule Chessh.SSH.Client.Menu do
MMMMMMMMMMM MMMMMMMMMMM MMMMMMMMMMMM"
@options [
- {"Option 1", {Chessh.SSH.Client.Board, %{}}},
- {"Option 2", {Chessh.SSH.Client.Board, %{}}},
- {"Option 3", {Chessh.SSH.Client.Board, %{}}}
+ {"Option 1", {Chessh.SSH.Client.Board, %Chessh.SSH.Client.Board.State{}}},
+ {"Option 2", {Chessh.SSH.Client.Board, %Chessh.SSH.Client.Board.State{}}}
]
def render(%Client.State{
width: width,
height: height,
- state_stack: [{_this_module, %State{selected: selected, y: dy, x: dx}} | _tail]
+ state_stack: [{_this_module, %State{selected: selected, y: dy, x: dx}} | _]
}) do
text = String.split(@logo, "\n")
{logo_width, logo_height} = Utils.text_dim(@logo)
@@ -57,7 +56,7 @@ defmodule Chessh.SSH.Client.Menu do
) ++ [ANSI.home()]
end
- def wrap_around(index, delta, length) do
+ defp wrap_around(index, delta, length) do
calc = index + delta
if(calc < 0, do: length, else: 0) + rem(calc, length)
end