I thought i was on the right track
but it seems i do not fully understand
I want to take
name$="Left Button"
break it town to two strings
so they can displayed over a button
methode one :
a$="Left"
b$="Button"
methode two:
have the program store the words to NM$[1]
so the program counts to and store until it find the space
so
NM$[1]="Left"
NM$[2]="Button"
if at a latter date i want to more than just two words
i want the program to be able to use the mid command
to break the senance i give it
i tried this code
// Project: Text
// Created: 2015-05-16
// set window properties
SetWindowTitle( "Text" )
SetWindowSize( 1024, 768, 0 )
// set display properties
Setvirtualresolution(1024,768)
SetOrientationAllowed( 0, 0, 1, 1 )
//do
// Print( ScreenFPS() )
// Sync()
//loop
ResetTimer()
text$="Example Text="
dim t$ [4]
CreateText(100,text$)
SetTextSize(100,25)
SetTextPosition(100,10,5)
For i=1 to Len(text$)
a$=mid(text$,i,1)
if a$=" " or a$=mid(text$,len(text$),1)
goto sk
endif
b$=b$+a$
goto ska
sk:
t$[a]=b$:a=a+1:b$=""
ska:
//Create a text object for character of the string
CreateText(i,Mid(text$,i,1)+" - "+str(i) +" - " + str(asc( Mid(text$,i,1) )))
SetTextSize(i,25)
//increment the text position so all characters print down the screen.
SetTextPosition(i,10,10+i*25)
Sync()
Next
za$=" Text Length is : "+str(Len(text$))
CreateText(200,za$)
SetTextSize(200,25)
SetTextPosition(200,1,10+i*25+25)
x=300:y=100
for a=0 to 4
z$=str(a)
CreateText(x,"Line# : "+z$+" - "+"Lenght: "+str(len(t$[a]))+" - "+t$[a])
SetTextSize(x,25) : SetTextPosition(x,400,y)
x=x+100:y=y+30
next a
Sync()
Repeat
Until Timer()>60
End
I've reworked things a bit
i'm closer but it still got a bug in it
to move side ways - is to move forward
Since a Strait line gets thin fast