Menü fuzt nur bei "1"

Übersicht BlitzBasic Beginners-Corner

Neue Antwort erstellen

ToeB

Betreff: Menü fuzt nur bei "1"

BeitragMi, Feb 14, 2007 15:45
Antworten mit Zitat
Benutzer-Profile anzeigen
Hallo progger-Gemeinschaft!

Problem : Die Function "menü" Funzt nur richtig bei der angabe "1" bei "0" nicht Surprised

Lösung : Keine, das isses ja Sad

Code: [AUSKLAPPEN]

Function menü(Sch = 0)
.men
FlushKeys()
DrawImage BackGround,100,200
DrawImage BackGround,-100,-100
DrawImage BackGround,500,100
GW = GraphicsWidth()/2:GH = GraphicsHeight()/2
Text GW,50 ,"MENÜ",1,1
Text GW,100,"[1] Länge des Spiels",1,1
If Sch = 1 Then
Text GW,150,"[2] Schwierigkeit",1,1
Text GW,200,"[3] Größe",1,1
Text GW,250,"[4] Los geht's !",1,1
EndIf
If Sch = 0
Text GW,150,"[2] Größe",1,1
Text GW,200,"[3] Los geht's !",1,1
EndIf

Flip
WaitKey()
If KeyHit(2) Then Goto lange
If KeyHit(3) And Sch = 1 Then Goto Schw
If KeyHit(3) And Sch = 0 Then Goto gros
If KeyHit(4) And Sch = 1 Then Goto gros
If KeyHit(4) And Sch = 0 Then Goto spiel
If KeyHit(5) And Sch = 1 Then Goto spiel
Cls
FlushKeys()

.lange
Cls
DrawImage BackGround,100,200
DrawImage BackGround,-100,-100
DrawImage BackGround,500,100
Text GW,50,"LÄNGE",1,1
Text GW,100,"[1] 30 sek.",1,1
Text GW,150,"[2] 60 sek.",1,1
Text GW,200,"[3] 120 sek.",1,1
Flip
WaitKey()
If KeyHit(2) Then cd = 30
If KeyHit(3) Then cd = 60
If KeyHit(4) Then cd = 120
countdown = 1000*cd
Cls
FlushKeys()
Goto men

.Schw
Cls
DrawImage BackGround,100,200
DrawImage BackGround,-100,-100
DrawImage BackGround,500,100
Text GW,50,"SCHWIERIGKEIT",1,1
Text GW,100,"[1] Leicht",1,1
Text GW,150,"[2] Mittel",1,1
Text GW,200,"[3] Schwer",1,1
Flip
WaitKey()
If KeyHit(2) Then fx = 35:fy = 35
If KeyHit(3) Then fx = 50:fy = 10
If KeyHit(4) Then fx = 25:fy = 25
If KeyHit(5) Then fx = 50:fy = 50
Cls
FlushKeys()
Goto men

.gros
Cls
DrawImage BackGround,100,200
DrawImage BackGround,-100,-100
DrawImage BackGround,500,100

Color 255,255,255
Text GW,50,"GRÖßE",1,1
Text GW,100," [1] Normal(35 x 35)",1,1
Text GW,150," [2] 50 x 10",1,1
Text GW,200," [3] 25 x 25",1,1
Text GW,250," [4] 50 x 50",1,1
Flip
WaitKey()
If KeyHit(2) Then fx = 35:fy = 35
If KeyHit(3) Then fx = 50:fy = 10
If KeyHit(4) Then fx = 25:fy = 25
If KeyHit(5) Then fx = 50:fy = 50
Cls
FlushKeys()
Goto men

.spiel

End Function


immer wenn ich da Code: [AUSKLAPPEN]
menü()
oder Code: [AUSKLAPPEN]
menü(0)
eingebe, dann kommt immer, also wenn ich dann die tasten drücke( 1, 2, 3 ) dann kommt imma nur das sub "lange" ???
Ach ja, wenn ihr mekert "Goto ist böse", ich hab das absichtlich so gemacht !

~Edit~

Schon erledigt ! Könnt den laden schließen !

Code: [AUSKLAPPEN]

Function menü(Sch = 0)
.men
FlushKeys()
DrawImage BackGround,100,200
DrawImage BackGround,-100,-100
DrawImage BackGround,500,100
GW = GraphicsWidth()/2:GH = GraphicsHeight()/2
Text GW,50 ,"MENÜ",1,1
Text GW,100,"[1] Länge des Spiels",1,1
If Sch = 1 Then
Text GW,150,"[2] Schwierigkeit",1,1
Text GW,200,"[3] Größe",1,1
Text GW,250,"[4] Los geht's !",1,1
EndIf
If Sch = 0
Text GW,150,"[2] Größe",1,1
Text GW,200,"[3] Los geht's !",1,1
EndIf

Flip
WaitKey()
If KeyHit(2) Then Goto lange
If Sch = 1 Then
If KeyHit(3) Then Goto Schw
If KeyHit(4) Then Goto gros
If KeyHit(5) Then Goto spiel
EndIf
If Sch = 0 Then
If KeyHit(3) Then Goto gros
If KeyHit(4) Then Goto spiel
EndIf
Cls
FlushKeys()

.lange
Cls
DrawImage BackGround,100,200
DrawImage BackGround,-100,-100
DrawImage BackGround,500,100
Text GW,50,"LÄNGE",1,1
Text GW,100,"[1] 30 sek.",1,1
Text GW,150,"[2] 60 sek.",1,1
Text GW,200,"[3] 120 sek.",1,1
Flip
WaitKey()
If KeyHit(2) Then cd = 30
If KeyHit(3) Then cd = 60
If KeyHit(4) Then cd = 120
countdown = 1000*cd
Cls
FlushKeys()
Goto men


.Schw
Cls
DrawImage BackGround,100,200
DrawImage BackGround,-100,-100
DrawImage BackGround,500,100
Text GW,50,"SCHWIERIGKEIT",1,1
Text GW,100,"[1] Leicht",1,1
Text GW,150,"[2] Mittel",1,1
Text GW,200,"[3] Schwer",1,1
Flip
WaitKey()
If KeyHit(2) Then Comp = 1
If KeyHit(3) Then Comp = 2
If KeyHit(4) Then Comp = 3
Cls
FlushKeys()
Goto men

.gros
Cls
DrawImage BackGround,100,200
DrawImage BackGround,-100,-100
DrawImage BackGround,500,100

Color 255,255,255
Text GW,50,"GRÖßE",1,1
Text GW,100," [1] Normal(35 x 35)",1,1
Text GW,150," [2] 50 x 10",1,1
Text GW,200," [3] 25 x 25",1,1
Text GW,250," [4] 50 x 50",1,1
Flip
WaitKey()
If KeyHit(2) Then fx = 35:fy = 35
If KeyHit(3) Then fx = 50:fy = 10
If KeyHit(4) Then fx = 25:fy = 25
If KeyHit(5) Then fx = 50:fy = 50
Cls
FlushKeys()
Goto men

.spiel

End Function



funzt super !
Religiöse Kriege sind Streitigkeiten erwachsener Männer darum, wer den besten imaginären Freund hat.
Race-Project - Das Rennspiel der etwas anderen Art
SimpleUDP3.0 - Neuste Version der Netzwerk-Bibliothek
Vielen Dank an dieser Stelle nochmal an Pummelie, welcher mir einen Teil seines VServers für das Betreiben meines Masterservers zur verfügung stellt!

Tornado11

BeitragMi, Feb 14, 2007 16:04
Antworten mit Zitat
Benutzer-Profile anzeigen
Erst Hirnen dann hornen Wink

ToeB

BeitragMi, Feb 14, 2007 16:25
Antworten mit Zitat
Benutzer-Profile anzeigen
danke trotztdem *lol* Very Happy
Religiöse Kriege sind Streitigkeiten erwachsener Männer darum, wer den besten imaginären Freund hat.
Race-Project - Das Rennspiel der etwas anderen Art
SimpleUDP3.0 - Neuste Version der Netzwerk-Bibliothek
Vielen Dank an dieser Stelle nochmal an Pummelie, welcher mir einen Teil seines VServers für das Betreiben meines Masterservers zur verfügung stellt!

Neue Antwort erstellen


Übersicht BlitzBasic Beginners-Corner

Gehe zu:

Powered by phpBB © 2001 - 2006, phpBB Group