Files
sml-projects/game-sml/fcore/title/title-vec.sml

32 lines
999 B
Standard ML
Raw Normal View History

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