Please, What's wrong ? Simple menu, need help !

Blitz3D Forums/Blitz3D Beginners Area/Please, What's wrong ? Simple menu, need help !

etxtra(Posted 2011) [#1]
Hi everyone ! last month I wrote a simple menu function that doesn't work anymore, please help me find out what's wrong :


this code displays my simple menu function, but if you click "options" then "change mouse sensitivity" you'll see that the related menu doesn't appear, and this is an exemple amongst many other problems, so how can I correct this program ? Maybe what I'm asking for is hard or complex, but I really need your help.

How can I make this menu go OK ? !

PS: note: I can give explanations about the program above if you want.

Last edited 2011


Warner(Posted 2011) [#2]
1. Change the start of f_Menu_Options to this:
Function f_Menu_Options()
	SetBuffer BackBuffer()
	
	f_Routine_Menus()
	V_Menu_Choix_E = -1

2. Change "MouseDown" in "MouseHit"
3. Change f_Menu_Texte to this:
; //////////////////////////////
Function f_Menu_Texte(v_Texte_S$,v_Ligne_E%,v_Option_N_E%)
	retval = V_Menu_Choix_E
	; Si la souris survole alors change la couleur;
	If Int(MouseY()/V_Taille_Texte_E) = v_Ligne_E And v_Option_N_E > 0
		Color 255,255,0
		If V_Clique2_E > 0
			DebugLog "click " + Rand(255)
			retval = v_Option_N_E
		Else
			retval = 0
		EndIf
	Else
		Color 255,255,255
	EndIf
	; Affiche Texte;
	;Color 255,255,0
	Text GraphicsWidth()/2,Int(v_Ligne_E * V_Taille_Texte_E),v_Texte_S,True,False	
	Return retval
End Function
; //////////////////////////////

It is just a fix, but it seems to work. Hopefully it gets you back on the track.
Edit: it fixes selecting 'options', then 'mouse sensitity'.

Last edited 2011


etxtra(Posted 2011) [#3]
Hi, @Warner ! Thank you ! right now my menus works well, thanks to your help.