Hello,
You may have seen my previous posts on this topic. I have figured out the title screen, but I need to make it work. When i click start game I want it to gosub room1:. Thanks
oad Image "E:\Nut Run\pictures\Title Screen.bmp",1,1
` Get middle of screen coordinates
MX = Screen Width()/2
MY = Screen Height()/2
` The main menu loop
Do
Paste Image 1,0,0 : But = 0
If Button(MX,MY-20," Start Game ") Then But = 1
If Button(MX,MY ," Instructions ") Then But = 2
If Button(MX,MY+20," Credits ") Then But = 3
Center Text 115,450, "Under Development V 0.01"
Loop
` Button Function
Function Button(X,Y,B$)
rB as dWord
TH=(Text Height(B$)/2)+1
TW=(Text Width(B$)/2)+1
MX=MouseX() : MY=MouseY()
If MX>X-TW and MX<X+TW and MY>Y-TH and MY<Y+TH
CV = RGBA(50,205,50,0)
rB = MouseClick()
If rB<>0 then CV = RGBA(250,0,0,128)
Else
CV = RGBA(250,0,0,0)
rB = 0
EndIf
Box X-TW,Y-TH,X+TW,Y+TY,CV,CV,CV,CV
Center Text X,Y-(TH-1),B$
EndFunction rB
` RGBA Function
Function RGBA(R,G,B,A)
rB as dWord
rB = (A<<24)||(R<<16)||(G<<8)||(B)
EndFunction rB
You are entering the Wu Dynasty. Boomshakalaka
-Nathan