Drawing lines of text... simpel stuff.. help

BlitzMax Forums/BlitzMax Beginners Area/Drawing lines of text... simpel stuff.. help

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Why did you delete the first one ??? lol, thats the one that answered my post :P

I thought that it was right at first, but after re-reading your post, I thought that the second one was more what you were after. :)

This isn't in the main loop though, would it still work in the main loop?

From your post above, it looks like the five lines of zeros are maybe to be put in different positions on different screens? If so, something like the code below might help (it has the first version of what I posted as a function which can be offset when the function is called):

Graphics 800,600

Local screen = 2 ' this is changed (in main loop or wherever) to show different screens

' MAIN LOOP
Repeat

	If screen=1 Then
		' ... other stuff goes here
		DrawZeros(0)
		'... more stuff goes here
	EndIf
	
	If screen=2 Then
		DrawZeros(100)
	EndIf
	
	If screen=3 Then
		DrawZeros(50)
	EndIf

Until KeyHit(KEY_ESCAPE)


Function DrawZeros(offset)
	For Local bline_y = 20 + offset To 170 + offset Step 30
		For Local x = 35 To 755 Step 30
			DrawText "0", x, bline_y
		Next
	Next
	Flip
End Function