Something with Canvas I think

Blitz3D Forums/Blitz3D Beginners Area/Something with Canvas I think

Apollonius(Posted 2003) [#1]
I got little problem it doesnt draw, its B+,
Wheres my little error ;)
Just started and I already got errors lol


practice1.bb
Include "MGUI.bb"

MGUI_Window( wndMain, "Testing", 0, 50, 200, 200, blue)

Repeat
Forever


MGUI
;----------------------------------
; Created by Kaisuo Ninji          -
; Master GUI for BlitzPlus         -
; This file contain the Functions  -
;----------------------------------

;---------------------------------------------------------------
; This Function creates a Window                                -
Function MGUI_Window( winHandler, Name$, x, y, width, height, winColor)

; This creates the window
winHandler = CreateWindow(Name$,x,y,width,height,0,0)

; This creates the canvas for all the window's drawing events.
MGUI_Canvas = CreateCanvas(0,0,width,height,winHandler)

; Set the buffer
SetBuffer CanvasBuffer(MGUI_Canvas)

; This creates the window's Title Bar.
Select winColor

	Case silver
	; DRAW SILVER
		Color 164,163,190
		Rect 0, 0, width, 20, solid
		
	Case blue
	; DRAW BLUE
		
End Select

; UPDATE
	Cls
FlipCanvas(MGUI_Canvas)
	
End Function

;---------------------------------------------------------------



Perturbatio(Posted 2003) [#2]
Do you still need to set a graphics mode in B+?


Apollonius(Posted 2003) [#3]
not when its in somekind of Window mode.

I can create a ton of windows mouhahah :D


CS_TBL(Posted 2003) [#4]
I never do .. all my gfx output goes to a canvas..

btw, if you put a CLS in it, then indeed you don't see a thing :)


Apollonius(Posted 2003) [#5]
wow arent i stupid lol...


rdodson41(Posted 2003) [#6]
Haha don't worry I made the same type of mistakes when i started.

-Rich05