highlight different options in red when they are (focused andalso selected)

This commit is contained in:
2025-02-21 14:53:26 +00:00
parent b2f58f1c9a
commit abcbc030e1

View File

@@ -44,7 +44,12 @@ struct
val acc = MakeTextVec.make val acc = MakeTextVec.make
(155, 35, width, height, "Left key", 0.0, 0.0, 0.0, []) (155, 35, width, height, "Left key", 0.0, 0.0, 0.0, [])
val acc = MakeTextVec.make val acc =
if #isSelected options then
MakeTextVec.make
(155, 95, width, height, "Right key", 0.7, 0.7, 0.3, acc)
else
MakeTextVec.make
(155, 95, width, height, "Right key", 0.3, 0.3, 0.7, acc) (155, 95, width, height, "Right key", 0.3, 0.3, 0.7, acc)
val acc = MakeTextVec.make val acc = MakeTextVec.make
@@ -76,7 +81,12 @@ struct
val acc = MakeTextVec.make val acc = MakeTextVec.make
(155, 95, width, height, "Right key", 0.0, 0.0, 0.0, acc) (155, 95, width, height, "Right key", 0.0, 0.0, 0.0, acc)
val acc = MakeTextVec.make val acc =
if #isSelected options then
MakeTextVec.make
(155, 155, width, height, "Up key", 0.7, 0.7, 0.3, acc)
else
MakeTextVec.make
(155, 155, width, height, "Up key", 0.3, 0.3, 0.7, acc) (155, 155, width, height, "Up key", 0.3, 0.3, 0.7, acc)
val acc = MakeTextVec.make val acc = MakeTextVec.make
@@ -108,7 +118,12 @@ struct
val acc = MakeTextVec.make val acc = MakeTextVec.make
(155, 155, width, height, "Up key", 0.0, 0.0, 0.0, acc) (155, 155, width, height, "Up key", 0.0, 0.0, 0.0, acc)
val acc = MakeTextVec.make val acc =
if #isSelected options then
MakeTextVec.make
(155, 215, width, height, "Down key", 0.7, 0.7, 0.3, acc)
else
MakeTextVec.make
(155, 215, width, height, "Down key", 0.3, 0.3, 0.7, acc) (155, 215, width, height, "Down key", 0.3, 0.3, 0.7, acc)
val acc = MakeTextVec.make val acc = MakeTextVec.make
@@ -140,7 +155,12 @@ struct
val acc = MakeTextVec.make val acc = MakeTextVec.make
(155, 215, width, height, "Down key", 0.0, 0.0, 0.0, acc) (155, 215, width, height, "Down key", 0.0, 0.0, 0.0, acc)
val acc = MakeTextVec.make val acc =
if #isSelected options then
MakeTextVec.make
(155, 275, width, height, "Jump key", 0.7, 0.7, 0.3, acc)
else
MakeTextVec.make
(155, 275, width, height, "Jump key", 0.3, 0.3, 0.7, acc) (155, 275, width, height, "Jump key", 0.3, 0.3, 0.7, acc)
val acc = MakeTextVec.make val acc = MakeTextVec.make
@@ -172,7 +192,12 @@ struct
val acc = MakeTextVec.make val acc = MakeTextVec.make
(155, 275, width, height, "Jump key", 0.0, 0.0, 0.0, acc) (155, 275, width, height, "Jump key", 0.0, 0.0, 0.0, acc)
val acc = MakeTextVec.make val acc =
if #isSelected options then
MakeTextVec.make
(155, 335, width, height, "Attack key", 0.7, 0.7, 0.3, acc)
else
MakeTextVec.make
(155, 335, width, height, "Attack key", 0.3, 0.3, 0.7, acc) (155, 335, width, height, "Attack key", 0.3, 0.3, 0.7, acc)
val acc = MakeTextVec.make val acc = MakeTextVec.make
@@ -204,7 +229,12 @@ struct
val acc = MakeTextVec.make val acc = MakeTextVec.make
(155, 335, width, height, "Attack key", 0.0, 0.0, 0.0, acc) (155, 335, width, height, "Attack key", 0.0, 0.0, 0.0, acc)
val acc = MakeTextVec.make val acc =
if #isSelected options then
MakeTextVec.make
(155, 395, width, height, "Save changes", 0.7, 0.7, 0.3, acc)
else
MakeTextVec.make
(155, 395, width, height, "Save changes", 0.3, 0.3, 0.7, acc) (155, 395, width, height, "Save changes", 0.3, 0.3, 0.7, acc)
val acc = MakeTextVec.make val acc = MakeTextVec.make
@@ -236,7 +266,12 @@ struct
val acc = MakeTextVec.make val acc = MakeTextVec.make
(155, 395, width, height, "Save changes", 0.0, 0.0, 0.0, acc) (155, 395, width, height, "Save changes", 0.0, 0.0, 0.0, acc)
val acc = MakeTextVec.make val acc =
if #isSelected options then
MakeTextVec.make
(155, 455, width, height, "Cancel changes", 0.7, 0.7, 0.3, acc)
else
MakeTextVec.make
(155, 455, width, height, "Cancel changes", 0.3, 0.3, 0.7, acc) (155, 455, width, height, "Cancel changes", 0.3, 0.3, 0.7, acc)
in in
Vector.concat acc Vector.concat acc