76 lines
1.9 KiB
Text
76 lines
1.9 KiB
Text
Function help()
|
|
//Näytetään vihun kuva
|
|
ShowObject hlpvihu, ON
|
|
|
|
ClearText
|
|
|
|
Locate mainmargin, 3
|
|
|
|
//Ladataan tiedoston sisältö
|
|
file = OpenToRead("Help")
|
|
While Not EOF(file)
|
|
AddText Str(ReadLine(file))
|
|
Wend
|
|
CloseFile file
|
|
|
|
//Välittömän poistumisen esto
|
|
ClearKeys
|
|
ClearMouse
|
|
|
|
Repeat
|
|
Nappi_Poista()
|
|
//Lisätään vihuteksti tarvittaessa
|
|
If MouseWX() > ObjectX(hlpvihu) - ObjectSizeX(hlpvihu) / 2 - 3 And MouseWY() > ObjectY(hlpvihu) - ObjectSizeY(hlpvihu) / 2 - 3 And MouseWX() < ObjectX(hlpvihu) + ObjectSizeX(hlpvihu) / 2 + 3 And MouseWY() < ObjectY(hlpvihu) + ObjectSizeY(hlpvihu) / 2 + 3 Then
|
|
Nappi_Lisaa(MouseX() - TextWidth("Outo sininen otus") / 2 - 40, MouseY() + ImageHeight(hiiri) / 2, TextWidth("Outo sininen otus") + 20, 20, "Outo sininen otus")
|
|
EndIf
|
|
|
|
//Pelinaloitus
|
|
Nappi_Lisaa(ScreenWidth() - ScreenWidth() / 3, ScreenHeight() - mainmargin - 45, ScreenWidth() / 3 - mainmargin, 20, "Aloita Peli")
|
|
Nappi_Lisaa(ScreenWidth() - ScreenWidth() / 3, ScreenHeight() - mainmargin - 20, ScreenWidth() / 3 - mainmargin, 20, "Takaisin")
|
|
Nappi_Piirra()
|
|
|
|
//Tarkistetaan näppäimistö
|
|
If KeyHit(cbkeyreturn) Then
|
|
PlaySound btthit
|
|
ClearText
|
|
ClearKeys
|
|
ClearMouse
|
|
SetFont font
|
|
ShowObject hlpvihu, OFF
|
|
Return True
|
|
ElseIf KeyHit(cbkeybackspace) Then
|
|
ClearText
|
|
ClearObjects
|
|
PlaySound btthit
|
|
loadbasicres()
|
|
Return False
|
|
EndIf
|
|
|
|
//Tarkistetaan nappulat
|
|
Select Nappi_Paivita()
|
|
Case "Aloita Peli"
|
|
PlaySound btthit
|
|
ClearText
|
|
ClearKeys
|
|
ClearMouse
|
|
SetFont font
|
|
ShowObject hlpvihu, OFF
|
|
Return True
|
|
Case "Takaisin"
|
|
ClearText
|
|
ClearObjects
|
|
PlaySound btthit
|
|
loadbasicres()
|
|
Return False
|
|
EndSelect
|
|
DrawScreen
|
|
Forever
|
|
|
|
//Poistutaan
|
|
PlaySound btthit
|
|
ClearText
|
|
ClearKeys
|
|
ClearMouse
|
|
SetFont font
|
|
ShowObject hlpvihu, OFF
|
|
EndFunction
|