2025-02-19 04:07:27 +00:00
|
|
|
structure TitleVec =
|
|
|
|
|
struct
|
2025-02-19 20:06:12 +00:00
|
|
|
open TitleType
|
|
|
|
|
|
2025-02-19 04:07:27 +00:00
|
|
|
fun getDrawVec (title: TitleType.title_type, width, height) =
|
2025-02-19 20:06:12 +00:00
|
|
|
case #focus title of
|
|
|
|
|
START_BUTTON =>
|
2025-02-20 06:13:33 +00:00
|
|
|
let
|
|
|
|
|
val playX = MakeTextVec.getTextCentreX "Play game"
|
|
|
|
|
val acc = MakeTextVec.make
|
|
|
|
|
(playX, 500, width, height, "Play game", 0.3, 0.3, 0.7, [])
|
2025-02-20 06:00:49 +00:00
|
|
|
|
2025-02-20 06:13:33 +00:00
|
|
|
val optionsX = MakeTextVec.getTextCentreX "Options"
|
|
|
|
|
val acc = MakeTextVec.make
|
|
|
|
|
(optionsX, 600, width, height, "Options", 0.0, 0.0, 0.0, acc)
|
2025-02-20 06:00:49 +00:00
|
|
|
in
|
|
|
|
|
Vector.concat acc
|
|
|
|
|
end
|
|
|
|
|
| OPTIONS_BUTTON =>
|
2025-02-20 06:13:33 +00:00
|
|
|
let
|
|
|
|
|
val playX = MakeTextVec.getTextCentreX "Play game"
|
|
|
|
|
val acc = MakeTextVec.make
|
|
|
|
|
(playX, 500, width, height, "Play game", 0.0, 0.0, 0.0, [])
|
2025-02-20 06:00:49 +00:00
|
|
|
|
2025-02-20 06:13:33 +00:00
|
|
|
val optionsX = MakeTextVec.getTextCentreX "Options"
|
|
|
|
|
val acc = MakeTextVec.make
|
|
|
|
|
(optionsX, 600, width, height, "Options", 0.3, 0.3, 0.7, acc)
|
2025-02-20 06:00:49 +00:00
|
|
|
in
|
|
|
|
|
Vector.concat acc
|
2025-02-19 20:06:12 +00:00
|
|
|
end
|
2025-02-19 04:07:27 +00:00
|
|
|
end
|