Quote: "put the individual letters up as a sprite each?"
technically, yes. but, using the
Text set of commands. and, probably the Char & Text
Tweening commands.
this will be my first time playing with tweens so it might take a bit; feel free to try for yourself while i try to put something together. but, once you review the commands, you'll see why i think this is a good way to go
ok, back with a simple example:
// Project: elixir menu
// Created: 2020-09-21
// show all errors
SetErrorMode(2)
// set window properties
SetWindowTitle( "elixir menu" )
SetWindowSize( 640,480, 0 )
SetWindowAllowResize( 1 ) // allow the user to resize the window
// set display properties
SetVirtualResolution( 640,480 ) // doesn't have to match the window
SetOrientationAllowed( 1, 1, 1, 1 ) // allow both portrait and landscape on mobile devices
SetSyncRate( 30, 0 ) // 30fps instead of 60 to save battery
SetScissor( 0,0,0,0 ) // use the maximum available screen space, no black borders
UseNewDefaultFonts( 1 ) // since version 2.0.22 we can use nicer default fonts
SetPrintColor(0,0,0)
SetClearColor(201,246,255)
GLOBAL ShotImg as Integer : ShotImg = LoadImage("shot.png")
do
ThisOption$ = DoMenu()
Sync()
loop
Function DoMenu()
//Initialize
Option$ = ""
TextIDs as Integer []
//Title Animation
Title$ = "ESCAPE" + CHR(10) + "ELIXIR" + CHR(10) + "CORP"
TitleID = CreateText(Title$) : SetTextSize(TitleID,64) : SetTextAlignment(TitleID,1)
SetTextColor(TitleID, 128,0,255, 255) : SetTextBold(TitleID,1) : SetTextPosition(TitleID,320,32) : SetTextSpacing(TitleID, 16)
TextIDs.Insert(TitleID)
//Hide all Characters
TitleLength = LEN(Title$)
For x = 0 to TitleLength - 1
SetTextCharColorAlpha(TitleID, x, 0)
Next x
//Prepare to reveal each character
ThisChar = 0 : ThisTime# = 0.1 : NextTime# = Timer() + ThisTime#
Repeat `Show chars 1 by 1
If NextTime# <= Timer()
SetTextCharColorAlpha(TitleID,ThisChar,255)
NextTime# = Timer() + ThisTime#
INC ThisChar
Sync()
Endif
Until ThisChar = TitleLength
Sleep(100) `Prepare to fire
//Shots Fired!
Shot1 = CreateSprite(shotImg) : SetSpritePosition(Shot1,500,200)
SetClearColor(255,0,0) : ClearScreen() : Sync() : Sleep(100)
`
SetClearColor(201,246,255) : ClearScreen() : Sync() : Sleep(100)
Shot2 = CreateSprite(shotImg) : SetSpritePosition(Shot2,540,190)
SetClearColor(255,0,0) : ClearScreen() : Sync() : Sleep(100)
SetClearColor(201,246,255)
//Menu Options:
NewGame = CreateText("NEW GAME") : SetTextSize(NewGame,36) : SetTextAlignment(NewGame,0)
SetTextColor(NewGame, 255,0,0,255) : SetTextPosition(NewGame, 240, 240)
TextIDs.Insert(NewGame)
Controls = CreateText("CONTROLS") : SetTextSize(Controls,36) : SetTextAlignment(Controls,0)
SetTextColor(Controls, 255,0,0,255) : SetTextPosition(Controls, 240, 280)
TextIDs.Insert(Controls)
Credits = CreateText("CREDITS") : SetTextSize(Credits,36) : SetTextAlignment(Credits,0)
SetTextColor(Credits, 255,0,0,255) : SetTextPosition(Credits, 240, 320)
TextIDs.Insert(Credits)
Quit = CreateText("QUIT") : SetTextSize(Quit,36) : SetTextAlignment(Quit,0)
SetTextColor(Quit, 255,0,0,255) : SetTextPosition(Quit, 240, 360)
TextIDs.Insert(Quit)
//Pick One
Repeat
MX = GetPointerX() : MY = GetPointerY()
If GetPointerPressed()
If GetTextHitTest(NewGame,MX,MY) then Option$ = "New Game"
If GetTextHitTest(Controls,MX,MY) then Option$ = "Controls"
If GetTextHitTest(Credits,MX,MY) then Option$ = "Credits"
If GetTextHitTest(Quit,MX,MY) then Option$ = "Quit"
Endif
Sync()
until Option$ <> ""
//CleanUp
for x = 0 to TextIDs.Length
DeleteText(TextIDs[x])
Next x
DeleteSprite(Shot1) : DeleteSprite(Shot2)
SetWindowTitle(Option$) `//Show Result/Option
EndFunction Option$
it's kinda crude but you get it. and, i don't think it needed Tweens after all.
ShotImg attached (even tho i think you already have the same
)