News
Forums
Code
Logs
Gallery
Specs
Search
Help with scrolling? with canvas?
BlitzMax Forums
/
BlitzMax Beginners Area
/
Help with scrolling? with canvas?
Caton
(Posted June)
[#1]
Please help with scrolling, with canvas?
Import MaxGui.Drivers Global GAME_WIDTH=800 Global GAME_HEIGHT=600 Global wx=(ClientWidth(Desktop())-GAME_WIDTH)/2 Global wy=(ClientHeight(Desktop())-GAME_HEIGHT)/2 Global window:TGadget=CreateWindow("Editor",wx,wy,GAME_WIDTH,GAME_HEIGHT,Null,WINDOW_TITLEBAR|WINDOW_CLIENTCOORDS) Global canvas:TGadget=CreateCanvas(0,0,320,240,window) CreateTimer 60 While Not AppTerminate() WaitEvent Select EventID() Case EVENT_WINDOWCLOSE FreeGadget canvas End Case EVENT_TIMERTICK RedrawGadget canvas Case EVENT_GADGETPAINT SetGraphics CanvasGraphics(canvas) Cls Flip End Select Wend End
Thanks.